27#if (HAL_USE_ADC == TRUE) || defined(__DOXYGEN__)
75#if ADC_USE_WAIT == TRUE
78#if ADC_USE_MUTUAL_EXCLUSION == TRUE
81#if defined(ADC_DRIVER_EXT_INIT_HOOK)
82 ADC_DRIVER_EXT_INIT_HOOK(adcp);
106#if defined(ADC_LLD_ENHANCED_API)
198 osalDbgCheck((adcp != NULL) && (grpp != NULL) && (samples != NULL) &&
199 (depth > 0U) && ((depth == 1U) || ((depth & 1U) == 0U)));
264#if (ADC_USE_WAIT == TRUE) || defined(__DOXYGEN__)
303#if (ADC_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__)
void adc_lld_stop_conversion(ADCDriver *adcp)
Stops an ongoing conversion.
struct hal_adc_driver ADCDriver
Type of a structure representing an ADC driver.
void adcStartConversionI(ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
Starts an ADC conversion.
void adc_lld_init(void)
Low level ADC driver initialization.
msg_t adcStart(ADCDriver *adcp, const ADCConfig *config)
Configures and activates the ADC peripheral.
void adcStop(ADCDriver *adcp)
Deactivates the ADC peripheral.
void adc_lld_start_conversion(ADCDriver *adcp)
Starts an ADC conversion.
void adc_lld_stop(ADCDriver *adcp)
Deactivates the ADC peripheral.
void adcAcquireBus(ADCDriver *adcp)
Gains exclusive access to the ADC peripheral.
struct hal_adc_configuration_group ADCConversionGroup
Conversion group configuration structure.
#define _adc_reset_s(adcp)
Resumes a thread waiting for a conversion completion.
struct hal_adc_config ADCConfig
Type of a structure representing an ADC driver configuration.
void adc_lld_start(ADCDriver *adcp)
Configures and activates the ADC peripheral.
void adcStopConversionI(ADCDriver *adcp)
Stops an ongoing conversion.
#define _adc_reset_i(adcp)
Resumes a thread waiting for a conversion completion.
void adcStartConversion(ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
Starts an ADC conversion.
void adcStopConversion(ADCDriver *adcp)
Stops an ongoing conversion.
uint16_t adcsample_t
ADC sample data type.
void adcObjectInit(ADCDriver *adcp)
Initializes the standard part of a ADCDriver structure.
void adcReleaseBus(ADCDriver *adcp)
Releases exclusive access to the ADC peripheral.
msg_t adcConvert(ADCDriver *adcp, const ADCConversionGroup *grpp, adcsample_t *samples, size_t depth)
Performs an ADC conversion.
void adcInit(void)
ADC Driver initialization.
static void osalSysLock(void)
Enters a critical zone from thread context.
static void osalMutexObjectInit(mutex_t *mp)
Initializes a mutex_t object.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
int32_t msg_t
Type of a message.
msg_t osalThreadSuspendS(thread_reference_t *trp)
Sends the current thread sleeping and sets a reference variable.
void osalMutexLock(mutex_t *mp)
Locks the specified mutex.
#define osalDbgAssert(c, remark)
Condition assertion.
void osalMutexUnlock(mutex_t *mp)
Unlocks the specified mutex.
#define osalDbgCheck(c)
Function parameters check.
#define osalDbgCheckClassI()
I-Class state check.
adcsample_t * samples
Current samples buffer pointer or NULL.
const ADCConversionGroup * grpp
Current conversion group pointer or NULL.
adcstate_t state
Driver state.
size_t depth
Current samples buffer depth or 0.
const ADCConfig * config
Current configuration data.
thread_reference_t thread
Waiting thread.
mutex_t mutex
Mutex protecting the peripheral.