10#ifndef SEMF_HARDWAREABSTRACTION_STM32_STM32ANALOGIN_H_
11#define SEMF_HARDWAREABSTRACTION_STM32_STM32ANALOGIN_H_
16#if defined(STM32) && defined(HAL_ADC_MODULE_ENABLED)
56 virtual uint32_t
value();
73 static void systemIsr(ADC_HandleTypeDef& adc);
83 void isr(ADC_HandleTypeDef& adc);
89 void isrError(ADC_HandleTypeDef& adc);
93 ADC_HandleTypeDef* m_hwHandle;
95 static constexpr Error::ClassID kSemfClassId = Error::ClassID::Stm32AnalogIn;
Interface for using ADC (Analog to Digital Conversion) hardware in interrupt mode.
LinkedQueue is an managed single linked queue implementation.
Stm32 driver for using a anologIn channel.
static void systemIsrError(ADC_HandleTypeDef &adc)
System-wide interrupt service routine for adc error.
static LinkedQueue< Stm32AnalogIn > * queue()
Get the list with all analog ins.
virtual ~Stm32AnalogIn()=default
Stm32AnalogIn(ADC_HandleTypeDef &hwHandle)
Constructor.
void isrError(ADC_HandleTypeDef &adc)
Sending a error signal.
void isr(ADC_HandleTypeDef &adc)
Interrupt service routine for adc conversion finished.
Stm32AnalogIn(const Stm32AnalogIn &other)=delete
virtual void start()
Starts the hardware module (ADC) for reading ADC values. After finishing analog to digital conversion...
virtual uint32_t value()
Returns the last read value.
static void systemIsr(ADC_HandleTypeDef &adc)
System-wide interrupt service routine for adc conversion finished.