libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/stm32/common/adc_common_v2.h>
#include <libopencm3/stm32/common/adc_common_v2_single.h>
Go to the source code of this file.
Enumerations | |
enum | adc_opmode { ADC_MODE_SEQUENTIAL , ADC_MODE_SCAN , ADC_MODE_SCAN_INFINITE } |
Functions | |
void | adc_enable_discontinuous_mode (uint32_t adc) |
ADC Enable Discontinuous Mode for Regular Conversions. More... | |
void | adc_disable_discontinuous_mode (uint32_t adc) |
ADC Disable Discontinuous Mode for Regular Conversions. More... | |
void | adc_set_operation_mode (uint32_t adc, enum adc_opmode opmode) |
ADC Set operation mode. More... | |
void | adc_enable_external_trigger_regular (uint32_t adc, uint32_t trigger, uint32_t polarity) |
ADC Enable an External Trigger for Regular Channels. More... | |
void | adc_disable_external_trigger_regular (uint32_t adc) |
ADC Disable an External Trigger for Regular Channels. More... | |
void | adc_enable_watchdog_interrupt (uint32_t adc) |
ADC Enable Analog Watchdog Interrupt. More... | |
void | adc_disable_watchdog_interrupt (uint32_t adc) |
ADC Disable Regular End-Of-Conversion Interrupt. More... | |
bool | adc_get_watchdog_flag (uint32_t adc) |
ADC Read the Analog Watchdog Flag. More... | |
void | adc_clear_watchdog_flag (uint32_t adc) |
ADC Clear Analog Watchdog Flag. More... | |
void | adc_enable_eoc_sequence_interrupt (uint32_t adc) |
ADC Enable Regular End-Of-Conversion Sequence Interrupt. More... | |
void | adc_disable_eoc_sequence_interrupt (uint32_t adc) |
ADC Disable Regular End-Of-Conversion Sequence Interrupt. More... | |
bool | adc_get_eoc_sequence_flag (uint32_t adc) |
ADC Read the Regular End-Of-Conversion Sequence Flag. More... | |
void | adc_clear_eoc_sequence_flag (uint32_t adc) |
ADC Clear Regular End-Of-Conversion Sequence Flag. More... | |
void | adc_set_clk_source (uint32_t adc, uint32_t source) |
ADC Set Clock Source. More... | |
void | adc_enable_vbat_sensor (void) |
ADC Enable The VBat Sensor. More... | |
void | adc_disable_vbat_sensor (void) |
ADC Disable The VBat Sensor. More... | |
void | adc_calibrate_start (uint32_t adc) LIBOPENCM3_DEPRECATED("see adc_calibrate/_async") |
ADC Start the calibration procedure. More... | |
void | adc_calibrate_wait_finish (uint32_t adc) LIBOPENCM3_DEPRECATED("see adc_is_calibrating") |
ADC Wait to finish the ADC calibration procedure. More... | |
void | adc_enable_analog_watchdog_on_all_channels (uint32_t adc) |
ADC Enable Analog Watchdog for All Channels. More... | |
void | adc_enable_analog_watchdog_on_selected_channel (uint32_t adc, uint8_t chan) |
ADC Enable Analog Watchdog for a Selected Channel. More... | |
void | adc_disable_analog_watchdog (uint32_t adc) |
ADC Disable Analog Watchdog. More... | |
void | adc_set_watchdog_high_threshold (uint32_t adc, uint16_t threshold) |
ADC Set Analog Watchdog Upper Threshold. More... | |
void | adc_set_watchdog_low_threshold (uint32_t adc, uint16_t threshold) |
ADC Set Analog Watchdog Lower Threshold. More... | |
#define ADC1_CHSELR ADC_CHSELR(ADC) |
#define ADC_CFGR2_CKMODE (3 << ADC_CFGR2_CKMODE_SHIFT) |
#define ADC_CFGR2_CKMODE_CK_ADC (0 << ADC_CFGR2_CKMODE_SHIFT) |
#define ADC_CFGR2_CKMODE_PCLK_DIV2 (1 << ADC_CFGR2_CKMODE_SHIFT) |
#define ADC_CFGR2_CKMODE_PCLK_DIV4 (2 << ADC_CFGR2_CKMODE_SHIFT) |
#define ADC_SMPR_SMP (7 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_001DOT5 (0 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_007DOT5 (1 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_013DOT5 (2 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_028DOT5 (3 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_041DOT5 (4 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_055DOT5 (5 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_071DOT5 (6 << ADC_SMPR_SMP_SHIFT) |
#define ADC_SMPR_SMP_239DOT5 (7 << ADC_SMPR_SMP_SHIFT) |