theCore C++ embedded framework
stm32/export/aux/adc.hpp File Reference

STM32 ADC driver. More...

#include "platform/execution.hpp"
#include <stm32_device.hpp>
#include <ecl/utils.hpp>
#include <ecl/err.hpp>
#include <common/adc.hpp>
#include <common/irq.hpp>
#include <array>
Include dependency graph for stm32/export/aux/adc.hpp:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  ecl::channel_group< trig, chans >
 Channels grouped together along with an external trigger. More...
 
struct  ecl::channel_group_sw_trigger< chans >
 Channels grouped together, conversion triggered by software. More...
 
struct  ecl::channel_group_exti_trigger< edge, chans >
 Channels grouped together, conversion triggered by EXTI line. More...
 
struct  ecl::adc_cfg< dev >
 ADC configuration prototype. More...
 
struct  ecl::extractor< chs >
 Extracts information of the given channel group. More...
 
class  ecl::adc_irq_dispatcher
 ADC interrupts helper. More...
 
class  ecl::adc< dev >
 ADC peripheral class. More...
 
class  ecl::mgmt_configurator< dev, mode >
 Management configurator class. More...
 
class  ecl::mgmt_configurator< dev, adc_mgmt_mode::irq >
 Configurator for ADC IRQ mode. More...
 
class  ecl::mgmt_configurator< dev, adc_mgmt_mode::dma >
 Configurator for ADC DMA mode. More...
 
class  ecl::adc< dev >
 ADC peripheral class. More...
 

Namespaces

 ecl
 

Typedefs

using ecl::adc_evh = std::function< void(adc_event)>
 ADC event handler. Event code signifies result of a conversion. More...
 

Enumerations

enum  ecl::adc_mgmt_mode { ecl::adc_mgmt_mode::dma, ecl::adc_mgmt_mode::irq }
 ADC management mode. More...
 
enum  ecl::adc_trigger {
  ecl::adc_trigger::t1_cc1 = ADC_ExternalTrigConv_T1_CC1, ecl::adc_trigger::t1_cc2 = ADC_ExternalTrigConv_T1_CC2, ecl::adc_trigger::t1_cc3 = ADC_ExternalTrigConv_T1_CC3, ecl::adc_trigger::t2_cc2 = ADC_ExternalTrigConv_T2_CC2,
  ecl::adc_trigger::t2_cc3 = ADC_ExternalTrigConv_T2_CC3, ecl::adc_trigger::t2_cc4 = ADC_ExternalTrigConv_T2_CC4, ecl::adc_trigger::t2_trgo = ADC_ExternalTrigConv_T2_TRGO, ecl::adc_trigger::t3_cc1 = ADC_ExternalTrigConv_T3_CC1,
  ecl::adc_trigger::t3_trgo = ADC_ExternalTrigConv_T3_TRGO, ecl::adc_trigger::t4_cc4 = ADC_ExternalTrigConv_T4_CC4, ecl::adc_trigger::t5_cc1 = ADC_ExternalTrigConv_T5_CC1, ecl::adc_trigger::t5_cc2 = ADC_ExternalTrigConv_T5_CC2,
  ecl::adc_trigger::t5_cc3 = ADC_ExternalTrigConv_T5_CC3, ecl::adc_trigger::t8_cc1 = ADC_ExternalTrigConv_T8_CC1, ecl::adc_trigger::t8_trgo = ADC_ExternalTrigConv_T8_TRGO
}
 The external event used to trigger the start of conversion of a group. More...
 
enum  ecl::adc_trigger_edge { ecl::adc_trigger_edge::rising = ADC_ExternalTrigConvEdge_Rising, ecl::adc_trigger_edge::falling = ADC_ExternalTrigConvEdge_Falling, ecl::adc_trigger_edge::both = ADC_ExternalTrigConvEdge_RisingFalling }
 The external trigger edge in case of EXTI line used as a trigger. More...
 
enum  ecl::adc_channel {
  ecl::adc_channel::ch0 = ADC_Channel_0, ecl::adc_channel::ch1 = ADC_Channel_1, ecl::adc_channel::ch2 = ADC_Channel_2, ecl::adc_channel::ch3 = ADC_Channel_3,
  ecl::adc_channel::ch4 = ADC_Channel_4, ecl::adc_channel::ch5 = ADC_Channel_5, ecl::adc_channel::ch6 = ADC_Channel_6, ecl::adc_channel::ch7 = ADC_Channel_7,
  ecl::adc_channel::ch8 = ADC_Channel_8, ecl::adc_channel::ch9 = ADC_Channel_9, ecl::adc_channel::ch10 = ADC_Channel_10, ecl::adc_channel::ch11 = ADC_Channel_11,
  ecl::adc_channel::ch12 = ADC_Channel_12, ecl::adc_channel::ch13 = ADC_Channel_13, ecl::adc_channel::ch14 = ADC_Channel_14, ecl::adc_channel::ch15 = ADC_Channel_15,
  ecl::adc_channel::ch16 = ADC_Channel_16, ecl::adc_channel::ch17 = ADC_Channel_17, ecl::adc_channel::ch18 = ADC_Channel_18
}
 ADC possible channels. More...
 

Detailed Description

STM32 ADC driver.

Some app notes can be found at: http://goo.gl/9rTqUT (AN3116 application note, STM32’s ADC modes and their applications)