|
Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
ADC driver requirements validator. More...
#include "method_detection.hpp"Go to the source code of this file.
Classes | |
| class | sbl::validation::AdcDriverRequirements< AdcDriver > |
| ADC driver requirements validator. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::validation |
| Compile-time validation infrastructure. | |
Variables | |
| template<typename AdcDriver > | |
| constexpr bool | sbl::validation::adc_driver_valid = AdcDriverRequirements<AdcDriver>::validate() |
| Helper to validate an ADC driver implementation. | |
ADC driver requirements validator.
Validates that ADC drivers provide required functionality using the method detection system. This is the core ADC contract enforcement for Sound Byte Libs drivers.
Every Sound Byte Libs ADC driver MUST implement these methods:
init() - Initialize ADC peripheralconfigure_channel(const AdcHandle&, SampleTime) - Configure channelstart_conversion(const AdcHandle&) - Start single conversionis_conversion_complete() -> bool - Check if conversion doneread_raw() -> uint16_t - Read conversion resultresolution_bits() -> uint8_t - Get ADC resolution (constexpr)Add validation at the bottom of driver adc.hpp:
Definition in file adc_requirements.hpp.