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