libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
l4/adc.h File Reference
Include dependency graph for l4/adc.h:

Go to the source code of this file.

Macros

#define ADC1   ADC1_BASE
 
#define ADC2   ADC2_BASE
 
#define ADC3   ADC3_BASE
 
#define ADC_CHANNEL_VREF   0
 
#define ADC_CHANNEL_TEMP   17
 
#define ADC_CHANNEL_VBAT   18
 
#define ADC_CR_DEEPPWD   (1 << 29)
 
#define ADC_CR_ADVREGEN   (1 << 28)
 
#define ADC_CFGR1_ALIGN   (1 << 5)
 ALIGN: Data alignment. More...
 
#define ADC_CFGR1_EXTSEL_SHIFT   6
 
#define ADC_CFGR1_EXTSEL_MASK   (0xf << ADC_CFGR1_EXTSEL_SHIFT)
 
#define ADC_CFGR1_EXTSEL_VAL(x)   ((x) << ADC_CFGR1_EXTSEL_SHIFT)
 
#define ADC_SMPR_SMP_2DOT5CYC   0x0
 
#define ADC_SMPR_SMP_6DOT5CYC   0x1
 
#define ADC_SMPR_SMP_12DOT5CYC   0x2
 
#define ADC_SMPR_SMP_24DOT5CYC   0x3
 
#define ADC_SMPR_SMP_47DOT5CYC   0x4
 
#define ADC_SMPR_SMP_92DOT5CYC   0x5
 
#define ADC_SMPR_SMP_247DOT5CYC   0x6
 
#define ADC_SMPR_SMP_640DOT5CYC   0x7
 

Macro Definition Documentation

◆ ADC_CFGR1_ALIGN

#define ADC_CFGR1_ALIGN   (1 << 5)

ALIGN: Data alignment.

Definition at line 68 of file l4/adc.h.

◆ ADC_CFGR1_EXTSEL_MASK

#define ADC_CFGR1_EXTSEL_MASK   (0xf << ADC_CFGR1_EXTSEL_SHIFT)

Definition at line 72 of file l4/adc.h.

◆ ADC_CFGR1_EXTSEL_SHIFT

#define ADC_CFGR1_EXTSEL_SHIFT   6

Definition at line 71 of file l4/adc.h.

◆ ADC_CFGR1_EXTSEL_VAL

#define ADC_CFGR1_EXTSEL_VAL (   x)    ((x) << ADC_CFGR1_EXTSEL_SHIFT)

Definition at line 73 of file l4/adc.h.

◆ ADC_CR_ADVREGEN

#define ADC_CR_ADVREGEN   (1 << 28)

Definition at line 63 of file l4/adc.h.

◆ ADC_CR_DEEPPWD

#define ADC_CR_DEEPPWD   (1 << 29)

Definition at line 60 of file l4/adc.h.