HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
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

extern ADC_HandleTypeDef hadc1;
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);
STM32 ADC wrapper — wraps STM32 HAL ADC with full channel management.
Definition StmAdc.h:40
ADC configuration for STM32.
Definition StmTypes.h:431
Author
HardFOC
Date
2025