WPILibC++
2018.4.1-20180927020231-1209-ga732854
|
Functions | |
HAL_RelayHandle | HAL_InitializeRelayPort (HAL_PortHandle portHandle, HAL_Bool fwd, int32_t *status) |
Initializes a relay. More... | |
void | HAL_FreeRelayPort (HAL_RelayHandle relayPortHandle) |
Frees a relay port. More... | |
HAL_Bool | HAL_CheckRelayChannel (int32_t channel) |
Checks if a relay channel is valid. More... | |
void | HAL_SetRelay (HAL_RelayHandle relayPortHandle, HAL_Bool on, int32_t *status) |
Sets the state of a relay output. More... | |
HAL_Bool | HAL_GetRelay (HAL_RelayHandle relayPortHandle, int32_t *status) |
Gets the current state of the relay channel. More... | |
HAL_Bool HAL_CheckRelayChannel | ( | int32_t | channel | ) |
Checks if a relay channel is valid.
channel | the channel to check |
void HAL_FreeRelayPort | ( | HAL_RelayHandle | relayPortHandle | ) |
Frees a relay port.
relayPortHandle | the relay handle |
HAL_Bool HAL_GetRelay | ( | HAL_RelayHandle | relayPortHandle, |
int32_t * | status | ||
) |
Gets the current state of the relay channel.
relayPortHandle | the relay handle |
HAL_RelayHandle HAL_InitializeRelayPort | ( | HAL_PortHandle | portHandle, |
HAL_Bool | fwd, | ||
int32_t * | status | ||
) |
Initializes a relay.
Note this call will only initialize either the forward or reverse port of the relay. If you need both, you will need to initialize 2 relays.
portHandle | the port handle to initialize |
fwd | true for the forward port, false for the reverse port |
void HAL_SetRelay | ( | HAL_RelayHandle | relayPortHandle, |
HAL_Bool | on, | ||
int32_t * | status | ||
) |
Sets the state of a relay output.
relayPortHandle | the relay handle |
on | true for on, false for off |