EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #337 background imageLoading...
Page #337 background image
Chapter 2. API Reference
Header File
components/hal/include/hal/ledc_types.h
Structures
struct ledc_channel_config_t
Configuration parameters of LEDC channel for ledc_channel_config function.
Public Members
int gpio_num
the LEDC output gpio_num, if you want to use gpio16, gpio_num = 16
ledc_mode_t speed_mode
LEDC speed speed_mode, high-speed mode or low-speed mode
ledc_channel_t channel
LEDC channel (0 - 7)
ledc_intr_type_t intr_type
configure interrupt, Fade interrupt enable or Fade interrupt disable
ledc_timer_t timer_sel
Select the timer source of channel (0 - 3)
uint32_t duty
LEDC channel duty, the range of duty setting is [0, (2**duty_resolution)]
int hpoint
LEDC channel hpoint value, the max value is 0xfff
unsigned int output_invert : 1
Enable (1) or disable (0) gpio output invert
struct ledc_channel_config_t::[anonymous] flags
LEDC flags
struct ledc_timer_config_t
Configuration parameters of LEDC Timer timer for ledc_timer_config function.
Public Members
ledc_mode_t speed_mode
LEDC speed speed_mode, high-speed mode or low-speed mode
ledc_timer_bit_t duty_resolution
LEDC channel duty resolution
ledc_timer_bit_t bit_num
Deprecated in ESP-IDF 3.0. This is an alias to duty_resolutionfor backward compatibility with
ESP-IDF 2.1
ledc_timer_t timer_num
The timer source of channel (0 - 3)
uint32_t freq_hz
LEDC timer frequency (Hz)
ledc_clk_cfg_t clk_cfg
Configure LEDC source clock. For low speed channels and high speed channels, you can specify the
source clock using LEDC_USE_REF_TICK, LEDC_USE_APB_CLK or LEDC_AUTO_CLK. For low
speed channels, you can also specify the source clock using LEDC_USE_RTC8M_CLK, in this case, all
low speed channels source clock must be RTC8M_CLK
Espressif Systems 326
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish