211 #ifndef ti_drivers_adcbuf__include 212 #define ti_drivers_adcbuf__include 237 #define ADCBuf_CMD_RESERVED (32) 251 #define ADCBuf_STATUS_RESERVED (-32) 262 #define ADCBuf_STATUS_SUCCESS (0) 270 #define ADCBuf_STATUS_ERROR (-1) 279 #define ADCBuf_STATUS_UNDEFINEDCMD (-2) 285 #define ADCBuf_STATUS_UNSUPPORTED (-3) 394 void *completedADCBuffer,
395 uint32_t completedChannel,
396 int_fast16_t status);
528 typedef void (*ADCBuf_CloseFxn)(ADCBuf_Handle handle);
542 typedef int_fast16_t (*ADCBuf_ControlFxn)(ADCBuf_Handle handle, uint_fast8_t cmd,
void *arg);
548 typedef void (*ADCBuf_InitFxn)(ADCBuf_Handle handle);
555 typedef int_fast16_t (*ADCBuf_ConvertFxn)(ADCBuf_Handle handle,
557 uint_fast8_t channelCount);
563 typedef int_fast16_t (*ADCBuf_ConvertCancelFxn)(ADCBuf_Handle handle);
570 typedef uint_fast8_t (*ADCBuf_GetResolutionFxn)(ADCBuf_Handle handle);
577 typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle,
579 uint_fast16_t sampleCount,
580 uint32_t adcChannel);
587 typedef int_fast16_t (*ADCBuf_convertAdjustedToMicroVoltsFxn)(ADCBuf_Handle handle,
589 void *adjustedSampleBuffer,
590 uint32_t outputMicroVoltBuffer[],
591 uint_fast16_t sampleCount);
601 ADCBuf_CloseFxn closeFxn;
603 ADCBuf_ControlFxn controlFxn;
605 ADCBuf_InitFxn initFxn;
607 ADCBuf_OpenFxn openFxn;
609 ADCBuf_ConvertFxn convertFxn;
612 ADCBuf_ConvertCancelFxn convertCancelFxn;
614 ADCBuf_GetResolutionFxn getResolutionFxn;
617 ADCBuf_adjustRawValuesFxn adjustRawValuesFxn;
619 ADCBuf_convertAdjustedToMicroVoltsFxn convertAdjustedToMicroVoltsFxn;
678 extern int_fast16_t
ADCBuf_control(ADCBuf_Handle handle, uint_fast16_t cmd,
void *cmdArg);
792 uint_fast16_t sampleCount,
817 void *adjustedSampleBuffer,
818 uint32_t outputMicroVoltBuffer[],
819 uint_fast16_t sampleCount);
ADC_Params params
Definition: Driver_Init.h:11
const ADCBuf_FxnTable * fxnTablePtr
Definition: ADCBuf.h:633
uint16_t samplesRequestedCount
Definition: ADCBuf.h:322
void * sampleBuffer
Definition: ADCBuf.h:329
void ADCBuf_close(ADCBuf_Handle handle)
Function to close an ADCBuf driver instance.
int_fast16_t ADCBuf_adjustRawValues(ADCBuf_Handle handle, void *sampleBuf, uint_fast16_t sampleCount, uint32_t adcChan)
Adjust a raw ADC output buffer. The function does the adjustment in-place.
int_fast16_t ADCBuf_control(ADCBuf_Handle handle, uint_fast16_t cmd, void *cmdArg)
Function performs implementation specific features on a driver instance.
struct ADCBuf_Config_ * ADCBuf_Handle
A handle that is returned from an ADCBuf_open() call.
Definition: ADCBuf.h:305
void ADCBuf_init(void)
Function to initialize the ADCBuf driver.
uint_fast8_t ADCBuf_getResolution(ADCBuf_Handle handle)
Returns the resolution in bits of the specified ADCBuf instance.
uint32_t blockingTimeout
Definition: ADCBuf.h:498
uint32_t samplingFrequency
Definition: ADCBuf.h:505
uint32_t adcChannel
Definition: ADCBuf.h:359
void * custom
Definition: ADCBuf.h:520
void * object
Definition: ADCBuf.h:636
ADCBuf parameters used with ADCBuf_open().
Definition: ADCBuf.h:484
struct ADCBuf_Config_ ADCBuf_Config
ADC driver's custom configuration structure.
The definition of an ADCBuf function table that contains the required set of functions to control a s...
Definition: ADCBuf.h:598
void const * hwAttrs
Definition: ADCBuf.h:640
ADC driver's custom configuration structure.
Definition: ADCBuf.h:629
int_fast16_t ADCBuf_convertAdjustedToMicroVolts(ADCBuf_Handle handle, uint32_t adcChan, void *adjustedSampleBuffer, uint32_t outputMicroVoltBuffer[], uint_fast16_t sampleCount)
Convert an adjusted ADC output buffer to microvolts.
ADCBuf_Recurrence_Mode
Recurrence behavior of a ADCBuf_Conversion specified in the ADCBuf_Params.
Definition: ADCBuf.h:406
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:448
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBuf.h:517
int_fast16_t ADCBuf_convertCancel(ADCBuf_Handle handle)
Cancels all ADCBuf conversions in progress.
void * arg
Definition: ADCBuf.h:352
Defines a conversion to be used with ADCBuf_convert().
Definition: ADCBuf.h:314
void ADCBuf_Params_init(ADCBuf_Params *params)
Initialize an ADCBuf_Params structure to its default values.
ADCBuf_Callback callbackFxn
Definition: ADCBuf.h:514
void(* ADCBuf_Callback)(ADCBuf_Handle handle, ADCBuf_Conversion *conversion, void *completedADCBuffer, uint32_t completedChannel, int_fast16_t status)
The definition of a callback function.
Definition: ADCBuf.h:392
ADCBuf_Handle ADCBuf_open(uint_least8_t index, ADCBuf_Params *params)
This function opens a given ADCBuf peripheral.
void * sampleBufferTwo
Definition: ADCBuf.h:340
ADCBuf_Return_Mode returnMode
Definition: ADCBuf.h:508
int_fast16_t ADCBuf_convert(ADCBuf_Handle handle, ADCBuf_Conversion conversions[], uint_fast8_t channelCount)
Starts ADCBuf conversions on one or more channels.