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) 393 void *completedADCBuffer,
394 uint32_t completedChannel);
526 typedef void (*ADCBuf_CloseFxn) (ADCBuf_Handle handle);
533 typedef ADCBuf_Handle (*ADCBuf_OpenFxn) (ADCBuf_Handle handle,
541 typedef int_fast16_t (*ADCBuf_ControlFxn) (ADCBuf_Handle handle,
549 typedef void (*ADCBuf_InitFxn) (ADCBuf_Handle handle);
556 typedef int_fast16_t (*ADCBuf_ConvertFxn) (ADCBuf_Handle handle,
558 uint_fast8_t channelCount);
564 typedef int_fast16_t (*ADCBuf_ConvertCancelFxn)(ADCBuf_Handle handle);
571 typedef uint_fast8_t (*ADCBuf_GetResolutionFxn) (ADCBuf_Handle handle);
578 typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle,
580 uint_fast16_t sampleCount,
581 uint32_t adcChannel);
588 typedef int_fast16_t (*ADCBuf_convertAdjustedToMicroVoltsFxn) (
589 ADCBuf_Handle handle,
591 void *adjustedSampleBuffer,
592 uint32_t outputMicroVoltBuffer[],
593 uint_fast16_t sampleCount);
603 ADCBuf_CloseFxn closeFxn;
605 ADCBuf_ControlFxn controlFxn;
607 ADCBuf_InitFxn initFxn;
609 ADCBuf_OpenFxn openFxn;
611 ADCBuf_ConvertFxn convertFxn;
614 ADCBuf_ConvertCancelFxn convertCancelFxn;
616 ADCBuf_GetResolutionFxn getResolutionFxn;
619 ADCBuf_adjustRawValuesFxn adjustRawValuesFxn;
621 ADCBuf_convertAdjustedToMicroVoltsFxn convertAdjustedToMicroVoltsFxn;
749 uint_fast8_t channelCount);
798 uint_fast16_t sampleCount,
822 ADCBuf_Handle handle,
824 void *adjustedSampleBuffer,
825 uint32_t outputMicroVoltBuffer[],
826 uint_fast16_t sampleCount);
struct ADCBuf_Config ADCBuf_Config
ADC driver's custom configuration structure.
uint16_t samplesRequestedCount
Definition: ADCBuf.h:323
void * sampleBuffer
Definition: ADCBuf.h:330
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.
struct ADCBuf_Config * ADCBuf_Handle
A handle that is returned from an ADCBuf_open() call.
Definition: ADCBuf.h:306
int_fast16_t ADCBuf_control(ADCBuf_Handle handle, uint_fast16_t cmd, void *cmdArg)
Function performs implementation specific features on a driver instance.
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:496
uint32_t samplingFrequency
Definition: ADCBuf.h:503
uint32_t adcChannel
Definition: ADCBuf.h:360
void const * hwAttrs
Definition: ADCBuf.h:642
void * custom
Definition: ADCBuf.h:518
ADCBuf parameters used with ADCBuf_open().
Definition: ADCBuf.h:482
const ADCBuf_FxnTable * fxnTablePtr
Definition: ADCBuf.h:635
The definition of an ADCBuf function table that contains the required set of functions to control a s...
Definition: ADCBuf.h:600
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:404
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:446
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBuf.h:515
int_fast16_t ADCBuf_convertCancel(ADCBuf_Handle handle)
Cancels all ADCBuf conversions in progress.
void * arg
Definition: ADCBuf.h:353
void(* ADCBuf_Callback)(ADCBuf_Handle handle, ADCBuf_Conversion *conversion, void *completedADCBuffer, uint32_t completedChannel)
The definition of a callback function.
Definition: ADCBuf.h:391
ADC driver's custom configuration structure.
Definition: ADCBuf.h:631
Defines a conversion to be used with ADCBuf_convert().
Definition: ADCBuf.h:315
void ADCBuf_Params_init(ADCBuf_Params *params)
Initialize an ADCBuf_Params structure to its default values.
ADCBuf_Callback callbackFxn
Definition: ADCBuf.h:512
void * object
Definition: ADCBuf.h:638
ADCBuf_Handle ADCBuf_open(uint_least8_t index, ADCBuf_Params *params)
This function opens a given ADCBuf peripheral.
void * sampleBufferTwo
Definition: ADCBuf.h:341
ADCBuf_Return_Mode returnMode
Definition: ADCBuf.h:506
int_fast16_t ADCBuf_convert(ADCBuf_Handle handle, ADCBuf_Conversion conversions[], uint_fast8_t channelCount)
Starts ADCBuf conversions on one or more channels.