This set of functions is for initializing, enabling, and disabling the CTB.
More...
This set of functions is for initializing, enabling, and disabling the CTB.
◆ Cy_CTB_Init()
Initializes or restores the CTB and both opamps per provided settings.
Parameters are usually set only once at initialization.
- Note
- This function call disables a whole CTB block, call Cy_CTB_Enable after this function call.
- Parameters
-
base | The pointer to structure-describing registers. |
config | The pointer to a structure containing configuration data for the entire CTB. |
- Returns
- The status of initialization, CY_CTB_SUCCESS or CY_CTB_BAD_PARAM
- Function Usage
- The following code snippet configures Opamp0 as a comparator and Opamp1 as an opamp follower with an external (10x) drive. The terminals are routed to external pins by closing the switches shown.
{
true,
true,
true,
true,
};
{
true,
true,
false,
false,
};
{
false,
&opamp0Config,
&opamp1Config,
};
}
◆ Cy_CTB_OpampInit()
Initializes each opamp separately without impacting analog routing.
Intended for use by automatic analog routing and configuration tools to configure each opamp without having to integrate the settings with those of the other opamp first.
Can also be used to configure both opamps to have the same settings.
- Parameters
-
- Returns
- The status of initialization, CY_CTB_SUCCESS or CY_CTB_BAD_PARAM
- Function Usage
{
true,
true,
true,
true,
0UL,
};
{
}
◆ Cy_CTB_DeInit()
Resets CTB registers back to power on reset defaults.
- Parameters
-
base | The pointer to structure-describing registers. |
deInitRouting | If true, all analog routing switches are reset to their default state. If false, analog switch registers are untouched. |
- Returns
- The status of initialization, CY_CTB_SUCCESS or CY_CTB_BAD_PARAM
◆ Cy_CTB_Enable()
void Cy_CTB_Enable |
( |
CTBM_Type * |
base | ) |
|
Powers up the CTB hardware block.
- Parameters
-
base | The pointer to structure-describing registers. |
◆ Cy_CTB_Disable()
void Cy_CTB_Disable |
( |
CTBM_Type * |
base | ) |
|
Powers down the CTB hardware block.
- Parameters
-
base | The pointer to structure-describing registers. |