Data Structures¶
-
group
group_ctdac_data_structures
-
struct
CTDAC_Type
¶ - #include <>
-
struct
cy_stc_ctdac_config_t
- #include <>
Configuration structure to set up the entire CTDAC block to be used with Cy_CTDAC_Init.
Public Members
-
cy_en_ctdac_ref_source_t
refSource
Reference source: Vdda or externally through Opamp1 of CTB.
-
cy_en_ctdac_format_t
formatMode
Format of DAC value: signed or unsigned.
-
cy_en_ctdac_update_t
updateMode
Update mode: direct or buffered writes or hardware, edge or level.
-
cy_en_ctdac_deglitch_t
deglitchMode
Deglitch mode: disabled, buffered, unbuffered, or both.
-
cy_en_ctdac_output_mode_t
outputMode
Output mode: enabled (value or value + 1), high-z, Vssa, or Vdda.
-
cy_en_ctdac_output_buffer_t
outputBuffer
Output path: Buffered through Opamp0 of CTB or connected directly to Pin 6.
-
cy_en_ctdac_deep_sleep_t
deepSleep
Enable or disable the CTDAC during Deep Sleep.
-
uint32_t
deglitchCycles
Number of deglitch cycles from 0 to 63.
-
int32_t
value
Current DAC value.
-
int32_t
nextValue
Next DAC value for double buffering.
-
bool
enableInterrupt
If true, enable interrupt when next value register is transferred to value register.
-
bool
configClock
Configure or ignore clock information.
-
cy_en_divider_types_t
dividerType
Specifies which type of divider to use.
Can be integer or fractional divider. Not used if updateMode is CY_CTDAC_UPDATE_DIRECT_WRITE
-
uint32_t
dividerNum
Specifies which divider of the selected type to configure.
Not used if updateMode is CY_CTDAC_UPDATE_DIRECT_WRITE
-
uint32_t
dividerIntValue
The integer divider value.
The divider value causes integer division of (divider value + 1). Not used if updateMode is CY_CTDAC_UPDATE_DIRECT_WRITE or CY_CTDAC_UPDATE_STROBE_EDGE_IMMEDIATE
-
uint32_t
dividerFracValue
The fractional divider value if using a fractional clock.
Not used if updateMode is CY_CTDAC_UPDATE_DIRECT_WRITE or CY_CTDAC_UPDATE_STROBE_EDGE_IMMEDIATE
-
cy_en_ctdac_ref_source_t
-
struct
cy_stc_ctdac_fast_config_t
- #include <>
Configuration structure to quickly set up the CTDAC to be used with Cy_CTDAC_FastInit This structure provides a selection for the CTDAC reference source and output path.
The other configuration options are set to:
.formatMode = CY_CTDAC_FORMAT_UNSIGNED
.updateMode = CY_CTDAC_UPDATE_BUFFERED_WRITE
.deglitchMode = CY_CTDAC_DEGLITCHMODE_NONE
.outputMode = CY_CTDAC_OUTPUT_VALUE
.deepSleep = CY_CTDAC_DEEPSLEEP_DISABLE
.deglitchCycles = CY_CTDAC_DEINIT
.value = CY_CTDAC_UNSIGNED_MID_CODE_VALUE
.nextValue = CY_CTDAC_UNSIGNED_MID_CODE_VALUE
.enableInterrupt = true
.configClock = true
.dividerType = CY_CTDAC_FAST_CLKCFG_TYPE
.dividerNum = CY_CTDAC_FAST_CLKCFG_NUM
.dividerInitValue = CY_CTDAC_FAST_CLKCFG_DIV
.dividerFracValue = CY_CTDAC_DEINIT
Public Members
-
cy_en_ctdac_ref_source_t
refSource
Reference source: Vdda or externally through Opamp1 of CTB.
-
cy_en_ctdac_output_buffer_t
outputBuffer
Output path: Buffered through Opamp0 of CTB or connected directly to Pin 6.
-
struct
cy_stc_ctdac_context_t
- #include <>
CTDAC context structure.
All fields for the context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure when registering the Cy_CTDAC_DeepSleepCallback. Firmware must ensure that the defined instance of this structure remains in scope while the drive is in use.
Public Members
-
uint32_t
deglitchModeBeforeSleep
Tracks the state of the deglitch mode before sleep so that it can be re-enabled after wakeup.
-
uint32_t
-
struct