![]() |
CCAux
2.17.0.0
CCAux API reference
|
Functions | |
EXTERN_C CCAUXDLL_API PWMOUTHANDLE CCAUXDLL_CALLING_CONV | GetPWMOut (void) |
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV | PWMOut_release (PWMOUTHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setPWMOutputChannelDutyCycle (PWMOUTHANDLE, uint8_t channel, uint8_t duty_cycle) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setPWMOutputChannelFrequency (PWMOUTHANDLE, uint8_t channel, float32_t frequency) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getPWMOutputChannelDutyCycle (PWMOUTHANDLE, uint8_t channel, uint8_t *duty_cycle) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getPWMOutputChannelFrequency (PWMOUTHANDLE, uint8_t channel, float32_t *frequency) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getPWMOutputStatus (PWMOUTHANDLE, uint8_t *status) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setPWMOutOff (PWMOUTHANDLE, uint8_t channel) |
Functions in the PWMOut class
EXTERN_C CCAUXDLL_API PWMOUTHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetPWMOut | ( | void | ) |
Factory function that creates instances of the PWMOut object.
Supported Platform(s): VC, VA, VI2
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputChannelDutyCycle | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint8_t * | duty_cycle | ||
) |
Get PWM Output channel duty cycle
Supported Platform(s): VC, VA, VI2
channel | Which channel to get value from There are two output channels, 1 or 2. |
duty_cycle | The read back duty cycle value NOTE: For low side PWM outputs, a duty cycle of 60% means 60% low, 40% high For high side PWM outputs, a duty cycle of 60% means 60% high, 40% low |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputChannelFrequency | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
float32_t * | frequency | ||
) |
Get PWM Output frequency for a channel
Supported Platform(s): VC, VA, VI2
channel | Which channel to set There are two output channels, 1 or 2. |
frequency | 0.0 - 5000.0 Hz frequency value |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputStatus | ( | PWMOUTHANDLE | , |
uint8_t * | status | ||
) |
Get PWM Output status
Supported Platform(s): VC, VA, VI2
status | Read back status value Bit 0 represents PWM Output channel 1. Bit 1 represents PWM Output channel 2. If bit is set, it means unconnected, short to ground or over temperature detected. The output will be turned off when the error occurrs. The error status remains until the output is turned on successfully. |
Example Usage:
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::PWMOut_release | ( | PWMOUTHANDLE | ) |
Delete the PWMOut object.
Supported Platform(s): VC, VA, VI2
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutOff | ( | PWMOUTHANDLE | , |
uint8_t | channel | ||
) |
Turn off a PWM Output channel. This function sets both frequency and duty cycle to 0.
Supported Platform(s): VC, VA, VI2
channel | Which channel to set |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutputChannelDutyCycle | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint8_t | duty_cycle | ||
) |
Set PWM Output Duty cycle for a channel
Supported Platform(s): VC, VA, VI2
channel | Which channel to set There are two output channels, 1 or 2. |
duty_cycle | Which duty cycle (0-100 %) to use NOTE: For low side PWM outputs, a duty cycle of 60% means 60% low, 40% high For high side PWM outputs, a duty cycle of 60% means 60% high, 40% low |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutputChannelFrequency | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
float32_t | frequency | ||
) |
Set PWM Output frequency for a channel
Supported Platform(s): VC, VA, VI2
channel | Which channel to set There are two output channels, 1 or 2. |
frequency | 0.0 - 5000.0 Hz frequency value |
Example Usage: