ChibiOS/RT
2.5.1
PWMConfig Struct Reference

Detailed Description

PWM driver configuration structure.

Definition at line 295 of file pwm_lld.h.

#include <pwm_lld.h>

Collaboration diagram for PWMConfig:

Data Fields

uint32_t frequency
 Timer clock in Hz.
pwmcnt_t period
 PWM period in ticks.
pwmcallback_t callback
 Periodic callback pointer.
PWMChannelConfig channels [PWM_CHANNELS]
 Channels configurations.
uint16_t cr2
 TIM CR2 register initialization data.
uint16_t bdtr
 TIM BDTR (break & dead-time) register initialization data.

Field Documentation

Timer clock in Hz.

Note:
The low level can use assertions in order to catch invalid frequency specifications.

Definition at line 301 of file pwm_lld.h.

Referenced by pwm_lld_start().

PWM period in ticks.

Note:
The low level can use assertions in order to catch invalid period specifications.

Definition at line 307 of file pwm_lld.h.

Referenced by pwmStart().

Periodic callback pointer.

Note:
This callback is invoked on PWM counter reset. If set to NULL then the callback is disabled.

Definition at line 313 of file pwm_lld.h.

Referenced by pwm_lld_start().

Channels configurations.

Definition at line 317 of file pwm_lld.h.

Referenced by pwm_lld_enable_channel(), and pwm_lld_start().

uint16_t PWMConfig::cr2

TIM CR2 register initialization data.

Note:
The value of this field should normally be equal to zero.

Definition at line 323 of file pwm_lld.h.

Referenced by pwm_lld_start().

uint16_t PWMConfig::bdtr

TIM BDTR (break & dead-time) register initialization data.

Note:
The value of this field should normally be equal to zero.

Definition at line 329 of file pwm_lld.h.

Referenced by pwm_lld_start().