libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Go to the source code of this file.
Macros | |
#define | ADC_SMPR2(adc) MMIO32((adc) + 0x18) |
#define | ADC_TR2(adc) MMIO32((adc) + 0x24) |
#define | ADC_TR3(adc) MMIO32((adc) + 0x28) |
#define | ADC_SQR1(adc) MMIO32((adc) + 0x30) |
#define | ADC_SQR2(adc) MMIO32((adc) + 0x34) |
#define | ADC_SQR3(adc) MMIO32((adc) + 0x38) |
#define | ADC_SQR4(adc) MMIO32((adc) + 0x3C) |
#define | ADC_JSQR(adc) MMIO32((adc) + 0x4c) |
#define | ADC_OFR1(adc) MMIO32((adc) + 0x60) |
#define | ADC_OFR2(adc) MMIO32((adc) + 0x64) |
#define | ADC_OFR3(adc) MMIO32((adc) + 0x68) |
#define | ADC_OFR4(adc) MMIO32((adc) + 0x6C) |
#define | ADC_JDR1(adc) MMIO32((adc) + 0x80) |
#define | ADC_JDR2(adc) MMIO32((adc) + 0x84) |
#define | ADC_JDR3(adc) MMIO32((adc) + 0x88) |
#define | ADC_JDR4(adc) MMIO32((adc) + 0x8C) |
#define | ADC_AWD2CR(adc) MMIO32((adc) + 0xA0) |
#define | ADC_AWD3CR(adc) MMIO32((adc) + 0xA4) |
#define | ADC_DIFSEL(adc) MMIO32((adc) + 0xB0) |
#define | ADC_CALFACT(adc) MMIO32((adc) + 0xB4) |
#define | ADC_CSR(adc) MMIO32((adc) + 0x300 + 0x0) |
#define | ADC_CDR(adc) MMIO32((adc) + 0x300 + 0xc) |
#define | ADC_ISR_JQOVF (1 << 10) |
#define | ADC_ISR_AWD3 (1 << 9) |
#define | ADC_ISR_AWD2 (1 << 8) |
#define | ADC_ISR_JEOS (1 << 6) |
#define | ADC_ISR_JEOC (1 << 5) |
#define | ADC_IER_JQOVFIE (1 << 10) |
#define | ADC_IER_AWD3IE (1 << 9) |
#define | ADC_IER_AWD2IE (1 << 8) |
#define | ADC_IER_JEOSIE (1 << 6) |
#define | ADC_IER_JEOCIE (1 << 5) |
#define | ADC_CR_ADCALDIF (1 << 30) |
#define | ADC_CR_JADSTP (1 << 5) |
#define | ADC_CR_JADSTART (1 << 3) |
#define | ADC_CFGR1_JAUTO (1 << 25) |
#define | ADC_CFGR1_JAWD1EN (1 << 24) |
#define | ADC_CFGR1_JQM (1 << 21) |
#define | ADC_CFGR1_JDISCEN (1 << 20) |
#define | ADC_CFGR1_DISCNUM_SHIFT 17 |
#define | ADC_CFGR1_DISCNUM_MASK (0x7 << ADC_CFGR1_DISCNUM_SHIFT) |
#define | ADC_CFGR1_DISCNUM_VAL(x) (((x) - 1) << ADC_CFGR1_DISCNUM_SHIFT) |
#define | ADC_SQR1_L_SHIFT 0 |
#define | ADC_SQR1_L_MASK 0xf |
#define | ADC_SQRx_SQx_MASK 0x1f |
#define | ADC_SQR1_SQ1_SHIFT 6 |
#define | ADC_SQR1_SQ2_SHIFT 12 |
#define | ADC_SQR1_SQ3_SHIFT 18 |
#define | ADC_SQR1_SQ4_SHIFT 24 |
#define | ADC_SQR2_SQ5_SHIFT 0 |
#define | ADC_SQR2_SQ6_SHIFT 6 |
#define | ADC_SQR2_SQ7_SHIFT 12 |
#define | ADC_SQR2_SQ8_SHIFT 18 |
#define | ADC_SQR2_SQ9_SHIFT 24 |
#define | ADC_SQR3_SQ10_SHIFT 0 |
#define | ADC_SQR3_SQ11_SHIFT 6 |
#define | ADC_SQR3_SQ12_SHIFT 12 |
#define | ADC_SQR3_SQ13_SHIFT 18 |
#define | ADC_SQR3_SQ14_SHIFT 24 |
#define | ADC_SQR4_SQ15_SHIFT 0 |
#define | ADC_SQR4_SQ16_SHIFT 6 |
Functions | |
void | adc_set_sample_time (uint32_t adc, uint8_t channel, uint8_t time) |
ADC Set the Sample Time for a Single Channel. More... | |
void | adc_enable_regulator (uint32_t adc) |
Enable the ADC Voltage regulator Before any use of the ADC, the ADC Voltage regulator must be enabled. More... | |
void | adc_disable_regulator (uint32_t adc) |
Disable the ADC Voltage regulator You can disable the adc vreg when not in use to save power. More... | |