MTB CAT1 Peripheral driver library
Enumerated Types

General Description

API Reference

 Control Register Enums
 This set of enumerations aids in configuring the SAR CTRL register.
 
 Sample Control Register Enums
 This set of enumerations are used in configuring the SAR SAMPLE_CTRL register.
 
 Sample Time Register Enums
 This set of enumerations aids in configuring the SAR SAMPLE_TIME* registers.
 
 Range Interrupt Register Enums
 This set of enumerations aids in configuring the SAR RANGE* registers.
 
 Channel Configuration Register Enums
 This set of enumerations aids in configuring the SAR CHAN_CONFIG register.
 
 SARMUX Switch Control Register Enums
 This set of enumerations aids in configuring the uint32_t muxSwitch and uint32_t muxSwitchSqCtrl registers.
 

Enumerations

enum  cy_en_sar_status_t {
  CY_SAR_SUCCESS = 0x00UL,
  CY_SAR_BAD_PARAM = CY_SAR_ID | CY_PDL_STATUS_ERROR | 0x01UL,
  CY_SAR_TIMEOUT = CY_SAR_ID | CY_PDL_STATUS_ERROR | 0x02UL,
  CY_SAR_CONVERSION_NOT_COMPLETE = CY_SAR_ID | CY_PDL_STATUS_ERROR | 0x03UL
}
 The SAR status/error code definitions. More...
 
enum  cy_en_sar_start_convert_sel_t {
  CY_SAR_START_CONVERT_SINGLE_SHOT = 0UL,
  CY_SAR_START_CONVERT_CONTINUOUS = 1UL
}
 Definitions for starting a conversion used in Cy_SAR_StartConvert. More...
 
enum  cy_en_sar_return_mode_t {
  CY_SAR_RETURN_STATUS = 0UL,
  CY_SAR_WAIT_FOR_RESULT = 1UL,
  CY_SAR_RETURN_STATUS_INJ = 2UL,
  CY_SAR_WAIT_FOR_RESULT_INJ = 3UL
}
 Definitions for the return mode used in Cy_SAR_IsEndConversion. More...
 
enum  cy_en_sar_switch_state_t {
  CY_SAR_SWITCH_OPEN = 0UL,
  CY_SAR_SWITCH_CLOSE = 1UL
}
 Switch state definitions. More...
 
enum  cy_en_sar_switch_sar_seq_ctrl_t {
  CY_SAR_SWITCH_SEQ_CTRL_DISABLE = 0UL,
  CY_SAR_SWITCH_SEQ_CTRL_ENABLE = 1UL
}
 Definitions for sequencer control of switches. More...
 
enum  cy_en_sar_switch_register_sel_t { CY_SAR_MUX_SWITCH0 = 0UL }
 Switch register selection for Cy_SAR_SetAnalogSwitch and Cy_SAR_GetAnalogSwitch. More...
 
enum  cy_en_sar_clock_source_t {
  CY_SAR_CLK_PERI = 0UL,
  CY_SAR_CLK_DEEPSLEEP = 1UL
}
 For PASS_V2 the SAR clock can come from: More...
 
enum  cy_en_sar_simult_trig_event_sel_t {
  CY_SAR_SIMULT_TRIG_EVENT_EDGE = 0UL,
  CY_SAR_SIMULT_TRIG_EVENT_LEVEL = 1UL
}
 Definitions for simultaneous scan trigger signal event selection. More...
 
enum  cy_en_sar_simult_trig_sync_sel_t {
  CY_SAR_SIMULT_TRIG_SYNC_NONE = 0UL,
  CY_SAR_SIMULT_TRIG_SYNC_SAR_CLOCK = 1UL
}
 Definitions for simultaneous scan trigger synchronization. More...
 
enum  cy_en_sar_simult_trig_sample_sel_t {
  CY_SAR_SIMULT_TRIG_SAMPLE_SINGLE = 0UL,
  CY_SAR_SIMULT_TRIG_SAMPLE_SCAN_CNT = 1UL
}
 Definitions for simultaneous scan sampling mode. More...
 
enum  cy_en_sar_simult_trig_intr_sel_t {
  CY_SAR_SIMULT_TRIG_INTR_EOS = 0UL,
  CY_SAR_SIMULT_TRIG_INTR_SCAN_CNT = 1UL
}
 Definitions for simultaneous scan interrupt generation. More...
 

Enumeration Type Documentation

◆ cy_en_sar_status_t

The SAR status/error code definitions.

Enumerator
CY_SAR_SUCCESS 

Success.

CY_SAR_BAD_PARAM 

Invalid input parameters.

CY_SAR_TIMEOUT 

A timeout occurred.

CY_SAR_CONVERSION_NOT_COMPLETE 

SAR conversion is not complete.

◆ cy_en_sar_start_convert_sel_t

Definitions for starting a conversion used in Cy_SAR_StartConvert.

Enumerator
CY_SAR_START_CONVERT_SINGLE_SHOT 

Start a single scan (one shot) from firmware.

CY_SAR_START_CONVERT_CONTINUOUS 

Continuously scan enabled channels and ignores all triggers, firmware or hardware.

◆ cy_en_sar_return_mode_t

Definitions for the return mode used in Cy_SAR_IsEndConversion.

Enumerator
CY_SAR_RETURN_STATUS 

Immediately returns the conversion status.

CY_SAR_WAIT_FOR_RESULT 

Does not return a result until the conversion of all sequential channels is complete.

This mode is blocking.

CY_SAR_RETURN_STATUS_INJ 

Immediately returns the conversion status of the injection channel.

CY_SAR_WAIT_FOR_RESULT_INJ 

Does not return a result until the conversion of injection channels is complete.

This mode is blocking.

◆ cy_en_sar_switch_state_t

Switch state definitions.

Enumerator
CY_SAR_SWITCH_OPEN 

Open the switch.

CY_SAR_SWITCH_CLOSE 

Close the switch.

◆ cy_en_sar_switch_sar_seq_ctrl_t

Definitions for sequencer control of switches.

Enumerator
CY_SAR_SWITCH_SEQ_CTRL_DISABLE 

Disable sequencer control of switch.

CY_SAR_SWITCH_SEQ_CTRL_ENABLE 

Enable sequencer control of switch.

◆ cy_en_sar_switch_register_sel_t

Switch register selection for Cy_SAR_SetAnalogSwitch and Cy_SAR_GetAnalogSwitch.

Enumerator
CY_SAR_MUX_SWITCH0 

SARMUX switch control register.

◆ cy_en_sar_clock_source_t

For PASS_V2 the SAR clock can come from:

  • one of the CLK_PERI dividers
  • PASS Deep Sleep Clock (CLK_DPSLP)
Enumerator
CY_SAR_CLK_PERI 

SAR clock source is one of PERI dividers (SAR is only operational in chip ACTIVE mode)

CY_SAR_CLK_DEEPSLEEP 

SAR clock source is CLK_DPSLP (SAR can be operational in both chip ACTIVE and DEEPSLEEP modes)

◆ cy_en_sar_simult_trig_event_sel_t

Definitions for simultaneous scan trigger signal event selection.

Enumerator
CY_SAR_SIMULT_TRIG_EVENT_EDGE 

Positive edge detected on the trigger signal triggers a new scan.

CY_SAR_SIMULT_TRIG_EVENT_LEVEL 

SAR will do continuous scans as long as the trigger signal remains high.

◆ cy_en_sar_simult_trig_sync_sel_t

Definitions for simultaneous scan trigger synchronization.

Enumerator
CY_SAR_SIMULT_TRIG_SYNC_NONE 

Bypass clock domain synchronization of the simultaneous trigger signal.

CY_SAR_SIMULT_TRIG_SYNC_SAR_CLOCK 

Synchronize the simultaneous trigger signal to the SAR clock domain.

◆ cy_en_sar_simult_trig_sample_sel_t

Definitions for simultaneous scan sampling mode.

Enumerator
CY_SAR_SIMULT_TRIG_SAMPLE_SINGLE 

Perform single scan on the trigger event.

CY_SAR_SIMULT_TRIG_SAMPLE_SCAN_CNT 

On the trigger event perform number of scans, specified by scanCount.

◆ cy_en_sar_simult_trig_intr_sel_t

Definitions for simultaneous scan interrupt generation.

Enumerator
CY_SAR_SIMULT_TRIG_INTR_EOS 

Generate interrupt on each End of Sample event.

CY_SAR_SIMULT_TRIG_INTR_SCAN_CNT 

Generate interrupt on End of Sample event only when sample number = scanCount.