This set of functions is for controlling the two CTDAC analog switches, CVD, and CO6.
These are advanced functions. The switches will be managed by the reference source and output mode selections when initializing the hardware.
◆ Cy_CTDAC_SetAnalogSwitch()
Provide firmware control of the CTDAC switches.
Each call to this function can open a set of switches or close a set of switches.
- Note
- The switches are configured by the reference source and output mode selections during initialization.
- Parameters
-
base | Pointer to structure describing registers |
switchMask | The mask of the switches to either open or close. Select one or more values from cy_en_ctdac_switches_t and "OR" them together. |
state | Open or close the switch(es). Select a value from cy_en_ctdac_switch_state_t. |
- Returns
- None
- Function Usage
◆ Cy_CTDAC_GetAnalogSwitch()
__STATIC_INLINE uint32_t Cy_CTDAC_GetAnalogSwitch |
( |
const CTDAC_Type * |
base | ) |
|
Return the state (open or close) of the CTDAC switches.
- Note
- The switches will be managed by the reference source and output mode selections when initializing the hardware.
- Parameters
-
base | Pointer to structure describing registers |
- Returns
- Switch state. Compare this value to the masks found in cy_en_ctdac_switches_t.
◆ Cy_CTDAC_SetSwitchCO6()
Open or close switch CO6 that controls whether the output gets routed directly to a pin or through Opamp0 of the CTB.
This function calls Cy_CTDAC_SetAnalogSwitch with the switchMask set to CY_CTDAC_SWITCH_CO6_MASK.
- Note
- The switches is configured by the output mode selections during initialization.
-
This switch will temporarily be opened for deglitching if the deglitch mode is CY_CTDAC_DEGLITCHMODE_UNBUFFERED or CY_CTDAC_DEGLITCHMODE_BOTH.
- Parameters
-
base | Pointer to structure describing registers |
state | State of the switch, open or close. |
- Returns
- None
- Function Usage
◆ Cy_CTDAC_OpenAllSwitches()
__STATIC_INLINE void Cy_CTDAC_OpenAllSwitches |
( |
CTDAC_Type * |
base | ) |
|
Open all switches in the CTDAC (CO6 and CVD).
- Parameters
-
base | Pointer to structure describing registers |
- Returns
- None
- Function Usage