TI-RTOS Drivers  tidrivers_full_2_20_00_08
Macros
ADCBuf_CMD

Macros

#define ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 1
 This control function acquires the semaphore that arbitrates access to the ADC between the CM3 and the sensor controller. More...
 
#define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 2
 This function makes the ADC driver keep the ADC semaphore until released. More...
 
#define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE   ADCBuf_CMD_RESERVED + 3
 This function makes the ADC driver no longer keep the ADC semaphore until released. More...
 
#define ADCBufCC26XX_CMD_RELEASE_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 4
 This function releases the ADC semaphore. More...
 

Detailed Description

ADCBufCC26XX_CMD_* macros are command codes only defined in the ADCBufCC26XX.h driver implementation and need to:

#include <ti/drivers/adc/ADCBufCC26XX.h>

Macro Definition Documentation

#define ADCBufCC26XX_CMD_ACQUIRE_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 1

This control function acquires the semaphore that arbitrates access to the ADC between the CM3 and the sensor controller.

This function pre-acquires the ADC semaphore before ADCBuf_convert() is called by the application. Normally, the ADC driver acquires the ADC semaphore when calling ADCBufCC26XX_convert(). The driver may need to wait for the sensor controller to release the semaphore in order to access the ADC hardware module. Consequently, the time at which the conversion is actually made is normally non-deterministic. Pre-acquiring the semaphore makes the ADCBuf_convert() call deterministic.

Note
This function returns an error if the handle is not open or a transfer is in progress
#define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 2

This function makes the ADC driver keep the ADC semaphore until released.

Calling this function will make the ADC driver keep the ADC semaphore until it is released by the application by calling the control function ADCBufCC26XX_CMD_RELEASE_ADC_SEMAPHORE. This enables multiple deterministic conversions to be made. Usually, the driver will release the semaphore after the conversion finishes.

Warning
The sensor controller can no longer access the ADC until the semaphore is released by the application manually.
See also
ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE
#define ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE   ADCBuf_CMD_RESERVED + 3

This function makes the ADC driver no longer keep the ADC semaphore until released.

This function effectively reverses a call to ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE_DISABLE.

See also
ADCBufCC26XX_CMD_KEEP_ADC_SEMAPHORE
#define ADCBufCC26XX_CMD_RELEASE_ADC_SEMAPHORE   ADCBuf_CMD_RESERVED + 4

This function releases the ADC semaphore.

Note
This function returns an error if the handle is not open or a transfer is in progress
Copyright 2016, Texas Instruments Incorporated