PSoC 6 Peripheral Driver Library

General Description

Enumerations

enum  cy_en_ctdac_update_t {
  CY_CTDAC_UPDATE_DIRECT_WRITE = 0uL,
  CY_CTDAC_UPDATE_BUFFERED_WRITE = 1uL,
  CY_CTDAC_UPDATE_STROBE_EDGE_SYNC = 2uL,
  CY_CTDAC_UPDATE_STROBE_EDGE_IMMEDIATE = 3uL,
  CY_CTDAC_UPDATE_STROBE_LEVEL = 4uL
}
 Configure the mode for how the DAC value is updated. More...
 
enum  cy_en_ctdac_format_t {
  CY_CTDAC_FORMAT_UNSIGNED = 0uL,
  CY_CTDAC_FORMAT_SIGNED = 1uL << CTDAC_CTDAC_CTRL_CTDAC_MODE_Pos
}
 Configure the format in which the DAC value register is decoded. More...
 
enum  cy_en_ctdac_deep_sleep_t {
  CY_CTDAC_DEEPSLEEP_DISABLE = 0uL,
  CY_CTDAC_DEEPSLEEP_ENABLE = CTDAC_CTDAC_CTRL_DEEPSLEEP_ON_Msk
}
 Enable or disable the CTDAC hardware during Deep Sleep. More...
 
enum  cy_en_ctdac_output_mode_t {
  CY_CTDAC_OUTPUT_HIGHZ = 0uL,
  CY_CTDAC_OUTPUT_VALUE = CTDAC_CTDAC_CTRL_OUT_EN_Msk,
  CY_CTDAC_OUTPUT_VALUE_PLUS1,
  CY_CTDAC_OUTPUT_VSSA = CTDAC_CTDAC_CTRL_DISABLED_MODE_Msk,
  CY_CTDAC_OUTPUT_VREF
}
 Configure the output state of the CTDAC. More...
 
enum  cy_en_ctdac_deglitch_t {
  CY_CTDAC_DEGLITCHMODE_NONE = 0uL,
  CY_CTDAC_DEGLITCHMODE_UNBUFFERED = CTDAC_CTDAC_CTRL_DEGLITCH_CO6_Msk,
  CY_CTDAC_DEGLITCHMODE_BUFFERED = CTDAC_CTDAC_CTRL_DEGLITCH_COS_Msk,
  CY_CTDAC_DEGLITCHMODE_BOTH
}
 Configure the deglitch mode. More...
 
enum  cy_en_ctdac_ref_source_t {
  CY_CTDAC_REFSOURCE_EXTERNAL = 0uL,
  CY_CTDAC_REFSOURCE_VDDA = 1uL
}
 Configure the reference source for the CTDAC. More...
 
enum  cy_en_ctdac_output_buffer_t {
  CY_CTDAC_OUTPUT_BUFFERED = 0uL,
  CY_CTDAC_OUTPUT_UNBUFFERED = 1uL
}
 Configure the output to be buffered or unbuffered. More...
 
enum  cy_en_ctdac_switch_state_t {
  CY_CTDAC_SWITCH_OPEN = 0uL,
  CY_CTDAC_SWITCH_CLOSE = 1uL
}
 Switch state, either open or closed, to be used in Cy_CTDAC_SetAnalogSwitch. More...
 
enum  cy_en_ctdac_switches_t {
  CY_CTDAC_SWITCH_CVD_MASK = CTDAC_CTDAC_SW_CTDD_CVD_Msk,
  CY_CTDAC_SWITCH_CO6_MASK = CTDAC_CTDAC_SW_CTDO_CO6_Msk
}
 Switch mask to be used in Cy_CTDAC_SetAnalogSwitch. More...
 
enum  cy_en_ctdac_status_t {
  CY_CTDAC_SUCCESS = 0x00uL,
  CY_CTDAC_BAD_PARAM = CY_CTDAC_ID | CY_PDL_STATUS_ERROR | 0x01uL
}
 Return states for Cy_CTDAC_Init, Cy_CTDAC_DeInit, and Cy_CTDAC_FastInit. More...
 

Enumeration Type Documentation

◆ cy_en_ctdac_update_t

Configure the mode for how the DAC value is updated.

All the modes require a CTDAC clock except for Direct write.

Enumerator
CY_CTDAC_UPDATE_DIRECT_WRITE 

DAC value is updated with a direct write by calling to Cy_CTDAC_SetValue.

CY_CTDAC_UPDATE_BUFFERED_WRITE 

DAC value stored with Cy_CTDAC_SetValueBuffered is updated on the next CTDAC clock edge.

CY_CTDAC_UPDATE_STROBE_EDGE_SYNC 

DAC value stored with Cy_CTDAC_SetValueBuffered is updated on the next CTDAC clock edge after a rising edge of the strobe.

CY_CTDAC_UPDATE_STROBE_EDGE_IMMEDIATE 

DAC value stored with Cy_CTDAC_SetValueBuffered is updated on the rising edge of the strobe input.

CY_CTDAC_UPDATE_STROBE_LEVEL 

DAC value stored with Cy_CTDAC_SetValueBuffered is updated on every CTDAC clock edge while the strobe line is high.

◆ cy_en_ctdac_format_t

Configure the format in which the DAC value register is decoded.

Enumerator
CY_CTDAC_FORMAT_UNSIGNED 

Unsigned 12-bit DAC.

No value decoding

CY_CTDAC_FORMAT_SIGNED 

Virtual signed.

Add 0x800 to the 12-bit DAC value

◆ cy_en_ctdac_deep_sleep_t

Enable or disable the CTDAC hardware during Deep Sleep.

Enumerator
CY_CTDAC_DEEPSLEEP_DISABLE 

DAC is disabled during Deep Sleep power mode.

CY_CTDAC_DEEPSLEEP_ENABLE 

DAC remains enabled during Deep Sleep power mode.

◆ cy_en_ctdac_output_mode_t

Configure the output state of the CTDAC.

Enumerator
CY_CTDAC_OUTPUT_HIGHZ 

DAC output is tri-state.

CY_CTDAC_OUTPUT_VALUE 

DAC Output is enabled and drives the programmed value.

CY_CTDAC_OUTPUT_VALUE_PLUS1 

DAC Output enabled and drives the programmed value plus 1.

CY_CTDAC_OUTPUT_VSSA 

Output is pulled to Vssa through a 1.1 MOhm (typ) resistor.

CY_CTDAC_OUTPUT_VREF 

Output is pulled to Vref through a 1.1 MOhm (typ) resistor.

◆ cy_en_ctdac_deglitch_t

Configure the deglitch mode.

See the Deglitch section for more information on how deglitching works.

Enumerator
CY_CTDAC_DEGLITCHMODE_NONE 

Disable deglitch.

CY_CTDAC_DEGLITCHMODE_UNBUFFERED 

Deglitch through the CO6 switch.

CY_CTDAC_DEGLITCHMODE_BUFFERED 

Deglitch through the CTB COS switch.

CY_CTDAC_DEGLITCHMODE_BOTH 

Deglitch through both CO6 and CTB COS switches.

◆ cy_en_ctdac_ref_source_t

Configure the reference source for the CTDAC.

The CVD switch is closed when Vdda is the reference source.

Enumerator
CY_CTDAC_REFSOURCE_EXTERNAL 

Use an external source from Opamp1 of the CTB as the reference.

CVD switch is open.

CY_CTDAC_REFSOURCE_VDDA 

Use Vdda as the reference.

CVD switch is closed.

◆ cy_en_ctdac_output_buffer_t

Configure the output to be buffered or unbuffered.

The CO6 switch is closed when the output is unbuffered to Pin 6 of the CTDAC port. See the device datasheet for the CTDAC port.

Enumerator
CY_CTDAC_OUTPUT_BUFFERED 

Buffer the output through the CTB OA0.

CY_CTDAC_OUTPUT_UNBUFFERED 

Send output to a direct pin.

◆ cy_en_ctdac_switch_state_t

Switch state, either open or closed, to be used in Cy_CTDAC_SetAnalogSwitch.

Enumerator
CY_CTDAC_SWITCH_OPEN 

Open the switch.

CY_CTDAC_SWITCH_CLOSE 

Close the switch.

◆ cy_en_ctdac_switches_t

Switch mask to be used in Cy_CTDAC_SetAnalogSwitch.

Enumerator
CY_CTDAC_SWITCH_CVD_MASK 

Switch for the reference source, Vdda or external.

CY_CTDAC_SWITCH_CO6_MASK 

Switch for the output, buffered or direct.

◆ cy_en_ctdac_status_t

Return states for Cy_CTDAC_Init, Cy_CTDAC_DeInit, and Cy_CTDAC_FastInit.

Enumerator
CY_CTDAC_SUCCESS 

Initialization completed successfully.

CY_CTDAC_BAD_PARAM 

Input pointers were NULL and Initialization could not be completed.