Loading...
Searching...
No Matches
pwm_config_t Struct Reference

PWM configuration structure type. More...

Detailed Description

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.
 

Field Documentation

◆ ch_numof

uint8_t pwm_config_t::ch_numof

Number of channels used by this device.

Definition at line 580 of file periph_cpu.h.

◆ gpios

const gpio_t* pwm_config_t::gpios

GPIOs used as channels of this device.

Definition at line 581 of file periph_cpu.h.

◆ group

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.

◆ timer

ledc_timer_t pwm_config_t::timer

LEDC timer used by this device.

Definition at line 579 of file periph_cpu.h.


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