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) 395 void *completedADCBuffer,
396 uint32_t completedChannel,
397 int_fast16_t status);
529 typedef void (*ADCBuf_CloseFxn) (ADCBuf_Handle handle);
536 typedef ADCBuf_Handle (*ADCBuf_OpenFxn) (ADCBuf_Handle handle,
544 typedef int_fast16_t (*ADCBuf_ControlFxn) (ADCBuf_Handle handle,
552 typedef void (*ADCBuf_InitFxn) (ADCBuf_Handle handle);
559 typedef int_fast16_t (*ADCBuf_ConvertFxn) (ADCBuf_Handle handle,
561 uint_fast8_t channelCount);
567 typedef int_fast16_t (*ADCBuf_ConvertCancelFxn)(ADCBuf_Handle handle);
574 typedef uint_fast8_t (*ADCBuf_GetResolutionFxn) (ADCBuf_Handle handle);
581 typedef int_fast16_t (*ADCBuf_adjustRawValuesFxn)(ADCBuf_Handle handle,
583 uint_fast16_t sampleCount,
584 uint32_t adcChannel);
591 typedef int_fast16_t (*ADCBuf_convertAdjustedToMicroVoltsFxn) (
592 ADCBuf_Handle handle,
594 void *adjustedSampleBuffer,
595 uint32_t outputMicroVoltBuffer[],
596 uint_fast16_t sampleCount);
606 ADCBuf_CloseFxn closeFxn;
608 ADCBuf_ControlFxn controlFxn;
610 ADCBuf_InitFxn initFxn;
612 ADCBuf_OpenFxn openFxn;
614 ADCBuf_ConvertFxn convertFxn;
617 ADCBuf_ConvertCancelFxn convertCancelFxn;
619 ADCBuf_GetResolutionFxn getResolutionFxn;
622 ADCBuf_adjustRawValuesFxn adjustRawValuesFxn;
624 ADCBuf_convertAdjustedToMicroVoltsFxn convertAdjustedToMicroVoltsFxn;
752 uint_fast8_t channelCount);
801 uint_fast16_t sampleCount,
825 ADCBuf_Handle handle,
827 void *adjustedSampleBuffer,
828 uint32_t outputMicroVoltBuffer[],
829 uint_fast16_t sampleCount);
ADC_Params params
Definition: Driver_Init.h:11
const ADCBuf_FxnTable * fxnTablePtr
Definition: ADCBuf.h:638
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:499
uint32_t samplingFrequency
Definition: ADCBuf.h:506
uint32_t adcChannel
Definition: ADCBuf.h:360
void * custom
Definition: ADCBuf.h:521
void * object
Definition: ADCBuf.h:641
ADCBuf parameters used with ADCBuf_open().
Definition: ADCBuf.h:485
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:603
void const * hwAttrs
Definition: ADCBuf.h:645
ADC driver's custom configuration structure.
Definition: ADCBuf.h:634
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:407
ADCBuf_Return_Mode
Return behavior for ADCBuf_convert() specified in the ADCBuf_Params.
Definition: ADCBuf.h:449
ADCBuf_Recurrence_Mode recurrenceMode
Definition: ADCBuf.h:518
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:515
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:393
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:509
int_fast16_t ADCBuf_convert(ADCBuf_Handle handle, ADCBuf_Conversion conversions[], uint_fast8_t channelCount)
Starts ADCBuf conversions on one or more channels.