AIROC™ BTSDK v4.9 - Documentation | ||||
Define functions to access PWM peripheral. More...
Macros | |
#define | pwmIdToMask(id) (1<<id) |
Defines the standard PWM driver. More... | |
Enumerations | |
enum | { PWM0 = 0, PWM1 = 1, PWM2 = 2, PWM3 = 3, MAX_PWMS = 4 } |
PWM HW block has 4 PWM channels each with its own 10 bit counter. More... | |
enum | PwmClockType { LHL_CLK, PMU_CLK } |
Clock used for PWM. When LHL_CLK is set, 128 KHz is used. When PMU_CLK is set, 1 MHz or 8 MHz. More... | |
enum | { PWM_CHANNEL_MASK = 0x0F } |
enum | { PWM0_OUTPUT_ENABLE_P26 = GPIO_OUTPUT_ENABLE, PWM1_OUTPUT_ENABLE_P27 = GPIO_OUTPUT_ENABLE, PWM2_OUTPUT_ENABLE_P28 = GPIO_OUTPUT_ENABLE, PWM2_OUTPUT_ENABLE_P6 = (GPIO_OUTPUT_ENABLE | (1 << 4)), PWM2_OUTPUT_ENABLE_P14 = (2 << 4), PWM3_OUTPUT_ENABLE_P29 = GPIO_OUTPUT_ENABLE, PWM3_OUTPUT_ENABLE_P13 = (2 << 4) } |
Functions | |
BOOL32 | pwm_start (UINT8 id, PwmClockType clk, UINT32 toggleCount, UINT32 InitCount) |
Start a PWM. More... | |
BOOL32 | pwm_transitionToSubstituteValues (UINT8 id, UINT32 toggleCount, UINT32 InitCount) |
Transitions to another set of pulse modulation values. More... | |
BOOL32 | pwm_startWithAlternateValues (UINT8 id, PwmClockType clk, UINT32 toggleCount, UINT32 InitCount, BOOL32 invert) |
Alternate between another set of pulse modulation values and current values. More... | |
UINT32 | pwm_getToggleCount (UINT8 id) |
Get the toggleCount of the PWM channel. More... | |
UINT32 | pwm_getInitValue (UINT8 id) |
Get the Init Value of the PWM channel. More... | |
BOOL32 | pwm_setToggleCount (UINT8 id, UINT32 toggleCount) |
Set toggleCount. More... | |
void | pwm_setInversion (UINT8 id, BOOL32 invert) |
Set if output should be inverted or not. More... | |
BOOL32 | pwm_setValues (UINT8 id, UINT32 toggleCount, UINT32 initCount, PwmClockType clk, BOOL32 invert) |
Set the values of the given PWM channel. More... | |
void | pwm_setClock (UINT8 id, PwmClockType clk) |
Set the clock. More... | |
void | pwm_setInitValue (UINT8 id, UINT32 InitCount) |
Set the Initial Value of the Counter. More... | |
void | pwm_resetInternalCount (UINT32 mask) |
Reset the internal counter. Internal, not for application use. | |
void | pwm_enableChannel (UINT32 mask) |
Enable the given PWM channels. More... | |
void | pwm_disableChannel (UINT32 mask) |
Disable the given PWM channels. More... | |
void | pwm_setReset (UINT32 mask, BOOL32 resetEnable) |
Reset the PWM channels. More... | |
Define functions to access PWM peripheral.