PWM configuration structure type. More...
PWM configuration structure type.
The implementation of the PWM peripheral driver uses the LED PWM Controller (LEDC) module of the ESP32x SoC. The LEDC module has up to 2 channel groups with 6 or 8 channels each, which can use one of 4 timers.
Based on these maximum 2 channel groups with 6 or 8 channels each and 4 timers, up to 4 PWM devices can be configured in RIOT. The configuration structure defines static parameters for each virtual PWM device, i.e. the channel group used, the timer used, the number of channels used and the GPIOs assigned to the channels. The number of channels used by a PWM device corresponds to the number of GPIOs assigned to this PWM device.
Definition at line 576 of file periph_cpu.h.
#include <periph_cpu.h>
Data Fields | |
uint8_t ledc_mode_t | group |
< LEDC module identifier | |
ledc_timer_t | timer |
LEDC timer used by this device. | |
uint8_t | ch_numof |
Number of channels used by this device. | |
const gpio_t * | gpios |
GPIOs used as channels of this device. | |
uint8_t pwm_config_t::ch_numof |
Number of channels used by this device.
Definition at line 580 of file periph_cpu.h.
const gpio_t* pwm_config_t::gpios |
GPIOs used as channels of this device.
Definition at line 581 of file periph_cpu.h.
uint8_t ledc_mode_t pwm_config_t::group |
< LEDC module identifier
LEDC channel group used (low/high speed)
Definition at line 578 of file periph_cpu.h.
ledc_timer_t pwm_config_t::timer |
LEDC timer used by this device.
Definition at line 579 of file periph_cpu.h.