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 | module |
LEDC module identifier. | |
ledc_mode_t | group |
LEDC channel group used (low/high speed) | |
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. | |