rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Fields
PWMConfig Struct Reference

Type of a PWM driver configuration structure. More...

#include <hal_pwm_lld.h>

Collaboration diagram for PWMConfig:
Collaboration graph
[legend]

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.
 
uint32_t cr2
 TIM CR2 register initialization data.
 
uint32_t dier
 TIM DIER register initialization data.
 

Detailed Description

Type of a PWM driver configuration structure.

Definition at line 158 of file hal_pwm_lld.h.

Field Documentation

◆ callback

pwmcallback_t PWMConfig::callback

Periodic callback pointer.

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

Definition at line 176 of file hal_pwm_lld.h.

Referenced by pwm_lld_serve_interrupt().

◆ channels

PWMChannelConfig PWMConfig::channels[PWM_CHANNELS]

Channels configurations.

Definition at line 180 of file hal_pwm_lld.h.

Referenced by pwm_lld_enable_channel(), and pwm_lld_serve_interrupt().

◆ cr2

uint32_t PWMConfig::cr2

TIM CR2 register initialization data.

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

Definition at line 187 of file hal_pwm_lld.h.

◆ dier

uint32_t PWMConfig::dier

TIM DIER register initialization data.

Note
The value of this field should normally be equal to zero.
Only the DMA-related bits can be specified in this field.

Definition at line 193 of file hal_pwm_lld.h.

◆ frequency

uint32_t PWMConfig::frequency

Timer clock in Hz.

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

Definition at line 164 of file hal_pwm_lld.h.

Referenced by initWS2812(), and pwm_lld_start().

◆ period

pwmcnt_t PWMConfig::period

PWM period in ticks.

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

Definition at line 170 of file hal_pwm_lld.h.


The documentation for this struct was generated from the following file: