CCAux
2.20.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, uint16_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, uint16_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, uint16_t *status) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getPWMOutputStatus2 (PWMOUTHANDLE, uint8_t channel, uint16_t *status) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setPWMOutOff (PWMOUTHANDLE, uint8_t channel) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getActiveIomcu (PWMOUTHANDLE, uint8_t *ioindex) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setActiveIomcu (PWMOUTHANDLE, uint8_t ioindex) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_getPWMOutputPU (PWMOUTHANDLE, uint8_t channel, uint16_t *status) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | PWMOut_setPWMOutputPU (PWMOUTHANDLE, uint8_t channel, uint16_t status) |
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): Yukon, V510, V710
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getActiveIomcu | ( | PWMOUTHANDLE | , |
uint8_t * | ioindex | ||
) |
Get active io mcu number
Supported Platform(s): Yukon, V510, V710
ioindex | Io mcu number, valid values are 1-4. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputChannelDutyCycle | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint16_t * | duty_cycle | ||
) |
Get current PWM output duty cycle
Supported Platform(s): Yukon, V510, V710
channel | Channel to get value from. Numbering starts from 1. |
duty_cycle | Current duty cycle value (0-4095) that corresponds to 0-100%. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputChannelFrequency | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
float32_t * | frequency | ||
) |
Get current PWM output frequency
Supported Platform(s): Yukon, V510, V710
channel | Channel to get value from. Numbering starts from 1. |
frequency | Current frequency in Hz (1.0 - 5000Hz) |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputPU | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint16_t * | status | ||
) |
Get pull up resistor status used for open load detection
Supported Platform(s): Yukon, V510, V710
channel | Channel. Numbering starts from 1. |
status | Status of the pull up resistor for the selected channel. Inactive = 0 Active = 1 |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputStatus | ( | PWMOUTHANDLE | , |
uint16_t * | status | ||
) |
Get PWM Output status for all outputs at once
Supported Platform(s): Yukon, V510, V710
status | The current pwm output status as a bit mask where each channel is represented by one bit. Bit 0 represents PWM output channel 1, Bit 1 represents PWM output channel 2 and so on. If bit is set, it means an error is detected. The output will be turned off when an error is detected. The error status remains until the output is turned off manually or restarted. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_getPWMOutputStatus2 | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint16_t * | status | ||
) |
Get PWM output status details
Supported Platform(s): Yukon, V510, V710
channel | Channel to get status for. Numbering starts from 1. |
status | Output channel status details. Note that not all outputs are able to detect all errors. The error status remains until the output is turned off manually or restarted. OK (no error) = 0 Short to ground = 1 Short to battery = 2 Over current = 4 Over temperature = 8 Open load = 16 Generic error = 32 |
Example Usage:
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::PWMOut_release | ( | PWMOUTHANDLE | ) |
Release the PWMOut object.
Supported Platform(s): Yukon, V510, V710
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setActiveIomcu | ( | PWMOUTHANDLE | , |
uint8_t | ioindex | ||
) |
Set active io mcu
Supported Platform(s): Yukon, V510, V710
ioindex | Io mcu number, valid values are 1-4. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutOff | ( | PWMOUTHANDLE | , |
uint8_t | channel | ||
) |
Turn off PWM output This function sets duty cycle to 0 and frequency to 1 Hz.
Supported Platform(s): Yukon, V510, V710
channel | Channel to turn off. Numbering starts from 1. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutputChannelDutyCycle | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint16_t | duty_cycle | ||
) |
Set PWM output duty cycle
Supported Platform(s): Yukon, V510, V710
channel | Channel to set. Numbering starts from 1. |
duty_cycle | Duty cycle value (0-4095) that corresponds to 0-100%. |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutputChannelFrequency | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
float32_t | frequency | ||
) |
Set PWM output frequency
Supported Platform(s): Yukon, V510, V710
channel | Channel to set. Numbering starts from 1. |
frequency | Frequency (1.0 - 5000.0Hz) |
Example Usage:
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::PWMOut_setPWMOutputPU | ( | PWMOUTHANDLE | , |
uint8_t | channel, | ||
uint16_t | status | ||
) |
Activate or deactivate pull up resistor used for open load detection
Supported Platform(s): Yukon, V510, V710
channel | Channel. Numbering starts from 1. |
status | Status to set. Inactive = 0 Active = 1 |
Example Usage: