![]() |
WPILibC++ 2027.0.0-alpha-2
|
Functions | |
HAL_DigitalHandle | HAL_InitializePWMPort (int32_t channel, const char *allocationLocation, int32_t *status) |
Initializes a PWM port. | |
void | HAL_FreePWMPort (HAL_DigitalHandle pwmPortHandle) |
Frees a PWM port. | |
HAL_Bool | HAL_CheckPWMChannel (int32_t channel) |
Checks if a pwm channel is valid. | |
void | HAL_SetPWMSimDevice (HAL_DigitalHandle handle, HAL_SimDeviceHandle device) |
Indicates the pwm is used by a simulated device. | |
void | HAL_SetPWMPulseTimeMicroseconds (HAL_DigitalHandle pwmPortHandle, int32_t microsecondPulseTime, int32_t *status) |
Sets a PWM channel to the desired pulse width in microseconds. | |
int32_t | HAL_GetPWMPulseTimeMicroseconds (HAL_DigitalHandle pwmPortHandle, int32_t *status) |
Gets the current microsecond pulse time from a PWM channel. | |
void | HAL_SetPWMOutputPeriod (HAL_DigitalHandle pwmPortHandle, int32_t period, int32_t *status) |
Sets the PWM output period. | |
HAL_Bool HAL_CheckPWMChannel | ( | int32_t | channel | ) |
Checks if a pwm channel is valid.
channel | the channel to check |
void HAL_FreePWMPort | ( | HAL_DigitalHandle | pwmPortHandle | ) |
Frees a PWM port.
[in] | pwmPortHandle | the pwm handle |
int32_t HAL_GetPWMPulseTimeMicroseconds | ( | HAL_DigitalHandle | pwmPortHandle, |
int32_t * | status ) |
Gets the current microsecond pulse time from a PWM channel.
[in] | pwmPortHandle | the PWM handle |
[out] | status | Error status variable. 0 on success. |
HAL_DigitalHandle HAL_InitializePWMPort | ( | int32_t | channel, |
const char * | allocationLocation, | ||
int32_t * | status ) |
Initializes a PWM port.
[in] | channel | the smartio channel |
[in] | allocationLocation | the location where the allocation is occurring (can be null) |
[out] | status | Error status variable. 0 on success. |
void HAL_SetPWMOutputPeriod | ( | HAL_DigitalHandle | pwmPortHandle, |
int32_t | period, | ||
int32_t * | status ) |
Sets the PWM output period.
[in] | pwmPortHandle | the PWM handle. |
[in] | period | 0 for 5ms, 1 or 2 for 10ms, 3 for 20ms |
[out] | status | Error status variable. 0 on success. |
void HAL_SetPWMPulseTimeMicroseconds | ( | HAL_DigitalHandle | pwmPortHandle, |
int32_t | microsecondPulseTime, | ||
int32_t * | status ) |
Sets a PWM channel to the desired pulse width in microseconds.
[in] | pwmPortHandle | the PWM handle |
[in] | microsecondPulseTime | the PWM value to set |
[out] | status | Error status variable. 0 on success. |
void HAL_SetPWMSimDevice | ( | HAL_DigitalHandle | handle, |
HAL_SimDeviceHandle | device ) |
Indicates the pwm is used by a simulated device.
handle | the pwm handle |
device | simulated device handle |