ESP32 ADC implementation for the HardFOC system.
This file contains the complete implementation of the ESP32 ADC driver that extends the BaseAdc abstract class. It provides comprehensive support for all ESP32 ADC features including one-shot mode, continuous DMA operation, digital filtering, threshold monitoring, and robust error handling.
Key features implemented:
- One-shot and continuous ADC modes using ESP-IDF v5.5+ APIs
- Hardware calibration for accurate voltage measurements
- Digital IIR filters for noise reduction
- Threshold monitors with interrupt callbacks
- Multi-channel support with proper GPIO mapping
- Thread-safe operations with comprehensive resource management
- Detailed error handling, diagnostics, and statistics tracking
- Multi-variant support for all ESP32 variants (C6, Classic, S2, S3, C3, C2, H2)
- Author
- Nebiyu Tadesse
- Date
- 2025
- Copyright
- HardFOC
- Note
- ESP32 variant-specific implementation using ESP-IDF v5.5+
-
Each EspAdc instance represents a single ADC unit
-
Higher-level applications should instantiate multiple EspAdc objects for multi-unit boards