WPILibC++ 2023.4.3
REVPH.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9#include "hal/Types.h"
10
11/**
12 * @defgroup hal_rev_ph REV PH Functions
13 * @ingroup hal_capi
14 * @{
15 */
16
17/**
18 * The compressor configuration type
19 */
20HAL_ENUM(HAL_REVPHCompressorConfigType){
21 HAL_REVPHCompressorConfigType_kDisabled = 0,
22 HAL_REVPHCompressorConfigType_kDigital = 1,
23 HAL_REVPHCompressorConfigType_kAnalog = 2,
24 HAL_REVPHCompressorConfigType_kHybrid = 3,
25};
26
27/**
28 * Storage for REV PH Version
29 */
37};
38
39/**
40 * Storage for compressor config
41 */
47};
48
49/**
50 * Storage for REV PH Faults
51 */
75};
76
77/**
78 * Storage for REV PH Sticky Faults
79 */
88};
89
90#ifdef __cplusplus
91extern "C" {
92#endif
93
95 const char* allocationLocation,
97
99
102
105 const HAL_REVPHCompressorConfig* config,
106 int32_t* status);
108 int32_t* status);
110 int32_t* status);
112 double minAnalogVoltage,
113 double maxAnalogVoltage,
114 int32_t* status);
116 double minAnalogVoltage,
117 double maxAnalogVoltage,
118 int32_t* status);
119HAL_REVPHCompressorConfigType HAL_GetREVPHCompressorConfig(
124 int32_t* status);
130 int32_t* status);
131
134 int32_t* status);
135
137 int32_t* status);
138
140 int32_t* status);
141
143 HAL_REVPHStickyFaults* stickyFaults,
144 int32_t* status);
145
147
148#ifdef __cplusplus
149} // extern "C"
150#endif
151/** @} */
void HAL_GetREVPHFaults(HAL_REVPHHandle handle, HAL_REVPHFaults *faults, int32_t *status)
HAL_REVPHCompressorConfigType HAL_GetREVPHCompressorConfig(HAL_REVPHHandle handle, int32_t *status)
double HAL_GetREVPHSolenoidVoltage(HAL_REVPHHandle handle, int32_t *status)
double HAL_GetREVPHSolenoidCurrent(HAL_REVPHHandle handle, int32_t *status)
void HAL_GetREVPHStickyFaults(HAL_REVPHHandle handle, HAL_REVPHStickyFaults *stickyFaults, int32_t *status)
double HAL_GetREVPH5VVoltage(HAL_REVPHHandle handle, int32_t *status)
void HAL_FreeREVPH(HAL_REVPHHandle handle)
void HAL_SetREVPHClosedLoopControlDisabled(HAL_REVPHHandle handle, int32_t *status)
HAL_REVPHHandle HAL_InitializeREVPH(int32_t module, const char *allocationLocation, int32_t *status)
void HAL_GetREVPHVersion(HAL_REVPHHandle handle, HAL_REVPHVersion *version, int32_t *status)
int32_t HAL_GetREVPHSolenoids(HAL_REVPHHandle handle, int32_t *status)
void HAL_ClearREVPHStickyFaults(HAL_REVPHHandle handle, int32_t *status)
void HAL_SetREVPHClosedLoopControlDigital(HAL_REVPHHandle handle, int32_t *status)
void HAL_SetREVPHClosedLoopControlAnalog(HAL_REVPHHandle handle, double minAnalogVoltage, double maxAnalogVoltage, int32_t *status)
double HAL_GetREVPHVoltage(HAL_REVPHHandle handle, int32_t *status)
HAL_Bool HAL_GetREVPHPressureSwitch(HAL_REVPHHandle handle, int32_t *status)
void HAL_SetREVPHClosedLoopControlHybrid(HAL_REVPHHandle handle, double minAnalogVoltage, double maxAnalogVoltage, int32_t *status)
double HAL_GetREVPHCompressorCurrent(HAL_REVPHHandle handle, int32_t *status)
double HAL_GetREVPHAnalogVoltage(HAL_REVPHHandle handle, int32_t channel, int32_t *status)
HAL_ENUM(HAL_REVPHCompressorConfigType)
The compressor configuration type.
Definition: REVPH.h:20
HAL_Bool HAL_CheckREVPHSolenoidChannel(int32_t channel)
HAL_Bool HAL_CheckREVPHModuleNumber(int32_t module)
void HAL_FireREVPHOneShot(HAL_REVPHHandle handle, int32_t index, int32_t durMs, int32_t *status)
void HAL_SetREVPHSolenoids(HAL_REVPHHandle handle, int32_t mask, int32_t values, int32_t *status)
HAL_Bool HAL_GetREVPHCompressor(HAL_REVPHHandle handle, int32_t *status)
void HAL_SetREVPHCompressorConfig(HAL_REVPHHandle handle, const HAL_REVPHCompressorConfig *config, int32_t *status)
int32_t HAL_Bool
Definition: Types.h:73
HAL_Handle HAL_REVPHHandle
Definition: Types.h:71
::uint32_t uint32_t
Definition: Meta.h:56
::int32_t int32_t
Definition: Meta.h:57
GHC_FS_API file_status status(const path &p, std::error_code &ec) noexcept
Definition: filesystem.hpp:4892
Storage for compressor config.
Definition: REVPH.h:42
double maxAnalogVoltage
Definition: REVPH.h:44
double minAnalogVoltage
Definition: REVPH.h:43
HAL_Bool useDigital
Definition: REVPH.h:46
HAL_Bool forceDisable
Definition: REVPH.h:45
Storage for REV PH Faults.
Definition: REVPH.h:52
uint32_t brownout
Definition: REVPH.h:72
uint32_t channel1Fault
Definition: REVPH.h:54
uint32_t channel4Fault
Definition: REVPH.h:57
uint32_t solenoidOverCurrent
Definition: REVPH.h:71
uint32_t compressorOverCurrent
Definition: REVPH.h:69
uint32_t channel0Fault
Definition: REVPH.h:53
uint32_t channel14Fault
Definition: REVPH.h:67
uint32_t compressorOpen
Definition: REVPH.h:70
uint32_t canWarning
Definition: REVPH.h:73
uint32_t channel5Fault
Definition: REVPH.h:58
uint32_t channel3Fault
Definition: REVPH.h:56
uint32_t hardwareFault
Definition: REVPH.h:74
uint32_t channel13Fault
Definition: REVPH.h:66
uint32_t channel10Fault
Definition: REVPH.h:63
uint32_t channel15Fault
Definition: REVPH.h:68
uint32_t channel9Fault
Definition: REVPH.h:62
uint32_t channel2Fault
Definition: REVPH.h:55
uint32_t channel12Fault
Definition: REVPH.h:65
uint32_t channel8Fault
Definition: REVPH.h:61
uint32_t channel11Fault
Definition: REVPH.h:64
uint32_t channel7Fault
Definition: REVPH.h:60
uint32_t channel6Fault
Definition: REVPH.h:59
Storage for REV PH Sticky Faults.
Definition: REVPH.h:80
uint32_t brownout
Definition: REVPH.h:84
uint32_t solenoidOverCurrent
Definition: REVPH.h:83
uint32_t compressorOverCurrent
Definition: REVPH.h:81
uint32_t hasReset
Definition: REVPH.h:87
uint32_t compressorOpen
Definition: REVPH.h:82
uint32_t canWarning
Definition: REVPH.h:85
uint32_t canBusOff
Definition: REVPH.h:86
Storage for REV PH Version.
Definition: REVPH.h:30
uint32_t uniqueId
Definition: REVPH.h:36
uint32_t hardwareMinor
Definition: REVPH.h:34
uint32_t firmwareMinor
Definition: REVPH.h:32
uint32_t firmwareFix
Definition: REVPH.h:33
uint32_t hardwareMajor
Definition: REVPH.h:35
uint32_t firmwareMajor
Definition: REVPH.h:31