CMSIS PWM Driver Data Structures Type Documentation

 

_PWM_CFG_t

 

Location: Driver_PWM.h:125

 

PWM Driver configuration.

 

Data Fields

Type Name Description

uint32_t

period

Period value

uint32_t

high_cycle

High cycle value.

uint32_t

dithering

Dithering value

uint32_t

offset

Offset value

 

_DRIVER_PWM_t

 

Location: Driver_PWM.h:136

 

Access structure of the PWM Driver.

 

Data Fields

Type Name Description

ARM_DRIVER_VERSION(*

GetVersion)(void)

Pointer to PWM_GetVersion : Get driver version.

int32_t(*

Initialize)(void)

Pointer to PWM_Initialize : Initialize PWM driver.

int32_t(*

Configure)(PWM_SEL_t sel, const PWM_CFG_t *pwm_cfg)

Pointer to PWM_Configure : Configure PWM common setting.

int32_t(*

SelectClock)(uint8_t clock_src, uint8_t slowclk_prescale)

Pointer to PWM_SelectClock : Configure PWM clock source.

int32_t(*

Reset)(PWM_SEL_t sel)

Pointer to PWM_Reset : Reset PWM

int32_t(*

SetDithering)(PWM_SEL_t sel, uint8_t dithering)

Pointer to PWM_SetDithering : Add dithering to PWM channel.

int32_t(*

SetPeriod)(PWM_SEL_t sel, uint16_t period)

Pointer to PWM_SetPeriod : Set the period.

int32_t(*

SetDutyCycle)(PWM_SEL_t sel, uint8_t duty_cycle)

Pointer to PWM_SetDutyCycle : Set the duty cycle (percentage).

int32_t(*

SetHighPeriod)(PWM_SEL_t sel, uint16_t high_period)

Pointer to PWM_SetHighPeriod : Set the high cycle period.

int32_t(*

SetOffset)(PWM_SEL_t sel, uint16_t offset)

Pointer to PWM_SetOffset : Set offset between PWM.

int32_t(*

Start)(PWM_SEL_t sel)

Pointer to PWM_Start : Start the PWM.

int32_t(*

Stop)(PWM_SEL_t sel)

Pointer to PWM_Stop : Stop the PWM.