This set of functions is for controlling routing switches.
More...
This set of functions is for controlling routing switches.
◆ Cy_CTB_SetAnalogSwitch()
void Cy_CTB_SetAnalogSwitch |
( |
CTBM_Type * |
base, |
|
|
cy_en_ctb_opamp_sel_t |
opampNum, |
|
|
uint32_t |
switchMask, |
|
|
bool |
switchState |
|
) |
| |
Provides firmware control of the CTB switches.
Each call to this function can open a set of switches or close a set of switches in one register.
- Parameters
-
- Note
- Some switch mask positions may match for both OpAmps, so it is allowed to carefully use this function for both OpAmps simultaneously.
- Parameters
-
switchState | The boolean switch state: true - closed, false - opened. |
- Function Usage
◆ Cy_CTB_GetAnalogSwitch()
Returns the open or closed state of the specified analog switch.
- Parameters
-
- Returns
- The state of the switches in the provided OpAmp. Compare this value to the switch masks in the following masks: OpAmp Switch Macros
- Function Usage
◆ Cy_CTB_OpenAllSwitches()
__STATIC_INLINE void Cy_CTB_OpenAllSwitches |
( |
CTBM_Type * |
base | ) |
|
Open all the switches and disable all hardware control of the switches.
Primarily used as a quick method of re-configuring all analog connections that are sparsely closed.
- Parameters
-
base | The pointer to structure-describing registers. |
- Function Usage
◆ Cy_CTB_EnableSarSeqCtrl()
__STATIC_INLINE void Cy_CTB_EnableSarSeqCtrl |
( |
CTBM_Type * |
base, |
|
|
uint32_t |
switchMask |
|
) |
| |
Enables the SAR sequencer control of specified switch(es).
This allows the SAR ADC to use routes through the CTB when configuring its channels. See Input from CTB output via SARBUS0/1 for the more details.
There are three switches in the CTB that can be enabled by the SAR sequencer.
- D51: This switch connects the output of Opamp0 to the SARBUS0
- D52: This switch connects the output of Opamp1 to the SARBUS0
- D62: This switch connects the output of Opamp1 to the SARBUS1
- Parameters
-
- Function Usage
◆ Cy_CTB_DisableSarSeqCtrl()
__STATIC_INLINE void Cy_CTB_DisableSarSeqCtrl |
( |
CTBM_Type * |
base, |
|
|
uint32_t |
switchMask |
|
) |
| |
Disables the SAR sequencer control of specified switch(es).
- Parameters
-
- Function Usage