116#if defined(ADC_CR_JADSTART)
117 checks |= ADC_CR_JADSTART;
118 stops |= ADC_CR_JADSTP;
120 if (
ADC_CR(adc) & checks) {
122 while (
ADC_CR(adc) & checks);
274 ADC_IER(adc) &= ~ADC_IER_OVRIE;
319 ADC_IER(adc) &= ~ADC_IER_EOCIE;
#define ADC_CCR_TSEN
TSEN: Enable Temperature Sensor.
#define ADC_CCR_VREFEN
VREFEN: Enable internal Voltage Reference.
#define ADC_CFGR1_DMAEN
DMAEN: Direct memory access enable.
#define ADC_CFGR1_CONT
CONT: Single / continuous conversion mode for regular conversions.
#define ADC_CFGR1_ALIGN
ALIGN: Data alignment.
#define ADC_CFGR1_AUTDLY
AUTDLY: Delayed conversion mode.
#define ADC_CFGR1_DMACFG
DMACFG: Direct memory access configuration.
#define ADC_CR_ADSTART
ADSTART: ADC start of regular conversion.
#define ADC_CR_ADEN
ADEN: ADC enable control.
#define ADC_CR_ADSTP
ADSTP: ADC stop of regular conversion command.
#define ADC_CR_ADCAL
ADCAL: ADC calibration.
#define ADC_CR_ADDIS
ADDIS: ADC disable command.
void adc_enable_delayed_conversion_mode(uint32_t adc)
Enable Delayed Conversion Mode.
void adc_start_conversion_regular(uint32_t adc)
ADC Software Triggered Conversion on Regular Channels.
void adc_disable_temperature_sensor(void)
Disable the temperature sensor (only)
void adc_disable_overrun_interrupt(uint32_t adc)
ADC Disable the Overrun Interrupt.
void adc_power_off(uint32_t adc)
Turn off the ADC This will actually block if it needs to turn off a currently running conversion,...
void adc_enable_vrefint(void)
Enable the internal voltage reference (only) The channel this is available on is unfortunately not co...
void adc_enable_dma_circular_mode(uint32_t adc)
Enable circular mode for DMA transfers.
void adc_calibrate_async(uint32_t adc)
Start the ADC calibration and immediately return.
void adc_disable_vrefint(void)
Disable the internal voltage reference (only)
void adc_set_continuous_conversion_mode(uint32_t adc)
Enable Continuous Conversion Mode In this mode the ADC starts a new conversion of a single channel or...
bool adc_is_calibrating(uint32_t adc)
Is the ADC Calibrating?
void adc_clear_overrun_flag(uint32_t adc)
ADC Clear Overrun Flags.
void adc_set_single_conversion_mode(uint32_t adc)
Enable Single Conversion Mode In this mode the ADC performs a conversion of one channel or a channel ...
bool adc_is_power_on(uint32_t adc)
Is the ADC powered up and ready?
void adc_power_on_async(uint32_t adc)
Turn on the ADC (async)
void adc_set_resolution(uint32_t adc, uint16_t resolution)
ADC Set Resolution.
void adc_power_on(uint32_t adc)
Turn on the ADC.
uint32_t adc_read_regular(uint32_t adc)
ADC Read from the Regular Conversion Result Register.
void adc_enable_eoc_interrupt(uint32_t adc)
ADC Enable Regular End-Of-Conversion Interrupt.
void adc_disable_eoc_interrupt(uint32_t adc)
ADC Disable Regular End-Of-Conversion Interrupt.
bool adc_eos(uint32_t adc)
ADC Read the End-of-Sequence Flag for Regular Conversions.
void adc_enable_temperature_sensor(void)
Enable the temperature sensor (only) The channel this is available on is unfortunately not consistent...
void adc_disable_dma(uint32_t adc)
ADC Disable DMA Transfers.
void adc_set_left_aligned(uint32_t adc)
ADC Set the Data as Left Aligned.
void adc_power_off_async(uint32_t adc)
Turn off the ADC (async) This will actually block if it needs to turn off a currently running convers...
void adc_set_right_aligned(uint32_t adc)
ADC Set the Data as Right Aligned.
void adc_disable_delayed_conversion_mode(uint32_t adc)
Enable Delayed Conversion Mode.
void adc_enable_overrun_interrupt(uint32_t adc)
ADC Enable the Overrun Interrupt.
void adc_enable_dma(uint32_t adc)
ADC Enable DMA Transfers.
void adc_disable_dma_circular_mode(uint32_t adc)
Disable circular mode for DMA transfers.
bool adc_get_overrun_flag(uint32_t adc)
ADC Read the Overrun Flag.
bool adc_is_power_off(uint32_t adc)
Is the ADC powered down?
void adc_calibrate(uint32_t adc)
Start ADC calibration and wait for it to finish.
bool adc_eoc(uint32_t adc)
ADC Read the End-of-Conversion Flag.
#define ADC_IER_OVRIE
OVRIE: Overrun interrupt enable.
#define ADC_IER_EOCIE
EOCIE: End of regular conversion interrupt enable.
#define ADC_ISR_ADRDY
ADRDY: Ready flag.
#define ADC_ISR_EOS
EOS: End of sequence conversions flag.
#define ADC_ISR_OVR
OVR: Overrun flag.
#define ADC_ISR_EOC
EOS: End of regular conversion flag.
#define ADC_CR(adc)
Control Register.
#define ADC_ISR(adc)
ADC interrupt and status register.
#define ADC_CCR(adc)
Common Configuration register.
#define ADC_IER(adc)
Interrupt Enable Register.
#define ADC_DR(adc)
Regular Data Register.
#define ADC_CFGR1(adc)
Configuration Register 1.