|
| enum class | hf_pwm_clock_source_t : uint8_t { HF_PWM_CLK_SRC_DEFAULT = 0
, HF_PWM_CLK_SRC_APB = 1
, HF_PWM_CLK_SRC_XTAL = 2
, HF_PWM_CLK_SRC_RC_FAST = 3
} |
| | ESP32 PWM clock source selection with frequency and constraint details. More...
|
| |
| enum class | hf_pwm_resolution_t : uint8_t { HF_PWM_RES_8BIT = 8
, HF_PWM_RES_10BIT = 10
, HF_PWM_RES_12BIT = 12
, HF_PWM_RES_14BIT = 14
} |
| | ESP32 PWM resolution options. More...
|
| |
| enum class | hf_pwm_mode_t : uint8_t { HF_PWM_MODE_BASIC = 0
, HF_PWM_MODE_FADE = 1
} |
| | ESP32 PWM mode configuration. More...
|
| |
| enum class | hf_pwm_fade_mode_t : uint8_t { HF_PWM_FADE_NO_WAIT = 0
, HF_PWM_FADE_WAIT_DONE = 1
} |
| | ESP32 PWM fade mode configuration. More...
|
| |
| enum class | hf_pwm_intr_type_t : uint8_t { HF_PWM_INTR_DISABLE = 0
, HF_PWM_INTR_FADE_END = 1
} |
| | ESP32 PWM interrupt type configuration. More...
|
| |
| enum class | hf_pwm_eviction_policy_t : uint8_t { STRICT_NO_EVICTION = 0
, ALLOW_EVICTION_WITH_CONSENT = 1
, ALLOW_EVICTION_NON_CRITICAL = 2
, FORCE_EVICTION = 3
} |
| | Timer eviction policy for resource management. More...
|
| |
| enum class | hf_pwm_channel_priority_t : uint8_t { PRIORITY_LOW = 0
, PRIORITY_NORMAL = 1
, PRIORITY_HIGH = 2
, PRIORITY_CRITICAL = 3
} |
| | Channel priority levels for eviction decisions. More...
|
| |
| enum class | hf_pwm_eviction_decision_t : uint8_t { DENY_EVICTION = 0
, ALLOW_EVICTION = 1
, SUGGEST_ALTERNATIVE = 2
} |
| | Eviction decision from user callback. More...
|
| |
ESP32 PWM type definitions for LEDC peripheral hardware abstraction.
This header defines essential PWM-specific types and constants for the EspPwm implementation, providing a clean abstraction over ESP-IDF LEDC peripheral capabilities across different ESP32 variants.
LEDC Peripheral Overview:
The LED Controller (LEDC) peripheral is designed to control the intensity of LEDs, but is also perfectly suited for general-purpose PWM generation. Key features:
- High Resolution: Up to 20-bit resolution on ESP32 classic, 14-bit on newer variants
- Multiple Clock Sources: APB, XTAL, RC_FAST with different frequency ranges
- Hardware Fade: Smooth transitions without CPU intervention
- Timer Sharing: Multiple channels can share timers for efficiency
- Low Power: Optimized for battery-powered applications
ESP32 Variant Differences:
Different ESP32 variants have different LEDC capabilities:
- Channels: 16 (ESP32), 8 (S2/S3), 6 (C3/C6), 4 (H2)
- Timers: 8 (ESP32), 4 (S2/S3/C3/C6), 2 (H2)
- Clock Sources: Variant-specific availability and constraints
- Author
- Nebiyu Tadesse
- Date
- 2025
- Copyright
- HardFOC