libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the EZR32WG Analog to Digital Converter More...
Modules | |
ADC Channel Number | |
Functions | |
void | adc_set_oversampling (uint32_t adc, uint32_t oversamp) |
Set ADC over sampling. More... | |
void | adc_set_warm_up (uint32_t adc, uint8_t clocks) |
Set ADC warm up. More... | |
void | adc_set_clock_prescaler (uint32_t adc, uint8_t factor) |
Clock division factor. More... | |
void | adc_set_lowpass_filter (uint32_t adc, uint32_t lpfmode) |
Set low pass filter mode. More... | |
void | adc_enable_tailgating (uint32_t adc) |
Enable tail gating. More... | |
void | adc_disable_tailgating (uint32_t adc) |
Disable tail gating. More... | |
void | adc_set_warm_up_mode (uint32_t adc, uint32_t warmupmode) |
Set warm up mode. More... | |
void | adc_single_start (uint32_t adc) |
Start ADC in single acquisition. More... | |
void | adc_single_stop (uint32_t adc) |
Stop ADC in single acquisition. More... | |
void | adc_scan_start (uint32_t adc) |
Start ADC in scan acquisition. More... | |
void | adc_scan_stop (uint32_t adc) |
Stop ADC in scan acquisition. More... | |
void | adc_set_single_prs_trigger (uint32_t adc, uint8_t prssel) |
Set single PRS trigger. More... | |
void | adc_enable_single_prs_trigger (uint32_t adc) |
Enable single PRS Triggering. More... | |
void | adc_disable_single_prs_trigger (uint32_t adc) |
Disable single PRS Triggering. More... | |
void | adc_set_single_acquisition_cycle (uint32_t adc, uint32_t at) |
Set single acquisition cycle. More... | |
void | adc_set_single_reference (uint32_t adc, uint32_t ref) |
Set single reference for acquisition. More... | |
void | adc_set_single_channel (uint32_t adc, uint8_t ch) |
Set single channel. More... | |
void | adc_set_single_resolution (uint32_t adc, uint32_t res) |
Set single resolution of conversion. More... | |
void | adc_set_single_left_aligned (uint32_t adc) |
Set single left aligned output. More... | |
void | adc_set_single_right_aligned (uint32_t adc) |
Set single right aligned output. More... | |
void | adc_set_single_single_ended (uint32_t adc) |
Set single single-ended conversion. More... | |
void | adc_set_single_differential (uint32_t adc) |
Set single differential conversion. More... | |
void | adc_enable_single_repeat_conv (uint32_t adc) |
Enable single channel repeated conversion. More... | |
void | adc_disable_single_repeat_conv (uint32_t adc) |
Disable single repeated conversion. More... | |
void | adc_set_scan_prs_trigger (uint32_t adc, uint8_t prssel) |
Set scan PRS trigger. More... | |
void | adc_enable_scan_prs_trigger (uint32_t adc) |
Enable scan PRS Triggering. More... | |
void | adc_disable_scan_prs_trigger (uint32_t adc) |
Disable scan PRS Triggering. More... | |
void | adc_set_scan_acquisition_cycle (uint32_t adc, uint32_t at) |
Set scan acquisition cycle. More... | |
void | adc_set_scan_reference (uint32_t adc, uint32_t ref) |
Set scan reference for acquisition. More... | |
void | adc_set_scan_channel (uint32_t adc, uint8_t length, uint8_t channel[]) |
Set scan channel list. More... | |
void | adc_set_scan_resolution (uint32_t adc, uint32_t res) |
Set scan resolution of conversion. More... | |
void | adc_set_scan_left_aligned (uint32_t adc) |
Set scan left aligned output. More... | |
void | adc_set_scan_right_aligned (uint32_t adc) |
Set scan right aligned output. More... | |
void | adc_set_scan_single_ended (uint32_t adc) |
Set scan single ended conversion. More... | |
void | adc_set_scan_differential (uint32_t adc) |
Set scan differential conversion. More... | |
void | adc_enable_scan_repeat_conv (uint32_t adc) |
Enable scan repeated conversion. More... | |
void | adc_disable_scan_repeat_conv (uint32_t adc) |
Disable scan repeated conversion. More... | |
void | adc_enable_single_result_overflow_interrupt (uint32_t adc) |
Enable single result overflow interrupt. More... | |
void | adc_disable_single_result_overflow_interrupt (uint32_t adc) |
Disable single result overflow interrupt. More... | |
void | adc_enable_single_conversion_complete_interrupt (uint32_t adc) |
Enable single conversion complete interrupt. More... | |
void | adc_disable_single_conversion_complete_interrupt (uint32_t adc) |
Disable single conversion complete interrupt. More... | |
void | adc_enable_scan_result_overflow_interrupt (uint32_t adc) |
Enable scan result overflow interrupt. More... | |
void | adc_disable_scan_result_overflow_interrupt (uint32_t adc) |
Disable scan result overflow interrupt. More... | |
void | adc_enable_scan_conversion_complete_interrupt (uint32_t adc) |
Disable scan conversion complete interrupt. More... | |
void | adc_disable_scan_conversion_complete_interrupt (uint32_t adc) |
Disable scan conversion complete interrupt. More... | |
bool | adc_get_single_result_overflow_flag (uint32_t adc) |
Get single result overflow flag. More... | |
bool | adc_get_single_conversion_complete_flag (uint32_t adc) |
Get single conversion complete flag. More... | |
bool | adc_get_scan_result_overflow_flag (uint32_t adc) |
Get scan result overflow flag. More... | |
bool | adc_get_scan_conversion_complete_flag (uint32_t adc) |
Get scan conversion complete flag. More... | |
void | adc_set_single_result_overflow_flag (uint32_t adc) |
Set single result overflow flag. More... | |
void | adc_set_single_conversion_complete_flag (uint32_t adc) |
Set single conversion complete flag. More... | |
void | adc_set_scan_result_overflow_flag (uint32_t adc) |
Set scan result overflow flag. More... | |
void | adc_set_scan_conversion_complete_flag (uint32_t adc) |
Set scan conversion complete flag. More... | |
void | adc_clear_single_result_overflow_flag (uint32_t adc) |
Clear single result overflow flag. More... | |
void | adc_clear_single_conversion_complete_flag (uint32_t adc) |
Clear single conversion complete flag. More... | |
void | adc_clear_scan_result_overflow_flag (uint32_t adc) |
Clear scan result overflow flag. More... | |
void | adc_clear_scan_conversion_complete_flag (uint32_t adc) |
Clear scan conversion complete flag. More... | |
uint32_t | adc_single_data (uint32_t adc) |
Get result from last scan conversion. More... | |
uint32_t | adc_scan_data (uint32_t adc) |
Get result from last scan conversion. More... | |
uint32_t | adc_single_data_peak (uint32_t adc) |
Get result from last single conversion (peak) Reading result using this function will not clear SINGLEDV in ADC_STATUS or SINGLE DMA request. More... | |
uint32_t | adc_scan_data_peak (uint32_t adc) |
Get result from last scan conversion (peak) Reading result using this function will not clear SCANDV in ADC_STATUS or SCAN DMA request. More... | |
void | adc_set_calibration_scan_gain (uint32_t adc, uint8_t scan_gain) |
Set ADC scan gain calibration. More... | |
void | adc_set_calibration_scan_offset (uint32_t adc, uint8_t scan_offset) |
Set ADC scan offset calibration. More... | |
void | adc_set_calibration_single_gain (uint32_t adc, uint8_t single_gain) |
Set ADC single gain calibration. More... | |
void | adc_set_calibration_single_offset (uint32_t adc, uint8_t single_offset) |
Set ADC single offset calibration. More... | |
Defined Constants and Types for the EZR32WG Analog to Digital Converter
LGPL License Terms libopencm3 License
#define ADC0 ADC0_BASE |
Definition at line 328 of file adc_common.h.
#define ADC0_BIASPROG ADC_BIASPROG(ADC0) |
Definition at line 343 of file adc_common.h.
Definition at line 342 of file adc_common.h.
Definition at line 330 of file adc_common.h.
Definition at line 329 of file adc_common.h.
Definition at line 334 of file adc_common.h.
Definition at line 335 of file adc_common.h.
Definition at line 337 of file adc_common.h.
Definition at line 336 of file adc_common.h.
#define ADC0_SCANCTRL ADC_SCANCTRL(ADC0) |
Definition at line 333 of file adc_common.h.
#define ADC0_SCANDATA ADC_SCANDATA(ADC0) |
Definition at line 339 of file adc_common.h.
#define ADC0_SCANDATAP ADC_SCANDATAP(ADC0) |
Definition at line 341 of file adc_common.h.
#define ADC0_SINGLECTRL ADC_SINGLECTRL(ADC0) |
Definition at line 332 of file adc_common.h.
#define ADC0_SINGLEDATA ADC_SINGLEDATA(ADC0) |
Definition at line 338 of file adc_common.h.
#define ADC0_SINGLEDATAP ADC_SINGLEDATAP(ADC0) |
Definition at line 340 of file adc_common.h.
#define ADC0_STATUS ADC_STATUS(ADC0) |
Definition at line 331 of file adc_common.h.
#define ADC_BIASPROG | ( | base | ) | MMIO32((base) + 0x03C) |
Definition at line 43 of file adc_common.h.
#define ADC_BIASPROG_BIASPROG_MASK (0xF) |
Definition at line 325 of file adc_common.h.
#define ADC_BIASPROG_BIASPROG_SHIFT (0) |
Definition at line 324 of file adc_common.h.
#define ADC_BIASPROG_COMPBIAS_MASK (0xF) |
Definition at line 320 of file adc_common.h.
#define ADC_BIASPROG_COMPBIAS_SHIFT (8) |
Definition at line 319 of file adc_common.h.
#define ADC_BIASPROG_HALFBIAS (1 << 6) |
Definition at line 322 of file adc_common.h.
#define ADC_CAL | ( | base | ) | MMIO32((base) + 0x034) |
Definition at line 42 of file adc_common.h.
#define ADC_CAL_SCANGAIN_MASK (0x7F) |
Definition at line 307 of file adc_common.h.
#define ADC_CAL_SCANGAIN_SHIFT (24) |
Definition at line 306 of file adc_common.h.
#define ADC_CAL_SCANOFF_MASK (0x7F) |
Definition at line 310 of file adc_common.h.
#define ADC_CAL_SCANOFF_SHIFT (16) |
Definition at line 309 of file adc_common.h.
#define ADC_CAL_SINGLEGAIN_MASK (0x7F) |
Definition at line 313 of file adc_common.h.
#define ADC_CAL_SINGLEGAIN_SHIFT (8) |
Definition at line 312 of file adc_common.h.
#define ADC_CAL_SINGLEOFF_MASK (0x7F) |
Definition at line 316 of file adc_common.h.
#define ADC_CAL_SINGLEOFF_SHIFT (0) |
Definition at line 315 of file adc_common.h.
#define ADC_CMD | ( | base | ) | MMIO32((base) + 0x004) |
Definition at line 30 of file adc_common.h.
#define ADC_CMD_SCANSTART (1 << 2) |
Definition at line 94 of file adc_common.h.
#define ADC_CMD_SCANSTOP (1 << 3) |
Definition at line 93 of file adc_common.h.
#define ADC_CMD_SINGLESTART (1 << 0) |
Definition at line 96 of file adc_common.h.
#define ADC_CMD_SINGLESTOP (1 << 1) |
Definition at line 95 of file adc_common.h.
#define ADC_CTRL | ( | base | ) | MMIO32((base) + 0x000) |
Definition at line 29 of file adc_common.h.
#define ADC_CTRL_LPFMODE | ( | v | ) | (((v) << ADC_CTRL_LPFMODE_SHIFT) & ADC_CTRL_LPFMODE_MASK) |
Definition at line 75 of file adc_common.h.
#define ADC_CTRL_LPFMODE_BYPASS 0 |
Definition at line 77 of file adc_common.h.
#define ADC_CTRL_LPFMODE_DECAP 1 |
Definition at line 78 of file adc_common.h.
#define ADC_CTRL_LPFMODE_MASK (0x3 << ADC_CTRL_LPFMODE_SHIFT) |
Definition at line 74 of file adc_common.h.
#define ADC_CTRL_LPFMODE_RCFILT 2 |
Definition at line 79 of file adc_common.h.
#define ADC_CTRL_LPFMODE_SHIFT (4) |
Definition at line 73 of file adc_common.h.
#define ADC_CTRL_OVERSEL | ( | v | ) | (((v) << ADC_CTRL_OVERSEL_SHIFT) & ADC_CTRL_OVERSEL_MASK) |
Definition at line 48 of file adc_common.h.
#define ADC_CTRL_OVERSEL_MASK (0xF << ADC_CTRL_OVERSEL_SHIFT) |
Definition at line 47 of file adc_common.h.
#define ADC_CTRL_OVERSEL_SHIFT (24) |
Definition at line 46 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X1024 9 |
Definition at line 59 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X128 6 |
Definition at line 56 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X16 3 |
Definition at line 53 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X2 0 |
Definition at line 50 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X2048 10 |
Definition at line 60 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X256 7 |
Definition at line 57 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X32 4 |
Definition at line 54 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X4 1 |
Definition at line 51 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X4096 11 |
Definition at line 61 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X512 8 |
Definition at line 58 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X64 5 |
Definition at line 55 of file adc_common.h.
#define ADC_CTRL_OVERSEL_X8 2 |
Definition at line 52 of file adc_common.h.
#define ADC_CTRL_PRESC | ( | v | ) | (((v) << ADC_CTRL_PRESC_SHIFT) & ADC_CTRL_PRESC_MASK) |
Definition at line 70 of file adc_common.h.
#define ADC_CTRL_PRESC_MASK (0x3F << ADC_CTRL_PRESC_SHIFT) |
Definition at line 69 of file adc_common.h.
#define ADC_CTRL_PRESC_SHIFT (8) |
Definition at line 68 of file adc_common.h.
#define ADC_CTRL_TAILGATE (1 << 3) |
Definition at line 81 of file adc_common.h.
#define ADC_CTRL_TIMEBASE | ( | v | ) | (((v) << ADC_CTRL_TIMEBASE_SHIFT) & ADC_CTRL_TIMEBASE_MASK) |
Definition at line 65 of file adc_common.h.
#define ADC_CTRL_TIMEBASE_MASK (0x3F << ADC_CTRL_TIMEBASE_SHIFT) |
Definition at line 64 of file adc_common.h.
#define ADC_CTRL_TIMEBASE_SHIFT (16) |
Definition at line 63 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE | ( | v | ) | (((v) << ADC_CTRL_WARMUPMODE_SHIFT) & ADC_CTRL_WARMUPMODE_MASK) |
Definition at line 85 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_FASTBG 1 |
Definition at line 88 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_KEEPADCWARM 3 |
Definition at line 90 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_KEEPSCANREFWARM 2 |
Definition at line 89 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_MASK (0x3 << ADC_CTRL_WARMUPMODE_SHIFT) |
Definition at line 84 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_NORMAL 0 |
Definition at line 87 of file adc_common.h.
#define ADC_CTRL_WARMUPMODE_SHIFT (0) |
Definition at line 83 of file adc_common.h.
#define ADC_IEN | ( | base | ) | MMIO32((base) + 0x014) |
Definition at line 34 of file adc_common.h.
#define ADC_IEN_SCAN (1 << 1) |
Definition at line 284 of file adc_common.h.
#define ADC_IEN_SCANOF (1 << 9) |
Definition at line 282 of file adc_common.h.
#define ADC_IEN_SINGLE (1 << 0) |
Definition at line 285 of file adc_common.h.
#define ADC_IEN_SINGLEOF (1 << 8) |
Definition at line 283 of file adc_common.h.
#define ADC_IF | ( | base | ) | MMIO32((base) + 0x018) |
Definition at line 35 of file adc_common.h.
#define ADC_IF_SCAN (1 << 1) |
Definition at line 290 of file adc_common.h.
#define ADC_IF_SCANOF (1 << 9) |
Definition at line 288 of file adc_common.h.
#define ADC_IF_SINGLE (1 << 0) |
Definition at line 291 of file adc_common.h.
#define ADC_IF_SINGLEOF (1 << 8) |
Definition at line 289 of file adc_common.h.
#define ADC_IFC | ( | base | ) | MMIO32((base) + 0x020) |
Definition at line 37 of file adc_common.h.
#define ADC_IFC_SCAN (1 << 1) |
Definition at line 302 of file adc_common.h.
#define ADC_IFC_SCANOF (1 << 9) |
Definition at line 300 of file adc_common.h.
#define ADC_IFC_SINGLE (1 << 0) |
Definition at line 303 of file adc_common.h.
#define ADC_IFC_SINGLEOF (1 << 8) |
Definition at line 301 of file adc_common.h.
#define ADC_IFS | ( | base | ) | MMIO32((base) + 0x01C) |
Definition at line 36 of file adc_common.h.
#define ADC_IFS_SCAN (1 << 1) |
Definition at line 296 of file adc_common.h.
#define ADC_IFS_SCANOF (1 << 9) |
Definition at line 294 of file adc_common.h.
#define ADC_IFS_SINGLE (1 << 0) |
Definition at line 297 of file adc_common.h.
#define ADC_IFS_SINGLEOF (1 << 8) |
Definition at line 295 of file adc_common.h.
#define ADC_SCANCTRL | ( | base | ) | MMIO32((base) + 0x010) |
Definition at line 33 of file adc_common.h.
#define ADC_SCANCTRL_ADJ (1 << 2) |
Definition at line 277 of file adc_common.h.
#define ADC_SCANCTRL_AT | ( | v | ) | (((v) << ADC_SCANCTRL_AT_SHIFT) & ADC_SCANCTRL_AT_MASK) |
Definition at line 223 of file adc_common.h.
#define ADC_SCANCTRL_AT_128CYCLES 7 |
Definition at line 232 of file adc_common.h.
#define ADC_SCANCTRL_AT_16CYCLES 4 |
Definition at line 229 of file adc_common.h.
#define ADC_SCANCTRL_AT_1CYCLE 0 |
Definition at line 225 of file adc_common.h.
#define ADC_SCANCTRL_AT_256CYCLES 8 |
Definition at line 233 of file adc_common.h.
#define ADC_SCANCTRL_AT_2CYCLES 1 |
Definition at line 226 of file adc_common.h.
#define ADC_SCANCTRL_AT_32CYCLES 5 |
Definition at line 230 of file adc_common.h.
#define ADC_SCANCTRL_AT_4CYCLES 2 |
Definition at line 227 of file adc_common.h.
#define ADC_SCANCTRL_AT_64CYCLES 6 |
Definition at line 231 of file adc_common.h.
#define ADC_SCANCTRL_AT_8CYCLES 3 |
Definition at line 228 of file adc_common.h.
#define ADC_SCANCTRL_AT_MASK (0xF << ADC_SCANCTRL_AT_SHIFT) |
Definition at line 222 of file adc_common.h.
#define ADC_SCANCTRL_AT_SHIFT (20) |
Definition at line 221 of file adc_common.h.
#define ADC_SCANCTRL_DIFF (1 << 1) |
Definition at line 278 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL | ( | v | ) | (((v) << ADC_SCANCTRL_INPUTSEL_SHIFT) & ADC_SCANCTRL_INPUTSEL_MASK) |
Definition at line 250 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH0 ADC_SCANCTRL_INPUTSEL_CHx(0) |
Definition at line 254 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH0CH1 ADC_SCANCTRL_INPUTSEL(1 << 0) |
Definition at line 263 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH1 ADC_SCANCTRL_INPUTSEL_CHx(1) |
Definition at line 255 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH2 ADC_SCANCTRL_INPUTSEL_CHx(2) |
Definition at line 256 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH2CH3 ADC_SCANCTRL_INPUTSEL(1 << 1) |
Definition at line 264 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH3 ADC_SCANCTRL_INPUTSEL_CHx(3) |
Definition at line 257 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH4 ADC_SCANCTRL_INPUTSEL_CHx(4) |
Definition at line 258 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH4CH5 ADC_SCANCTRL_INPUTSEL(1 << 2) |
Definition at line 265 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH5 ADC_SCANCTRL_INPUTSEL_CHx(5) |
Definition at line 259 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH6 ADC_SCANCTRL_INPUTSEL_CHx(6) |
Definition at line 260 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH6CH7 ADC_SCANCTRL_INPUTSEL(1 << 3) |
Definition at line 266 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CH7 ADC_SCANCTRL_INPUTSEL_CHx(7) |
Definition at line 261 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_CHx | ( | x | ) | ADC_SCANCTRL_INPUTSEL(1 << (x)) |
Definition at line 253 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_MASK (0xFF << ADC_SCANCTRL_INPUTSEL_SHIFT) |
Definition at line 249 of file adc_common.h.
#define ADC_SCANCTRL_INPUTSEL_SHIFT (8) |
Definition at line 248 of file adc_common.h.
#define ADC_SCANCTRL_PRSEN (1 << 24) |
Definition at line 219 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL | ( | v | ) | (((v) << ADC_SCANCTRL_PRSSEL_SHIFT) & ADC_SCANCTRL_PRSSEL_MASK) |
Definition at line 203 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_MASK (0xF << ADC_SCANCTRL_PRSSEL_SHIFT) |
Definition at line 202 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH0 0 |
Definition at line 206 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH1 1 |
Definition at line 207 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH10 10 |
Definition at line 216 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH11 11 |
Definition at line 217 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH2 2 |
Definition at line 208 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH3 3 |
Definition at line 209 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH4 4 |
Definition at line 210 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH5 5 |
Definition at line 211 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH6 6 |
Definition at line 212 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH7 7 |
Definition at line 213 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH8 8 |
Definition at line 214 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCH9 9 |
Definition at line 215 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_PRSCHx | ( | x | ) | ADC_SCANCTRL_PRSSEL(x) |
Definition at line 205 of file adc_common.h.
#define ADC_SCANCTRL_PRSSEL_SHIFT (28) |
Definition at line 201 of file adc_common.h.
#define ADC_SCANCTRL_REF | ( | v | ) | (((v) << ADC_SCANCTRL_REF_SHIFT) & ADC_SCANCTRL_REF_MASK) |
Definition at line 237 of file adc_common.h.
#define ADC_SCANCTRL_REF_1V25 0 |
Definition at line 239 of file adc_common.h.
#define ADC_SCANCTRL_REF_2V5 1 |
Definition at line 240 of file adc_common.h.
#define ADC_SCANCTRL_REF_2XEXTDIFF 5 |
Definition at line 244 of file adc_common.h.
#define ADC_SCANCTRL_REF_2XVDD 6 |
Definition at line 245 of file adc_common.h.
#define ADC_SCANCTRL_REF_5VDIFF 3 |
Definition at line 242 of file adc_common.h.
#define ADC_SCANCTRL_REF_EXTSCAN 4 |
Definition at line 243 of file adc_common.h.
#define ADC_SCANCTRL_REF_MASK (0xF << ADC_SCANCTRL_REF_SHIFT) |
Definition at line 236 of file adc_common.h.
#define ADC_SCANCTRL_REF_SHIFT (16) |
Definition at line 235 of file adc_common.h.
#define ADC_SCANCTRL_REF_VDD 2 |
Definition at line 241 of file adc_common.h.
#define ADC_SCANCTRL_REP (1 << 0) |
Definition at line 279 of file adc_common.h.
#define ADC_SCANCTRL_RES | ( | v | ) | (((v) << ADC_SCANCTRL_RES_SHIFT) & ADC_SCANCTRL_RES_MASK) |
Definition at line 270 of file adc_common.h.
#define ADC_SCANCTRL_RES_12BIT 0 |
Definition at line 272 of file adc_common.h.
#define ADC_SCANCTRL_RES_6BIT 2 |
Definition at line 274 of file adc_common.h.
#define ADC_SCANCTRL_RES_8BIT 1 |
Definition at line 273 of file adc_common.h.
#define ADC_SCANCTRL_RES_MASK (0x3 << ADC_SCANCTRL_RES_SHIFT) |
Definition at line 269 of file adc_common.h.
#define ADC_SCANCTRL_RES_OVS 3 |
Definition at line 275 of file adc_common.h.
#define ADC_SCANCTRL_RES_SHIFT (4) |
Definition at line 268 of file adc_common.h.
#define ADC_SCANDATA | ( | base | ) | MMIO32((base) + 0x028) |
Definition at line 39 of file adc_common.h.
#define ADC_SCANDATAP | ( | base | ) | MMIO32((base) + 0x030) |
Definition at line 41 of file adc_common.h.
#define ADC_SINGLECTRL | ( | base | ) | MMIO32((base) + 0x00C) |
Definition at line 32 of file adc_common.h.
#define ADC_SINGLECTRL_ADJ (1 << 2) |
Definition at line 196 of file adc_common.h.
#define ADC_SINGLECTRL_AT | ( | v | ) | (((v) << ADC_SINGLECTRL_AT_SHIFT) & ADC_SINGLECTRL_AT_MASK) |
Definition at line 135 of file adc_common.h.
#define ADC_SINGLECTRL_AT_128CYCLES 0x7 |
Definition at line 144 of file adc_common.h.
#define ADC_SINGLECTRL_AT_16CYCLES 0x4 |
Definition at line 141 of file adc_common.h.
#define ADC_SINGLECTRL_AT_1CYCLE 0x0 |
Definition at line 137 of file adc_common.h.
#define ADC_SINGLECTRL_AT_256CYCLES 0x8 |
Definition at line 145 of file adc_common.h.
#define ADC_SINGLECTRL_AT_2CYCLES 0x1 |
Definition at line 138 of file adc_common.h.
#define ADC_SINGLECTRL_AT_32CYCLES 0x5 |
Definition at line 142 of file adc_common.h.
#define ADC_SINGLECTRL_AT_4CYCLES 0x2 |
Definition at line 139 of file adc_common.h.
#define ADC_SINGLECTRL_AT_64CYCLES 0x6 |
Definition at line 143 of file adc_common.h.
#define ADC_SINGLECTRL_AT_8CYCLES 0x3 |
Definition at line 140 of file adc_common.h.
#define ADC_SINGLECTRL_AT_MASK (0xF << ADC_SINGLECTRL_AT_SHIFT) |
Definition at line 134 of file adc_common.h.
#define ADC_SINGLECTRL_AT_SHIFT (20) |
Definition at line 133 of file adc_common.h.
#define ADC_SINGLECTRL_DIFF (1 << 1) |
Definition at line 197 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL | ( | v | ) | (((v) << ADC_SINGLECTRL_INPUTSEL_SHIFT) & ADC_SINGLECTRL_INPUTSEL_MASK) |
Definition at line 161 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH0 0 |
Definition at line 165 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH0CH1 0 |
Definition at line 181 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH1 1 |
Definition at line 166 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH2 2 |
Definition at line 167 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH2CH3 1 |
Definition at line 182 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH3 3 |
Definition at line 168 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH4 4 |
Definition at line 169 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH4CH5 2 |
Definition at line 183 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH5 5 |
Definition at line 170 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH6 6 |
Definition at line 171 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH6CH7 3 |
Definition at line 184 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CH7 7 |
Definition at line 172 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_CHx | ( | x | ) | ADC_SINGLECTRL_INPUTSEL(x) |
Definition at line 164 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_DAC0OUT0 13 |
Definition at line 178 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_DAC0OUT1 14 |
Definition at line 179 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_DIFF0 4 |
Definition at line 185 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_MASK (0xF << ADC_SINGLECTRL_INPUTSEL_SHIFT) |
Definition at line 160 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_SHIFT (8) |
Definition at line 159 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_TEMP 8 |
Definition at line 173 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_VDD 10 |
Definition at line 175 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_VDDDIV3 9 |
Definition at line 174 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_VREFDIV2 12 |
Definition at line 177 of file adc_common.h.
#define ADC_SINGLECTRL_INPUTSEL_VSS 11 |
Definition at line 176 of file adc_common.h.
#define ADC_SINGLECTRL_PRSEN (1 << 24) |
Definition at line 131 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL | ( | v | ) | (((v) << ADC_SINGLECTRL_PRSSEL_SHIFT) & ADC_SINGLECTRL_PRSSEL_MASK) |
Definition at line 115 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_MASK (0xF << ADC_SINGLECTRL_PRSSEL_SHIFT) |
Definition at line 114 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH0 0 |
Definition at line 118 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH1 1 |
Definition at line 119 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH10 10 |
Definition at line 128 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH11 11 |
Definition at line 129 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH2 2 |
Definition at line 120 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH3 3 |
Definition at line 121 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH4 4 |
Definition at line 122 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH5 5 |
Definition at line 123 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH6 6 |
Definition at line 124 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH7 7 |
Definition at line 125 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH8 8 |
Definition at line 126 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCH9 9 |
Definition at line 127 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_PRSCHx | ( | x | ) | ADC_SINGLECTRL_PRSSEL(x) |
Definition at line 117 of file adc_common.h.
#define ADC_SINGLECTRL_PRSSEL_SHIFT (28) |
Definition at line 113 of file adc_common.h.
#define ADC_SINGLECTRL_REF | ( | v | ) | (((v) << ADC_SINGLECTRL_REF_SHIFT) & ADC_SINGLECTRL_REF_MASK) |
Definition at line 149 of file adc_common.h.
#define ADC_SINGLECTRL_REF_1V25 0 |
Definition at line 151 of file adc_common.h.
#define ADC_SINGLECTRL_REF_2V5 1 |
Definition at line 152 of file adc_common.h.
#define ADC_SINGLECTRL_REF_2XEXTDIFF 5 |
Definition at line 156 of file adc_common.h.
#define ADC_SINGLECTRL_REF_2XVDD 6 |
Definition at line 157 of file adc_common.h.
#define ADC_SINGLECTRL_REF_5VDIFF 3 |
Definition at line 154 of file adc_common.h.
#define ADC_SINGLECTRL_REF_EXTSINGLE 4 |
Definition at line 155 of file adc_common.h.
#define ADC_SINGLECTRL_REF_MASK (0xF << ADC_SINGLECTRL_REF_SHIFT) |
Definition at line 148 of file adc_common.h.
#define ADC_SINGLECTRL_REF_SHIFT (16) |
Definition at line 147 of file adc_common.h.
#define ADC_SINGLECTRL_REF_VDD 2 |
Definition at line 153 of file adc_common.h.
#define ADC_SINGLECTRL_REP (1 << 0) |
Definition at line 198 of file adc_common.h.
#define ADC_SINGLECTRL_RES | ( | v | ) | (((v) << ADC_SINGLECTRL_RES_SHIFT) & ADC_SINGLECTRL_RES_MASK) |
Definition at line 189 of file adc_common.h.
#define ADC_SINGLECTRL_RES_12BIT 0 |
Definition at line 191 of file adc_common.h.
#define ADC_SINGLECTRL_RES_6BIT 2 |
Definition at line 193 of file adc_common.h.
#define ADC_SINGLECTRL_RES_8BIT 1 |
Definition at line 192 of file adc_common.h.
#define ADC_SINGLECTRL_RES_MASK (0x3 << ADC_SINGLECTRL_RES_SHIFT) |
Definition at line 188 of file adc_common.h.
#define ADC_SINGLECTRL_RES_OVS 3 |
Definition at line 194 of file adc_common.h.
#define ADC_SINGLECTRL_RES_SHIFT (4) |
Definition at line 187 of file adc_common.h.
#define ADC_SINGLEDATA | ( | base | ) | MMIO32((base) + 0x024) |
Definition at line 38 of file adc_common.h.
#define ADC_SINGLEDATAP | ( | base | ) | MMIO32((base) + 0x02C) |
Definition at line 40 of file adc_common.h.
#define ADC_STATUS | ( | base | ) | MMIO32((base) + 0x008) |
Definition at line 31 of file adc_common.h.
#define ADC_STATUS_SCANACT (1 << 1) |
Definition at line 109 of file adc_common.h.
#define ADC_STATUS_SCANDATASRC | ( | v | ) | (((v) << ADC_STATUS_SCANDATASRC_SHIFT) & ADC_STATUS_SCANDATASRC_MASK) |
Definition at line 101 of file adc_common.h.
#define ADC_STATUS_SCANDATASRC_MASK (0x7 << ADC_STATUS_SCANDATASRC_SHIFT) |
Definition at line 100 of file adc_common.h.
#define ADC_STATUS_SCANDATASRC_SHIFT (0) |
Definition at line 99 of file adc_common.h.
#define ADC_STATUS_SCANDV (1 << 17) |
Definition at line 104 of file adc_common.h.
#define ADC_STATUS_SCANREFWARM (1 << 9) |
Definition at line 107 of file adc_common.h.
#define ADC_STATUS_SINGLEACT (1 << 0) |
Definition at line 110 of file adc_common.h.
#define ADC_STATUS_SINGLEDV (1 << 16) |
Definition at line 105 of file adc_common.h.
#define ADC_STATUS_SINGLEREFWARM (1 << 8) |
Definition at line 108 of file adc_common.h.
#define ADC_STATUS_WARM (1 << 12) |
Definition at line 106 of file adc_common.h.
void adc_clear_scan_conversion_complete_flag | ( | uint32_t | adc | ) |
Clear scan conversion complete flag.
[in] | adc | ADC (use ADCx) |
Definition at line 589 of file adc_common.c.
References ADC_IFC, and ADC_IFC_SCAN.
void adc_clear_scan_result_overflow_flag | ( | uint32_t | adc | ) |
Clear scan result overflow flag.
[in] | adc | ADC (use ADCx) |
Definition at line 580 of file adc_common.c.
References ADC_IFC, and ADC_IFC_SCANOF.
void adc_clear_single_conversion_complete_flag | ( | uint32_t | adc | ) |
Clear single conversion complete flag.
[in] | adc | ADC (use ADCx) |
Definition at line 571 of file adc_common.c.
References ADC_IFC, and ADC_IFC_SINGLE.
void adc_clear_single_result_overflow_flag | ( | uint32_t | adc | ) |
Clear single result overflow flag.
[in] | adc | ADC (use ADCx) |
Definition at line 562 of file adc_common.c.
References ADC_IFC, and ADC_IFC_SINGLEOF.
void adc_disable_scan_conversion_complete_interrupt | ( | uint32_t | adc | ) |
Disable scan conversion complete interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 473 of file adc_common.c.
References ADC_IEN.
void adc_disable_scan_prs_trigger | ( | uint32_t | adc | ) |
Disable scan PRS Triggering.
[in] | adc | ADC (use ADCx) |
Definition at line 291 of file adc_common.c.
References ADC_SCANCTRL.
void adc_disable_scan_repeat_conv | ( | uint32_t | adc | ) |
Disable scan repeated conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 401 of file adc_common.c.
References ADC_SCANCTRL.
void adc_disable_scan_result_overflow_interrupt | ( | uint32_t | adc | ) |
Disable scan result overflow interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 455 of file adc_common.c.
References ADC_IEN.
void adc_disable_single_conversion_complete_interrupt | ( | uint32_t | adc | ) |
Disable single conversion complete interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 437 of file adc_common.c.
References ADC_IEN.
void adc_disable_single_prs_trigger | ( | uint32_t | adc | ) |
Disable single PRS Triggering.
[in] | adc | ADC (use ADCx) |
Definition at line 161 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_disable_single_repeat_conv | ( | uint32_t | adc | ) |
Disable single repeated conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 260 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_disable_single_result_overflow_interrupt | ( | uint32_t | adc | ) |
Disable single result overflow interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 419 of file adc_common.c.
References ADC_IEN.
void adc_disable_tailgating | ( | uint32_t | adc | ) |
Disable tail gating.
[in] | adc | ADC (use ADCx) |
Definition at line 83 of file adc_common.c.
References ADC_CTRL.
void adc_enable_scan_conversion_complete_interrupt | ( | uint32_t | adc | ) |
Disable scan conversion complete interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 464 of file adc_common.c.
References ADC_IEN, and ADC_IEN_SCAN.
void adc_enable_scan_prs_trigger | ( | uint32_t | adc | ) |
Enable scan PRS Triggering.
[in] | adc | ADC (use ADCx) |
Definition at line 282 of file adc_common.c.
References ADC_SCANCTRL, and ADC_SCANCTRL_PRSEN.
void adc_enable_scan_repeat_conv | ( | uint32_t | adc | ) |
Enable scan repeated conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 392 of file adc_common.c.
References ADC_SCANCTRL, and ADC_SCANCTRL_REP.
void adc_enable_scan_result_overflow_interrupt | ( | uint32_t | adc | ) |
Enable scan result overflow interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 446 of file adc_common.c.
References ADC_IEN, and ADC_IEN_SCANOF.
void adc_enable_single_conversion_complete_interrupt | ( | uint32_t | adc | ) |
Enable single conversion complete interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 428 of file adc_common.c.
References ADC_IEN, and ADC_IEN_SINGLE.
void adc_enable_single_prs_trigger | ( | uint32_t | adc | ) |
Enable single PRS Triggering.
[in] | adc | ADC (use ADCx) |
Definition at line 152 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_PRSEN.
void adc_enable_single_repeat_conv | ( | uint32_t | adc | ) |
Enable single channel repeated conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 251 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_REP.
void adc_enable_single_result_overflow_interrupt | ( | uint32_t | adc | ) |
Enable single result overflow interrupt.
[in] | adc | ADC (use ADCx) |
Definition at line 410 of file adc_common.c.
References ADC_IEN, and ADC_IEN_SINGLEOF.
void adc_enable_tailgating | ( | uint32_t | adc | ) |
Enable tail gating.
[in] | adc | ADC (use ADCx) |
Definition at line 74 of file adc_common.c.
References ADC_CTRL, and ADC_CTRL_TAILGATE.
bool adc_get_scan_conversion_complete_flag | ( | uint32_t | adc | ) |
Get scan conversion complete flag.
[in] | adc | ADC (use ADCx) |
true | if flag is set |
false | if flag is not set |
Definition at line 517 of file adc_common.c.
References ADC_IF, and ADC_IF_SCAN.
bool adc_get_scan_result_overflow_flag | ( | uint32_t | adc | ) |
Get scan result overflow flag.
[in] | adc | ADC (use ADCx) |
true | if flag set |
false | if flag is not set |
Definition at line 506 of file adc_common.c.
References ADC_IF, and ADC_IF_SCANOF.
bool adc_get_single_conversion_complete_flag | ( | uint32_t | adc | ) |
Get single conversion complete flag.
[in] | adc | ADC (use ADCx) |
true | if flag set |
false | if flag is not set |
Definition at line 495 of file adc_common.c.
References ADC_IF, and ADC_IF_SINGLE.
bool adc_get_single_result_overflow_flag | ( | uint32_t | adc | ) |
Get single result overflow flag.
[in] | adc | ADC (use ADCx) |
true | if flag set |
false | if flag is not set |
Definition at line 484 of file adc_common.c.
References ADC_IF, and ADC_IF_SCANOF.
uint32_t adc_scan_data | ( | uint32_t | adc | ) |
Get result from last scan conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 609 of file adc_common.c.
References ADC_SCANDATA.
uint32_t adc_scan_data_peak | ( | uint32_t | adc | ) |
Get result from last scan conversion (peak) Reading result using this function will not clear SCANDV in ADC_STATUS or SCAN DMA request.
[in] | adc | ADC (use ADCx) |
Definition at line 633 of file adc_common.c.
References ADC_SCANDATAP.
void adc_scan_start | ( | uint32_t | adc | ) |
Start ADC in scan acquisition.
[in] | adc | ADC (use ADCx) |
Definition at line 121 of file adc_common.c.
References ADC_CMD, and ADC_CMD_SCANSTART.
void adc_scan_stop | ( | uint32_t | adc | ) |
Stop ADC in scan acquisition.
[in] | adc | ADC (use ADCx) |
Definition at line 130 of file adc_common.c.
References ADC_CMD, and ADC_CMD_SCANSTOP.
void adc_set_calibration_scan_gain | ( | uint32_t | adc, |
uint8_t | scan_gain | ||
) |
Set ADC scan gain calibration.
[in] | adc | ADC (use ADCx) |
scan_gain | calibration of gain for internal ref |
Definition at line 643 of file adc_common.c.
References ADC_CAL, and ADC_CAL_SCANGAIN_MASK.
void adc_set_calibration_scan_offset | ( | uint32_t | adc, |
uint8_t | scan_offset | ||
) |
Set ADC scan offset calibration.
[in] | adc | ADC (use ADCx) |
scan_offset | calibration of offset for internal ref |
Definition at line 653 of file adc_common.c.
References ADC_CAL, and ADC_CAL_SCANOFF_MASK.
void adc_set_calibration_single_gain | ( | uint32_t | adc, |
uint8_t | single_gain | ||
) |
Set ADC single gain calibration.
[in] | adc | ADC (use ADCx) |
single_gain | calibration of gain for internal ref |
Definition at line 663 of file adc_common.c.
References ADC_CAL, and ADC_CAL_SINGLEGAIN_MASK.
void adc_set_calibration_single_offset | ( | uint32_t | adc, |
uint8_t | single_offset | ||
) |
Set ADC single offset calibration.
[in] | adc | ADC (use ADCx) |
single_offset | calibration of offset for internal ref |
Definition at line 673 of file adc_common.c.
References ADC_CAL, and ADC_CAL_SINGLEOFF_MASK.
void adc_set_clock_prescaler | ( | uint32_t | adc, |
uint8_t | factor | ||
) |
Clock division factor.
[in] | adc | ADC (use ADCx) |
[in] | factor | Factor (1 - 128) |
Definition at line 54 of file adc_common.c.
References ADC_CTRL, and ADC_CTRL_PRESC.
void adc_set_lowpass_filter | ( | uint32_t | adc, |
uint32_t | lpfmode | ||
) |
Set low pass filter mode.
[in] | adc | ADC (use ADCx) |
[in] | lpfmode | Low pass filter mode (use ADC_CTRL_LPFMODE_*) |
Definition at line 65 of file adc_common.c.
References ADC_CTRL.
void adc_set_oversampling | ( | uint32_t | adc, |
uint32_t | oversamp | ||
) |
Set ADC over sampling.
[in] | adc | ADC (use ADCx) |
[in] | oversamp | Oversampling (use ADC_CTRL_OVERSEL_Xx) |
Definition at line 32 of file adc_common.c.
References ADC_CTRL.
void adc_set_scan_acquisition_cycle | ( | uint32_t | adc, |
uint32_t | at | ||
) |
Set scan acquisition cycle.
[in] | adc | ADC (use ADCx) |
[in] | at | Acquisition time (use ADC_SCANCTRL_AT_x) |
Definition at line 301 of file adc_common.c.
References ADC_SCANCTRL.
void adc_set_scan_channel | ( | uint32_t | adc, |
uint8_t | length, | ||
uint8_t | channel[] | ||
) |
Set scan channel list.
[in] | adc | ADC (use ADCx) |
[in] | length | Length of channel |
[in] | channel | channel list (use ADC_CHx) |
Definition at line 325 of file adc_common.c.
References ADC_SCANCTRL, ADC_SCANCTRL_INPUTSEL_MASK, and ADC_SCANCTRL_INPUTSEL_SHIFT.
void adc_set_scan_conversion_complete_flag | ( | uint32_t | adc | ) |
Set scan conversion complete flag.
[in] | adc | ADC (use ADCx) |
Definition at line 553 of file adc_common.c.
References ADC_IFS, and ADC_IFS_SCAN.
void adc_set_scan_differential | ( | uint32_t | adc | ) |
Set scan differential conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 381 of file adc_common.c.
References ADC_SCANCTRL, and ADC_SCANCTRL_DIFF.
void adc_set_scan_left_aligned | ( | uint32_t | adc | ) |
Set scan left aligned output.
[in] | adc | ADC (use ADCx) |
Definition at line 354 of file adc_common.c.
References ADC_SCANCTRL, and ADC_SCANCTRL_ADJ.
void adc_set_scan_prs_trigger | ( | uint32_t | adc, |
uint8_t | prssel | ||
) |
Set scan PRS trigger.
[in] | adc | ADC (use ADCx) |
[in] | prssel | PRS Selected (use PRS_CHx) |
Definition at line 271 of file adc_common.c.
References ADC_SCANCTRL, and ADC_SCANCTRL_PRSSEL_PRSCHx.
void adc_set_scan_reference | ( | uint32_t | adc, |
uint32_t | ref | ||
) |
Set scan reference for acquisition.
[in] | adc | ADC (use ADCx) |
[in] | ref | Reference (use ADC_SCANCTRL_REF_x) |
Definition at line 312 of file adc_common.c.
References ADC_SCANCTRL.
void adc_set_scan_resolution | ( | uint32_t | adc, |
uint32_t | res | ||
) |
Set scan resolution of conversion.
[in] | adc | ADC (use ADCx) |
[in] | res | Resolution (use ADC_SCANCTRL_RES_*) |
Definition at line 344 of file adc_common.c.
References ADC_SCANCTRL.
void adc_set_scan_result_overflow_flag | ( | uint32_t | adc | ) |
Set scan result overflow flag.
[in] | adc | ADC (use ADCx) |
Definition at line 544 of file adc_common.c.
References ADC_IFS, and ADC_IFS_SCANOF.
void adc_set_scan_right_aligned | ( | uint32_t | adc | ) |
Set scan right aligned output.
[in] | adc | ADC (use ADCx) |
Definition at line 363 of file adc_common.c.
References ADC_SCANCTRL.
void adc_set_scan_single_ended | ( | uint32_t | adc | ) |
Set scan single ended conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 372 of file adc_common.c.
References ADC_SCANCTRL.
void adc_set_single_acquisition_cycle | ( | uint32_t | adc, |
uint32_t | at | ||
) |
Set single acquisition cycle.
[in] | adc | ADC (use ADCx) |
[in] | at | Acquisition time (use ADC_SINGLECTRL_AT_x) |
Definition at line 171 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_set_single_channel | ( | uint32_t | adc, |
uint8_t | ch | ||
) |
Set single channel.
[in] | adc | ADC (use ADCx) |
[in] | ch | Channel (use ADC_CHx and ADC_CH_*) |
Definition at line 193 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_INPUTSEL.
void adc_set_single_conversion_complete_flag | ( | uint32_t | adc | ) |
Set single conversion complete flag.
[in] | adc | ADC (use ADCx) |
Definition at line 535 of file adc_common.c.
References ADC_IFS, and ADC_IFS_SINGLE.
void adc_set_single_differential | ( | uint32_t | adc | ) |
Set single differential conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 242 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_DIFF.
void adc_set_single_left_aligned | ( | uint32_t | adc | ) |
Set single left aligned output.
[in] | adc | ADC (use ADCx) |
Definition at line 215 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_ADJ.
void adc_set_single_prs_trigger | ( | uint32_t | adc, |
uint8_t | prssel | ||
) |
Set single PRS trigger.
[in] | adc | ADC (use ADCx) |
[in] | prssel | PRS Selected (use PRS_CHx) |
Definition at line 141 of file adc_common.c.
References ADC_SINGLECTRL, and ADC_SINGLECTRL_PRSSEL_PRSCHx.
void adc_set_single_reference | ( | uint32_t | adc, |
uint32_t | ref | ||
) |
Set single reference for acquisition.
[in] | adc | ADC (use ADCx) |
[in] | ref | Reference (use ADC_SINGLECTRL_REF_x) |
Definition at line 182 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_set_single_resolution | ( | uint32_t | adc, |
uint32_t | res | ||
) |
Set single resolution of conversion.
[in] | adc | ADC (use ADCx) |
[in] | res | Resolution (use ADC_SINGLECTRL_RES_*) |
Definition at line 205 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_set_single_result_overflow_flag | ( | uint32_t | adc | ) |
Set single result overflow flag.
[in] | adc | ADC (use ADCx) |
Definition at line 526 of file adc_common.c.
References ADC_IFS, and ADC_IFS_SINGLEOF.
void adc_set_single_right_aligned | ( | uint32_t | adc | ) |
Set single right aligned output.
[in] | adc | ADC (use ADCx) |
Definition at line 224 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_set_single_single_ended | ( | uint32_t | adc | ) |
Set single single-ended conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 233 of file adc_common.c.
References ADC_SINGLECTRL.
void adc_set_warm_up | ( | uint32_t | adc, |
uint8_t | clocks | ||
) |
Set ADC warm up.
[in] | adc | ADC (use ADCx) |
[in] | clocks | Clock cycles (1 - 128) |
Definition at line 43 of file adc_common.c.
References ADC_CTRL, and ADC_CTRL_TIMEBASE.
void adc_set_warm_up_mode | ( | uint32_t | adc, |
uint32_t | warmupmode | ||
) |
Set warm up mode.
[in] | adc | ADC (use ADCx) |
[in] | warmupmode | Warm Up Mode (use ADC_CTRL_WARMUPMODE_*) |
Definition at line 93 of file adc_common.c.
References ADC_CTRL.
uint32_t adc_single_data | ( | uint32_t | adc | ) |
Get result from last scan conversion.
[in] | adc | ADC (use ADCx) |
Definition at line 599 of file adc_common.c.
References ADC_SINGLEDATA.
uint32_t adc_single_data_peak | ( | uint32_t | adc | ) |
Get result from last single conversion (peak) Reading result using this function will not clear SINGLEDV in ADC_STATUS or SINGLE DMA request.
[in] | adc | ADC (use ADCx) |
Definition at line 621 of file adc_common.c.
References ADC_SINGLEDATAP.
void adc_single_start | ( | uint32_t | adc | ) |
Start ADC in single acquisition.
[in] | adc | ADC (use ADCx) |
Definition at line 103 of file adc_common.c.
References ADC_CMD, and ADC_CMD_SINGLESTART.
void adc_single_stop | ( | uint32_t | adc | ) |
Stop ADC in single acquisition.
[in] | adc | ADC (use ADCx) |
Definition at line 112 of file adc_common.c.
References ADC_CMD, and ADC_CMD_SINGLESTOP.