MTB CAT1 Peripheral driver library
Common triggering Functions for multiple SAR instances

General Description

This set of functions is for initialization and usage of SAR common settings and simultaneous triggering.

Functions

cy_en_sar_status_t Cy_SAR_CommonInit (PASS_Type *base, const cy_stc_sar_common_config_t *trigConfig)
 Initialize common SAR configuration registers. More...
 

Function Documentation

◆ Cy_SAR_CommonInit()

cy_en_sar_status_t Cy_SAR_CommonInit ( PASS_Type *  base,
const cy_stc_sar_common_config_t trigConfig 
)

Initialize common SAR configuration registers.

Parameters
basePointer to structure describing PASS registers.
trigConfigPointer to structure containing configuration data. See cy_stc_sar_common_config_t.
Returns
Function Usage
{
/* .pwrUpDelay */ 0UL,
/* .scanCount */ 16UL,
/* .simultControl */ CY_SAR_SAR0 | CY_SAR_SAR1,
/* .simultTrigSource */ CY_SAR_SAR0,
/* .simultTrigEvent */ CY_SAR_SIMULT_TRIG_EVENT_EDGE,
/* .simultTrigSync */ CY_SAR_SIMULT_TRIG_SYNC_SAR_CLOCK,
/* .simultSamplesPerTrigger */ CY_SAR_SIMULT_TRIG_SAMPLE_SCAN_CNT,
/* .simultEOSIntrSelect */ CY_SAR_SIMULT_TRIG_INTR_EOS
};
status = Cy_SAR_CommonInit(PASS, &config);
if (CY_SAR_SUCCESS != status)
{
/* Insert error handling */
}