![]() |
![]() |
SAR functional layer API header file. More...
#include <cslr.h>#include <soc.h>#include <csl_error.h>#include <csl_types.h>#include <csl_general.h>Go to the source code of this file.
Data Structures | |
| struct | CSL_SarChSetup |
| Input parameters for setup API. More... | |
| struct | CSL_SarHandleObj |
| structure parameters for SAR handler More... | |
| struct | CSL_SarChConfig |
| structure parameters for SAR Register Configuration API More... | |
Defines | |
| #define | CSL_SAR_MAX_CLKDIV 127 |
| #define | CSL_SAR_NUM_CHANNEL 6 |
| #define | CSL_SAR_NUM_GPAIN 4 |
| #define | CSL_SAR_ADC_BUSY 1 |
| #define | CSL_SAR_DATA_AVAILABLE 0 |
| #define | CSL_SAR_ADC_START 1 |
| #define | CSL_SAR_OPEN 1 |
| #define | CSL_SAR_CLOSE 0 |
Typedefs | |
| typedef CSL_SarHandleObj * | SAR_Handle |
| Pointer to SAR object handler. | |
Enumerations | |
| enum | CSL_SarChanSel { CSL_SAR_CHAN_0 = 0, CSL_SAR_CHAN_1 = 1, CSL_SAR_CHAN_2 = 2, CSL_SAR_CHAN_3 = 3, CSL_SAR_CHAN_4 = 4, CSL_SAR_CHAN_5 = 5, CSL_SAR_NO_CHAN = 6 } |
| Enumeration for SAR channel selection. More... | |
| enum | CSL_SarOpMode { CSL_SAR_POLLING = 0, CSL_SAR_INTERRUPT = 1, CSL_SAR_DMA = 2 } |
| Enumeration for Selection mode of SAR - To configure Status bit in SAR A/D Reference and Pin Register. More... | |
| enum | CSL_SarChanCyc { CSL_SAR_CONTINUOUS_CONVERSION = 0, CSL_SAR_SINGLE_CONVERSION = 1 } |
| Enumeration for SAR Single Cycle Operation To configure SingleCyc bit in SAR A/D Control Register. More... | |
| enum | CSL_SarMultiCh { CSL_SAR_NO_DISCHARGE = 0, CSL_SAR_DISCHARGE_ARRAY = 1 } |
| Enumeration for SAR Multi Channel Operation To configure MultiCh bit in SAR A/D Control Register. More... | |
| enum | CSL_RefVoltage { CSL_SAR_REF_0_8v = 0, CSL_SAR_REF_1v = 1, CSL_SAR_REF_VIN = 2 } |
| Enumeration for SAR Reference voltage selection. More... | |
| enum | CSL_SarGPOPinSel { CSL_SAR_GPO_0 = 0, CSL_SAR_GPO_1 = 1, CSL_SAR_GPO_2 = 2, CSL_SAR_GPO_3 = 3 } |
| Enumeration for SAR GPAIN Pin Index. More... | |
| enum | CSL_SarGPODir { CSL_SAR_GPO_IN = 0, CSL_SAR_GPO_OUT = 1 } |
| Enumeration for SAR General Purpose Pin Direction. More... | |
| enum | CSL_SARMeasParam { CSL_KEYPAD_MEAS = 0, CSL_BATTRY_MEAS = 1, CSL_INT_VOLT_MEAS = 2, CSL_VOLUME_CTRL = 3, CSL_TOUCH_SCREEN_XAXIS = 4, CSL_TOUCH_SCREEN_YAXIS = 5, CSL_PEN_PRESS_DOWN = 6 } |
| Enumeration for Selecting type of A/D conversion. More... | |
Functions | |
| CSL_Status | SAR_init (void) |
| CSL_Status | SAR_deInit (void) |
| CSL_Status | SAR_chanOpen (CSL_SarHandleObj *Sarobj, CSL_SarChanSel chanSel) |
| CSL_Status | SAR_chanClose (CSL_SarHandleObj *hsar) |
| CSL_Status | SAR_chanInit (SAR_Handle hSar) |
| CSL_Status | SAR_chanConfig (CSL_SarHandleObj *pSarHandle, CSL_SarChConfig *pConfigParam) |
| CSL_Status | SAR_getConfig (CSL_SarHandleObj *pSarHandle, CSL_SarChConfig *pConfigParam) |
| CSL_Status | SAR_chanSetup (CSL_SarHandleObj *pSarHandle, CSL_SarChSetup *pSarParam) |
| CSL_Status | SAR_chanCycSet (CSL_SarHandleObj *hSar, CSL_SarChanCyc cycSelect) |
| CSL_Status | SAR_startConversion (CSL_SarHandleObj *hSar) |
| CSL_Status | SAR_stopConversion (CSL_SarHandleObj *hSar) |
| CSL_Status | SAR_A2DMeasParamSet (CSL_SarHandleObj *hSar, CSL_SARMeasParam param, CSL_SarChanSel *chanNo) |
| CSL_Status | SAR_readData (CSL_SarHandleObj *hSar, Uint16 *buffer) |
| CSL_Status | SAR_GPODirSet (CSL_SarHandleObj *hSar, CSL_SarGPOPinSel Index, CSL_SarGPODir dir) |
| Bool | SAR_getStatus (CSL_SarHandleObj *hSar, CSL_Status *status) |
SAR functional layer API header file.
Path: \(CSLPATH)\inc
1.7.4