WPILibC++ 2024.3.2
|
Functions | |
HAL_DutyCycleHandle | HAL_InitializeDutyCycle (HAL_Handle digitalSourceHandle, HAL_AnalogTriggerType triggerType, int32_t *status) |
Initialize a DutyCycle input. More... | |
void | HAL_FreeDutyCycle (HAL_DutyCycleHandle dutyCycleHandle) |
Free a DutyCycle. More... | |
void | HAL_SetDutyCycleSimDevice (HAL_DutyCycleHandle handle, HAL_SimDeviceHandle device) |
Indicates the duty cycle is used by a simulated device. More... | |
int32_t | HAL_GetDutyCycleFrequency (HAL_DutyCycleHandle dutyCycleHandle, int32_t *status) |
Get the frequency of the duty cycle signal. More... | |
double | HAL_GetDutyCycleOutput (HAL_DutyCycleHandle dutyCycleHandle, int32_t *status) |
Get the output ratio of the duty cycle signal. More... | |
int32_t | HAL_GetDutyCycleHighTime (HAL_DutyCycleHandle dutyCycleHandle, int32_t *status) |
Get the raw high time of the duty cycle signal. More... | |
int32_t | HAL_GetDutyCycleOutputScaleFactor (HAL_DutyCycleHandle dutyCycleHandle, int32_t *status) |
Get the scale factor of the output. More... | |
int32_t | HAL_GetDutyCycleFPGAIndex (HAL_DutyCycleHandle dutyCycleHandle, int32_t *status) |
Get the FPGA index for the DutyCycle. More... | |
void HAL_FreeDutyCycle | ( | HAL_DutyCycleHandle | dutyCycleHandle | ) |
Free a DutyCycle.
dutyCycleHandle | the duty cycle handle |
int32_t HAL_GetDutyCycleFPGAIndex | ( | HAL_DutyCycleHandle | dutyCycleHandle, |
int32_t * | status | ||
) |
Get the FPGA index for the DutyCycle.
[in] | dutyCycleHandle | the duty cycle handle |
[out] | status | Error status variable. 0 on success. |
int32_t HAL_GetDutyCycleFrequency | ( | HAL_DutyCycleHandle | dutyCycleHandle, |
int32_t * | status | ||
) |
Get the frequency of the duty cycle signal.
[in] | dutyCycleHandle | the duty cycle handle |
[out] | status | Error status variable. 0 on success. |
int32_t HAL_GetDutyCycleHighTime | ( | HAL_DutyCycleHandle | dutyCycleHandle, |
int32_t * | status | ||
) |
Get the raw high time of the duty cycle signal.
[in] | dutyCycleHandle | the duty cycle handle |
[out] | status | Error status variable. 0 on success. |
double HAL_GetDutyCycleOutput | ( | HAL_DutyCycleHandle | dutyCycleHandle, |
int32_t * | status | ||
) |
Get the output ratio of the duty cycle signal.
0 means always low, 1 means always high.
[in] | dutyCycleHandle | the duty cycle handle |
[out] | status | Error status variable. 0 on success. |
int32_t HAL_GetDutyCycleOutputScaleFactor | ( | HAL_DutyCycleHandle | dutyCycleHandle, |
int32_t * | status | ||
) |
Get the scale factor of the output.
An output equal to this value is always high, and then linearly scales down to 0. Divide a raw result by this in order to get the percentage between 0 and 1. Used by DMA.
[in] | dutyCycleHandle | the duty cycle handle |
[out] | status | Error status variable. 0 on success. |
HAL_DutyCycleHandle HAL_InitializeDutyCycle | ( | HAL_Handle | digitalSourceHandle, |
HAL_AnalogTriggerType | triggerType, | ||
int32_t * | status | ||
) |
Initialize a DutyCycle input.
[in] | digitalSourceHandle | the digital source to use (either a HAL_DigitalHandle or a HAL_AnalogTriggerHandle) |
[in] | triggerType | the analog trigger type of the source if it is an analog trigger |
[out] | status | Error status variable. 0 on success. |
void HAL_SetDutyCycleSimDevice | ( | HAL_DutyCycleHandle | handle, |
HAL_SimDeviceHandle | device | ||
) |
Indicates the duty cycle is used by a simulated device.
handle | the duty cycle handle |
device | simulated device handle |