HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
EspPwm.h File Reference

ESP32C6 LEDC (PWM) controller implementation for the HardFOC system. More...

#include "BasePwm.h"
#include "PlatformMutex.h"
#include "utils/EspTypes_PWM.h"
#include <array>
#include <atomic>
#include <string>
Include dependency graph for EspPwm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EspPwm
 ESP32 PWM implementation using LEDC peripheral with comprehensive ESP32 variant support. More...
 
struct  EspPwm::ChannelState
 Internal channel state with per-channel callback support. More...
 
struct  EspPwm::TimerState
 Internal timer state. More...
 
struct  EspPwm::ComplementaryPair
 Complementary output pair configuration. More...
 
struct  EspPwm::ValidationContext
 Simple validation context for frequency/resolution validation. More...
 
struct  EspPwm::ValidationResult
 Comprehensive validation result with detailed information. More...
 

Detailed Description

ESP32C6 LEDC (PWM) controller implementation for the HardFOC system.

This header provides a comprehensive PWM implementation for ESP32C6 using the LEDC (LED Controller) peripheral which provides high-resolution PWM generation. The implementation supports multiple channels, configurable frequency and resolution, complementary outputs with deadtime, hardware fade support, and interrupt-driven period callbacks.

Author
Nebiyu Tadesse
Date
2025
Note
Features include up to 8 PWM channels using LEDC peripheral, configurable frequency and resolution per channel, support for complementary outputs with deadtime, hardware fade support, interrupt-driven period callbacks, and multiple timer groups for independent frequency control.
This implementation follows the lazy initialization pattern established in other ESP32 modules (EspAdc, EspGpio, etc.).