|
| | StmAdc (const hf_stm32_adc_config_t &config) noexcept |
| | Construct with full configuration.
|
| |
| | StmAdc (ADC_HandleTypeDef *hal_handle, hf_u8_t num_channels=1) noexcept |
| | Construct from raw HAL handle with defaults.
|
| |
| | ~StmAdc () noexcept override |
| |
| bool | Initialize () noexcept override |
| | Initializes the ADC peripheral (must be implemented by derived classes).
|
| |
| bool | Deinitialize () noexcept override |
| | Deinitializes the ADC peripheral (must be implemented by derived classes)..
|
| |
| hf_u8_t | GetMaxChannels () const noexcept override |
| | Get the maximum number of channels supported by this ADC.
|
| |
| bool | IsChannelAvailable (hf_channel_id_t channel_id) const noexcept override |
| | Check if a specific channel is available.
|
| |
| hf_adc_err_t | ReadChannelV (hf_channel_id_t channel_id, float &channel_reading_v, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| | Read channel voltage.
|
| |
| hf_adc_err_t | ReadChannelCount (hf_channel_id_t channel_id, hf_u32_t &channel_reading_count, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| | Read channel count (raw ADC value).
|
| |
| hf_adc_err_t | ReadChannel (hf_channel_id_t channel_id, hf_u32_t &channel_reading_count, float &channel_reading_v, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| | Read both channel count and voltage.
|
| |
| ADC_HandleTypeDef * | GetHalHandle () const noexcept |
| | Get the underlying HAL ADC handle.
|
| |
| float | GetVref () const noexcept |
| | Get the configured reference voltage.
|
| |
| hf_u8_t | GetResolutionBits () const noexcept |
| | Get the current ADC resolution in bits.
|
| |
| hf_u32_t | GetMaxCount () const noexcept |
| | Get the maximum ADC count for current resolution.
|
| |
| float | CountToVoltage (hf_u32_t count) const noexcept |
| | Convert raw ADC count to voltage.
|
| |
| virtual | ~BaseAdc () noexcept=default |
| | Virtual destructor.
|
| |
| | BaseAdc (const BaseAdc &)=delete |
| |
| BaseAdc & | operator= (const BaseAdc &)=delete |
| |
| | BaseAdc (BaseAdc &&) noexcept=default |
| |
| BaseAdc & | operator= (BaseAdc &&) noexcept=default |
| |
| bool | EnsureInitialized () noexcept |
| | Ensures that the ADC is initialized (lazy initialization).
|
| |
| bool | EnsureDeinitialized () noexcept |
| | Ensures that the ADC is initialized (lazy initialization).
|
| |
| bool | IsInitialized () const noexcept |
| | Checks if the class is initialized.
|
| |
| virtual hf_adc_err_t | ReadMultipleChannels (const hf_channel_id_t *channel_ids, hf_u8_t num_channels, hf_u32_t *readings, float *voltages) noexcept |
| | Read multiple channels simultaneously.
|
| |
| virtual hf_adc_err_t | ResetStatistics () noexcept |
| | Reset ADC operation statistics.
|
| |
| virtual hf_adc_err_t | ResetDiagnostics () noexcept |
| | Reset ADC diagnostic information.
|
| |
| virtual hf_adc_err_t | GetStatistics (hf_adc_statistics_t &statistics) noexcept |
| | Get ADC operation statistics.
|
| |
| virtual hf_adc_err_t | GetDiagnostics (hf_adc_diagnostics_t &diagnostics) noexcept |
| | Get ADC diagnostic information.
|
| |
STM32 ADC wrapper — wraps STM32 HAL ADC with full channel management.
Features:
- Single-conversion and multi-sample averaging via HAL_ADC_Start/PollForConversion
- Voltage conversion using configurable Vref and resolution
- Raw count reading for custom calibration workflows
- Combined count + voltage reads in a single call
- Statistics tracking (total reads, errors, timing)