181 #ifndef ti_drivers_ADC__include 182 #define ti_drivers_ADC__include 195 #define ADC_convertRawToMicroVolts ADC_convertToMicroVolts 215 #define ADC_CMD_RESERVED (32) 230 #define ADC_STATUS_RESERVED (-32) 240 #define ADC_STATUS_SUCCESS (0) 248 #define ADC_STATUS_ERROR (-1) 257 #define ADC_STATUS_UNDEFINEDCMD (-2) 305 typedef void (*ADC_CloseFxn)(ADC_Handle handle);
312 typedef int_fast16_t (*ADC_ControlFxn)(ADC_Handle handle, uint_fast16_t cmd,
void *arg);
319 typedef int_fast16_t (*ADC_ConvertFxn)(ADC_Handle handle, uint16_t *value);
326 typedef int_fast16_t (*ADC_ConvertChainFxn)(ADC_Handle *handleList, uint16_t *dataBuffer, uint8_t channelCount);
333 typedef uint32_t (*ADC_ConvertToMicroVoltsFxn)(ADC_Handle handle, uint16_t adcValue);
340 typedef void (*ADC_InitFxn)(ADC_Handle handle);
357 ADC_CloseFxn closeFxn;
360 ADC_ControlFxn controlFxn;
363 ADC_ConvertFxn convertFxn;
366 ADC_ConvertChainFxn convertChainFxn;
369 ADC_ConvertToMicroVoltsFxn convertToMicroVolts;
406 extern void ADC_close(ADC_Handle handle);
429 extern int_fast16_t
ADC_control(ADC_Handle handle, uint_fast16_t cmd,
void *arg);
448 extern int_fast16_t
ADC_convert(ADC_Handle handle, uint16_t *value);
470 extern int_fast16_t
ADC_convertChain(ADC_Handle *handleList, uint16_t *dataBuffer, uint8_t channelCount);
ADC driver's custom configuration structure.
Definition: ADC.h:385
ADC_Params params
Definition: Driver_Init.h:11
int_fast16_t ADC_convert(ADC_Handle handle, uint16_t *value)
Function to perform an ADC conversion.
ADC Parameters used with ADC_open().
Definition: ADC.h:287
void ADC_init(void)
Function to initialize the ADC driver.
uint32_t ADC_convertToMicroVolts(ADC_Handle handle, uint16_t adcValue)
Function to convert a raw ADC sample into microvolts.
void ADC_Params_init(ADC_Params *params)
Initialize an ADC_Params structure to its default values.
ADC_FxnTable const * fxnTablePtr
Definition: ADC.h:389
int_fast16_t ADC_control(ADC_Handle handle, uint_fast16_t cmd, void *arg)
Function performs implementation specific features on a driver instance.
ADC_Handle ADC_open(uint_least8_t index, ADC_Params *params)
Function to initialize the ADC peripheral.
void const * hwAttrs
Definition: ADC.h:396
struct ADC_Config_ ADC_Config
ADC driver's custom configuration structure.
The definition of an ADC function table that contains the required set of functions to control a spec...
Definition: ADC.h:354
void * object
Definition: ADC.h:392
struct ADC_Config_ * ADC_Handle
A handle that is returned from an ADC_open() call.
Definition: ADC.h:277
bool isProtected
Definition: ADC.h:291
void ADC_close(ADC_Handle handle)
Function to close an ADC driver instance.
int_fast16_t ADC_convertChain(ADC_Handle *handleList, uint16_t *dataBuffer, uint8_t channelCount)
Function to perform a multi-channel ADC conversion.
void * custom
Definition: ADC.h:289