![]() |
WPILibC++ 2027.0.0-alpha-2
|
Functions | |
HAL_DigitalHandle | HAL_InitializeDIOPort (int32_t channel, HAL_Bool input, const char *allocationLocation, int32_t *status) |
Creates a new instance of a digital port. | |
HAL_Bool | HAL_CheckDIOChannel (int32_t channel) |
Checks if a DIO channel is valid. | |
void | HAL_FreeDIOPort (HAL_DigitalHandle dioPortHandle) |
Frees a DIO port. | |
void | HAL_SetDIOSimDevice (HAL_DigitalHandle handle, HAL_SimDeviceHandle device) |
Indicates the DIO channel is used by a simulated device. | |
HAL_DigitalPWMHandle | HAL_AllocateDigitalPWM (int32_t *status) |
Allocates a DO PWM Generator. | |
void | HAL_FreeDigitalPWM (HAL_DigitalPWMHandle pwmGenerator) |
Frees the resource associated with a DO PWM generator. | |
void | HAL_SetDigitalPWMRate (double rate, int32_t *status) |
Changes the frequency of the DO PWM generator. | |
void | HAL_SetDigitalPWMDutyCycle (HAL_DigitalPWMHandle pwmGenerator, double dutyCycle, int32_t *status) |
Configures the duty-cycle of the PWM generator. | |
void | HAL_SetDigitalPWMPPS (HAL_DigitalPWMHandle pwmGenerator, double dutyCycle, int32_t *status) |
Configures the digital PWM to be a PPS signal with specified duty cycle. | |
void | HAL_SetDigitalPWMOutputChannel (HAL_DigitalPWMHandle pwmGenerator, int32_t channel, int32_t *status) |
Configures which DO channel the PWM signal is output on. | |
void | HAL_SetDIO (HAL_DigitalHandle dioPortHandle, HAL_Bool value, int32_t *status) |
Writes a digital value to a DIO channel. | |
void | HAL_SetDIODirection (HAL_DigitalHandle dioPortHandle, HAL_Bool input, int32_t *status) |
Sets the direction of a DIO channel. | |
HAL_Bool | HAL_GetDIO (HAL_DigitalHandle dioPortHandle, int32_t *status) |
Reads a digital value from a DIO channel. | |
HAL_Bool | HAL_GetDIODirection (HAL_DigitalHandle dioPortHandle, int32_t *status) |
Reads the direction of a DIO channel. | |
void | HAL_Pulse (HAL_DigitalHandle dioPortHandle, double pulseLength, int32_t *status) |
Generates a single digital pulse. | |
void | HAL_PulseMultiple (uint32_t channelMask, double pulseLength, int32_t *status) |
Generates a single digital pulse on multiple channels. | |
HAL_Bool | HAL_IsPulsing (HAL_DigitalHandle dioPortHandle, int32_t *status) |
Checks a DIO line to see if it is currently generating a pulse. | |
HAL_Bool | HAL_IsAnyPulsing (int32_t *status) |
Checks if any DIO line is currently generating a pulse. | |
HAL_DigitalPWMHandle HAL_AllocateDigitalPWM | ( | int32_t * | status | ) |
Allocates a DO PWM Generator.
[out] | status | Error status variable. 0 on success. |
HAL_Bool HAL_CheckDIOChannel | ( | int32_t | channel | ) |
Checks if a DIO channel is valid.
channel | the channel number to check |
void HAL_FreeDigitalPWM | ( | HAL_DigitalPWMHandle | pwmGenerator | ) |
Frees the resource associated with a DO PWM generator.
[in] | pwmGenerator | the digital PWM handle |
void HAL_FreeDIOPort | ( | HAL_DigitalHandle | dioPortHandle | ) |
Frees a DIO port.
dioPortHandle | the DIO channel handle |
HAL_Bool HAL_GetDIO | ( | HAL_DigitalHandle | dioPortHandle, |
int32_t * | status ) |
Reads a digital value from a DIO channel.
[in] | dioPortHandle | the digital port handle |
[out] | status | Error status variable. 0 on success. |
HAL_Bool HAL_GetDIODirection | ( | HAL_DigitalHandle | dioPortHandle, |
int32_t * | status ) |
Reads the direction of a DIO channel.
[in] | dioPortHandle | the digital port handle |
[out] | status | Error status variable. 0 on success. |
HAL_DigitalHandle HAL_InitializeDIOPort | ( | int32_t | channel, |
HAL_Bool | input, | ||
const char * | allocationLocation, | ||
int32_t * | status ) |
Creates a new instance of a digital port.
[in] | channel | the smartio channel |
[in] | input | true for input, false for output |
[in] | allocationLocation | the location where the allocation is occurring (can be null) |
[out] | status | Error status variable. 0 on success. |
HAL_Bool HAL_IsAnyPulsing | ( | int32_t * | status | ) |
Checks if any DIO line is currently generating a pulse.
[out] | status | Error status variable. 0 on success. |
HAL_Bool HAL_IsPulsing | ( | HAL_DigitalHandle | dioPortHandle, |
int32_t * | status ) |
Checks a DIO line to see if it is currently generating a pulse.
[in] | dioPortHandle | the digital port handle |
[out] | status | Error status variable. 0 on success. |
void HAL_Pulse | ( | HAL_DigitalHandle | dioPortHandle, |
double | pulseLength, | ||
int32_t * | status ) |
Generates a single digital pulse.
Write a pulse to the specified digital output channel. There can only be a single pulse going at any time.
[in] | dioPortHandle | the digital port handle |
[in] | pulseLength | the active length of the pulse in seconds |
[out] | status | Error status variable. 0 on success. |
void HAL_PulseMultiple | ( | uint32_t | channelMask, |
double | pulseLength, | ||
int32_t * | status ) |
Generates a single digital pulse on multiple channels.
Write a pulse to the channels enabled by the mask. There can only be a single pulse going at any time.
[in] | channelMask | the channel mask |
[in] | pulseLength | the active length of the pulse in seconds |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDigitalPWMDutyCycle | ( | HAL_DigitalPWMHandle | pwmGenerator, |
double | dutyCycle, | ||
int32_t * | status ) |
Configures the duty-cycle of the PWM generator.
[in] | pwmGenerator | the digital PWM handle |
[in] | dutyCycle | the percent duty cycle to output [0..1] |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDigitalPWMOutputChannel | ( | HAL_DigitalPWMHandle | pwmGenerator, |
int32_t | channel, | ||
int32_t * | status ) |
Configures which DO channel the PWM signal is output on.
[in] | pwmGenerator | the digital PWM handle |
[in] | channel | the channel to output on |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDigitalPWMPPS | ( | HAL_DigitalPWMHandle | pwmGenerator, |
double | dutyCycle, | ||
int32_t * | status ) |
Configures the digital PWM to be a PPS signal with specified duty cycle.
[in] | pwmGenerator | the digital PWM handle |
[in] | dutyCycle | the percent duty cycle to output [0..1] |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDigitalPWMRate | ( | double | rate, |
int32_t * | status ) |
Changes the frequency of the DO PWM generator.
The valid range is from 0.6 Hz to 19 kHz.
The frequency resolution is logarithmic.
[in] | rate | the frequency to output all digital output PWM signals |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDIO | ( | HAL_DigitalHandle | dioPortHandle, |
HAL_Bool | value, | ||
int32_t * | status ) |
Writes a digital value to a DIO channel.
[in] | dioPortHandle | the digital port handle |
[in] | value | the state to set the digital channel (if it is configured as an output) |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDIODirection | ( | HAL_DigitalHandle | dioPortHandle, |
HAL_Bool | input, | ||
int32_t * | status ) |
Sets the direction of a DIO channel.
[in] | dioPortHandle | the digital port handle |
[in] | input | true to set input, false for output |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDIOSimDevice | ( | HAL_DigitalHandle | handle, |
HAL_SimDeviceHandle | device ) |
Indicates the DIO channel is used by a simulated device.
handle | the DIO channel handle |
device | simulated device handle |