ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::ledc Namespace Reference

Data Structures

class  LEDCOutput
 

Functions

uint32_t full_scale_ticks (uint8_t bit_depth, uint8_t fractional_bits)
 Ticks for a constant high output, one past the highest PWM level.
 
uint32_t duty_to_ticks (float state, uint8_t bit_depth, uint8_t fractional_bits)
 Convert a 0-1 duty to timer ticks, with fractional_bits extra bits for dithering.
 
 ESPHOME_LOG_TAG (TAG, "ledc.output")
 
ledc_mode_t get_speed_mode (uint8_t channel)
 
float ledc_max_frequency_for_bit_depth (uint8_t bit_depth)
 
float ledc_min_frequency_for_bit_depth (uint8_t bit_depth, bool low_frequency)
 
optional< uint8_t > ledc_bit_depth_for_frequency (float frequency)
 
esp_err_t configure_timer_frequency (ledc_mode_t speed_mode, ledc_timer_t timer_num, ledc_channel_t chan_num, uint8_t channel, uint8_t &bit_depth, float frequency)
 
constexpr int ledc_angle_to_htop (float angle, uint8_t bit_depth)
 

Variables

uint8_t next_ledc_channel = 0
 

Function Documentation

◆ configure_timer_frequency()

esp_err_t esphome::ledc::configure_timer_frequency ( ledc_mode_t speed_mode,
ledc_timer_t timer_num,
ledc_channel_t chan_num,
uint8_t channel,
uint8_t & bit_depth,
float frequency )

Definition at line 107 of file ledc_output.cpp.

◆ duty_to_ticks()

uint32_t esphome::ledc::duty_to_ticks ( float state,
uint8_t bit_depth,
uint8_t fractional_bits )
inline

Convert a 0-1 duty to timer ticks, with fractional_bits extra bits for dithering.

Definition at line 14 of file ledc_duty.h.

◆ ESPHOME_LOG_TAG()

esphome::ledc::ESPHOME_LOG_TAG ( TAG ,
"ledc.output"  )

◆ full_scale_ticks()

uint32_t esphome::ledc::full_scale_ticks ( uint8_t bit_depth,
uint8_t fractional_bits )
inline

Ticks for a constant high output, one past the highest PWM level.

Definition at line 9 of file ledc_duty.h.

◆ get_speed_mode()

ledc_mode_t esphome::ledc::get_speed_mode ( uint8_t channel)
inline

Definition at line 32 of file ledc_output.cpp.

◆ ledc_angle_to_htop()

int esphome::ledc::ledc_angle_to_htop ( float angle,
uint8_t bit_depth )
constexpr

Definition at line 141 of file ledc_output.cpp.

◆ ledc_bit_depth_for_frequency()

optional< uint8_t > esphome::ledc::ledc_bit_depth_for_frequency ( float frequency)

Definition at line 94 of file ledc_output.cpp.

◆ ledc_max_frequency_for_bit_depth()

float esphome::ledc::ledc_max_frequency_for_bit_depth ( uint8_t bit_depth)

Definition at line 85 of file ledc_output.cpp.

◆ ledc_min_frequency_for_bit_depth()

float esphome::ledc::ledc_min_frequency_for_bit_depth ( uint8_t bit_depth,
bool low_frequency )

Definition at line 89 of file ledc_output.cpp.

Variable Documentation

◆ next_ledc_channel

uint8_t esphome::ledc::next_ledc_channel = 0

Definition at line 333 of file ledc_output.cpp.