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,
395 int_fast16_t status);
527 typedef void (*ADCBuf_CloseFxn) (ADCBuf_Handle handle);
534 typedef ADCBuf_Handle (*ADCBuf_OpenFxn) (ADCBuf_Handle handle,
542 typedef int_fast16_t (*ADCBuf_ControlFxn) (ADCBuf_Handle handle,
550 typedef void (*ADCBuf_InitFxn) (ADCBuf_Handle handle);
557 typedef int_fast16_t (*ADCBuf_ConvertFxn) (ADCBuf_Handle handle,
559 uint_fast8_t channelCount);
565 typedef int_fast16_t (*ADCBuf_ConvertCancelFxn)(ADCBuf_Handle handle);
572 typedef uint_fast8_t (*ADCBuf_GetResolutionFxn) (ADCBuf_Handle handle);
579 typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle,
581 uint_fast16_t sampleCount,
582 uint32_t adcChannel);
589 typedef int_fast16_t (*ADCBuf_convertAdjustedToMicroVoltsFxn) (
590 ADCBuf_Handle handle,
592 void *adjustedSampleBuffer,
593 uint32_t outputMicroVoltBuffer[],
594 uint_fast16_t sampleCount);
604 ADCBuf_CloseFxn closeFxn;
606 ADCBuf_ControlFxn controlFxn;
608 ADCBuf_InitFxn initFxn;
610 ADCBuf_OpenFxn openFxn;
612 ADCBuf_ConvertFxn convertFxn;
615 ADCBuf_ConvertCancelFxn convertCancelFxn;
617 ADCBuf_GetResolutionFxn getResolutionFxn;
620 ADCBuf_adjustRawValuesFxn adjustRawValuesFxn;
622 ADCBuf_convertAdjustedToMicroVoltsFxn convertAdjustedToMicroVoltsFxn;
750 uint_fast8_t channelCount);
799 uint_fast16_t sampleCount,
823 ADCBuf_Handle handle,
825 void *adjustedSampleBuffer,
826 uint32_t outputMicroVoltBuffer[],
827 uint_fast16_t sampleCount);
const ADCBuf_FxnTable * fxnTablePtr
Definition: ADCBuf.h:636
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.
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:306
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:497
uint32_t samplingFrequency
Definition: ADCBuf.h:504
uint32_t adcChannel
Definition: ADCBuf.h:360
void * custom
Definition: ADCBuf.h:519
void * object
Definition: ADCBuf.h:639
ADCBuf parameters used with ADCBuf_open().
Definition: ADCBuf.h:483
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:601
void const * hwAttrs
Definition: ADCBuf.h:643
ADC driver's custom configuration structure.
Definition: ADCBuf.h:632
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:405
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:447
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBuf.h:516
int_fast16_t ADCBuf_convertCancel(ADCBuf_Handle handle)
Cancels all ADCBuf conversions in progress.
void * arg
Definition: ADCBuf.h:353
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:513
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:391
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:507
int_fast16_t ADCBuf_convert(ADCBuf_Handle handle, ADCBuf_Conversion conversions[], uint_fast8_t channelCount)
Starts ADCBuf conversions on one or more channels.