Functions

group group_sar_functions

Defines

Cy_SAR_Sleep

This macro is for backward compatibility macro for driver v1.10 and before, the preferred API is Cy_SAR_DeepSleep.

Functions

__STATIC_INLINE void Cy_SAR_SimultStart (PASS_Type *base, uint32_t sarMask, cy_en_sar_start_convert_sel_t mode)

Simultaneously starts two or more SARs.

Return

None

Function Usage

    /* Scenario: Simultaneously start continuous SAR0 and SAR1 scan */
    Cy_SAR_SimultStart(PASS, CY_SAR_SAR0 | CY_SAR_SAR1, CY_SAR_START_CONVERT_CONTINUOUS);

    /* Scenario: Stop SAR0 and SAR1 continuous scan */
    Cy_SAR_SimultStop(PASS, CY_SAR_SAR0 | CY_SAR_SAR1);

Parameters
  • base: Pointer to structure describing PASS registers.

  • sarMask: specifies which SAR instances will be started. Mask should contain at least two SAR instances for operation.

  • mode: specifies mode of SARs operation.

__STATIC_INLINE void Cy_SAR_SimultStop (PASS_Type *base, uint32_t sarMask)

Stops the selected SARs.

Return

None

Function Usage

    /* Scenario: Simultaneously start continuous SAR0 and SAR1 scan */
    Cy_SAR_SimultStart(PASS, CY_SAR_SAR0 | CY_SAR_SAR1, CY_SAR_START_CONVERT_CONTINUOUS);

    /* Scenario: Stop SAR0 and SAR1 continuous scan */
    Cy_SAR_SimultStop(PASS, CY_SAR_SAR0 | CY_SAR_SAR1);

Parameters
  • base: Pointer to structure describing PASS registers.

  • sarMask: specifies which SAR instances should be stopped.