13#if defined(STM32) && defined(HAL_ADC_MODULE_ENABLED)
17: m_hwHandle(&hwHandle)
25 HAL_StatusTypeDef state = HAL_ADC_Start_IT(m_hwHandle);
28 if (state == HAL_ERROR)
33 else if (state == HAL_BUSY)
38 else if (state == HAL_TIMEOUT)
49 uint32_t val = HAL_ADC_GetValue(m_hwHandle);
57 HAL_StatusTypeDef state = HAL_ADC_Stop_IT(m_hwHandle);
60 if (state == HAL_ERROR)
65 else if (state == HAL_BUSY)
70 else if (state == HAL_TIMEOUT)
99 if (&adc == m_hwHandle)
108 if (&adc == m_hwHandle)
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
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.
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.
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.