Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
Classes
StmAdc.h File Reference

STM32 ADC wrapper — wraps STM32 HAL ADC via CubeMX-generated handle. More...

#include "BaseAdc.h"
#include "StmTypes.h"
Include dependency graph for StmAdc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StmAdc
 STM32 ADC wrapper — wraps STM32 HAL ADC with full channel management. More...
 

Detailed Description

STM32 ADC wrapper — wraps STM32 HAL ADC via CubeMX-generated handle.

Provides the full BaseAdc interface for STM32 ADC peripherals. Users configure ADC channels in STM32CubeMX and pass the ADC_HandleTypeDef* to this wrapper.

Usage

hf_stm32_adc_config_t config(&hadc1, 4, 3.3f); // 4 channels, 3.3V Vref
StmAdc adc(config);
adc.Initialize();
float voltage = 0.0f;
adc.ReadChannelV(0, voltage);
RAII soft-CS: runs assert_fn on construction and deassert_fn on destruction (including early return /...
Definition SoftChipSelectGuard.h:32
STM32 ADC wrapper — wraps STM32 HAL ADC with full channel management.
Definition StmAdc.h:40
ADC configuration for STM32.
Definition StmTypes.h:511
Author
HardFOC
Date
2025