ChibiOS/HAL  6.1.0
hal_adc.h File Reference

ADC Driver macros and structures. More...

#include "hal_adc_lld.h"

Go to the source code of this file.

Macros

ADC configuration options
#define ADC_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define ADC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the adcAcquireBus() and adcReleaseBus() APIs. More...
 
Low level driver helper macros
#define _adc_reset_i(adcp)   osalThreadResumeI(&(adcp)->thread, MSG_RESET)
 Resumes a thread waiting for a conversion completion. More...
 
#define _adc_reset_s(adcp)   osalThreadResumeS(&(adcp)->thread, MSG_RESET)
 Resumes a thread waiting for a conversion completion. More...
 
#define _adc_wakeup_isr(adcp)
 Wakes up the waiting thread. More...
 
#define _adc_timeout_isr(adcp)
 Wakes up the waiting thread with a timeout message. More...
 
#define _adc_isr_half_code(adcp)
 Common ISR code, half buffer event. More...
 
#define _adc_isr_full_code(adcp)
 Common ISR code, full buffer event. More...
 
#define _adc_isr_error_code(adcp, err)
 Common ISR code, error event. More...
 

Enumerations

Functions

void adcInit (void)
 ADC Driver initialization. More...
 
void adcObjectInit (ADCDriver *adcp)
 Initializes the standard part of a ADCDriver structure. More...
 
void adcStart (ADCDriver *adcp, const ADCConfig *config)
 Configures and activates the ADC peripheral. More...
 
void adcStop (ADCDriver *adcp)
 Deactivates the ADC peripheral. More...
 
void adcStartConversion (ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
 Starts an ADC conversion. More...
 
void adcStartConversionI (ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
 Starts an ADC conversion. More...
 
void adcStopConversion (ADCDriver *adcp)
 Stops an ongoing conversion. More...
 
void adcStopConversionI (ADCDriver *adcp)
 Stops an ongoing conversion. More...
 
msg_t adcConvert (ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
 Performs an ADC conversion. More...
 
void adcAcquireBus (ADCDriver *adcp)
 Gains exclusive access to the ADC peripheral. More...
 
void adcReleaseBus (ADCDriver *adcp)
 Releases exclusive access to the ADC peripheral. More...
 

Detailed Description

ADC Driver macros and structures.

Definition in file hal_adc.h.