XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Functions

This module handles the ADC Channel configurations, manages the buffers & callbacks for the multiple ADC users centrally and independently. More...

+ Collaboration diagram for ADC:

Files

file  AdcCentral.h
 

Data Structures

struct  AdcCentral_ConfigScan_S
 struct to configure ADC in scan mode More...
 
struct  AdcCentral_ConfigSingle_S
 struct to configure ADC in single mode More...
 

Typedefs

typedef struct
AdcCentral_ConfigScan_S 
AdcCentral_ConfigScan_T
 
typedef struct
AdcCentral_ConfigScan_S
AdcCentral_ConfigScanPtr_T
 
typedef struct
AdcCentral_ConfigSingle_S 
AdcCentral_ConfigSingle_T
 
typedef struct
AdcCentral_ConfigSingle_S
AdcCentral_ConfigSinglePtr_T
 
typedef void(* AdcCentral_ScanCallback_T )(ADC_T adc, uint32_t samplingFrequency, uint16_t *buffer)
 Application callback for scan channel configuration. More...
 
typedef void(* AdcCentral_SingleCallback_T )(ADC_T adc, uint16_t *buffer)
 Application callback template for single channel configuration. More...
 

Functions

Retcode_T AdcCentral_DeInit (void)
 De-Initialize the ADC Module. More...
 
Retcode_T AdcCentral_Init (void)
 Initialize the ADC Central Module. More...
 
Retcode_T AdcCentral_StartScan (ADC_T adc, AdcCentral_ConfigScanPtr_T configScan)
 Start Scan Mode on ADC Interface & Start the PRS Timer as producer. More...
 
Retcode_T AdcCentral_StartSingle (ADC_T adc, AdcCentral_ConfigSinglePtr_T configStart)
 Start Single Mode on ADC Interface. More...
 
Retcode_T AdcCentral_StopScan (ADC_T adc, uint32_t ChannelScanMask)
 Stop the Scan mode on ADC Interface and stops the PRS timer used for sampling adc channels. More...
 

Detailed Description


Data Structure Documentation

struct AdcCentral_ConfigScan_S

Data Fields

AdcCentral_ScanCallback_T Appcallback
 
uint16_t * BufferPtr
 
uint32_t ChannelScanMask
 
uint32_t SamplingRateInHz
 

Field Documentation

uint16_t* BufferPtr
uint32_t ChannelScanMask
uint32_t SamplingRateInHz
struct AdcCentral_ConfigSingle_S

Data Fields

Adc_AcqTime_T AcqTime
 
AdcCentral_SingleCallback_T Appcallback
 
uint16_t * BufferPtr
 
Adc_Channel_T Channel
 
Adc_Reference_T Reference
 
Adc_Resolution_T Resolution
 

Field Documentation

Adc_AcqTime_T AcqTime
uint16_t* BufferPtr
Adc_Channel_T Channel
Adc_Reference_T Reference
Adc_Resolution_T Resolution

Typedef Documentation

typedef void(* AdcCentral_ScanCallback_T)(ADC_T adc, uint32_t samplingFrequency, uint16_t *buffer)
Parameters
[out]adcMCU handle for ADC
[out]samplingFrequencystructure holding data and its sampling frequency
[out]bufferpointer pointing to the ADC samples
typedef void(* AdcCentral_SingleCallback_T)(ADC_T adc, uint16_t *buffer)
Parameters
[in]adcMCU handle for ADC
[out]bufferpointer pointing to the ADC samples

Function Documentation

Retcode_T AdcCentral_DeInit ( void  )
Return values
RETCODE_OKupon successful execution, error otherwise

+ Here is the call graph for this function:

Retcode_T AdcCentral_Init ( void  )
Return values
RETCODE_OKupon successful execution, error otherwise

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T AdcCentral_StartScan ( ADC_T  adc,
AdcCentral_ConfigScanPtr_T  configScan 
)
Parameters
[in]adc: ADC handle.
[in]configScan: Structure which holds the configurations related to scan mode.

Three channels(CH4, CH5 & CH6) are supported for the ADC scan & maximum 3 independent users can be possible. Number of samples is fixed to 256 samples per channel. So if multiple channels are enabled by single user then provide buffer accordingly. ADC sampling is done with the user which has the highest sampling frequency. Lower sampling frequency users are notified with ADC callback on multiples of higher sampling frequency user. Independent sampling frequency works better when lower sampling frequency is multiples of higher sampling frequency. So when ADC Scan complete callback is triggered for the users actual frequency at which the adc samples provided is notified with the sampleFrequency parameter in the AdcCentral_SingleCallback_T callback.

Return values
RETCODE_OKupon successful execution, error otherwise

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T AdcCentral_StartSingle ( ADC_T  adc,
AdcCentral_ConfigSinglePtr_T  configStart 
)
Parameters
[in]adc: ADC handle.
[in]configStart: Structure which holds the configurations(Resolution, ADC reference,callback) related to single mode.
Return values
RETCODE_OKupon successful execution, error otherwise

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T AdcCentral_StopScan ( ADC_T  adc,
uint32_t  ChannelScanMask 
)
Parameters
[in]adc: ADC handle.
[in]ChannelScanMask: Channel in which scan has to be stopped
Return values
RETCODE_OKupon successful execution, error otherwise

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:50 by doxygen 1.8.8