This set of functions is related to the comparator interrupts.
◆ Cy_CTB_GetInterruptStatus()
Return the status of the interrupt when the configured comparator edge is detected.
- Parameters
-
- Returns
- The interrupt status. If compNum is CY_CTB_OPAMP_BOTH, cast the returned status to cy_en_ctb_opamp_sel_t to determine which comparator edge (or both) was detected.
- 0: Edge was not detected
- Non-zero: Configured edge type was detected
- Function Usage
uint32_t intrStatus;
if (CY_CTB_OPAMP_0 == (intrStatus & CY_CTB_OPAMP_0))
{
}
{
}
◆ Cy_CTB_ClearInterrupt()
Clear the CTB comparator triggered interrupt.
The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.
- Parameters
-
- Returns
- None
◆ Cy_CTB_SetInterrupt()
Force the CTB interrupt to trigger using software.
- Parameters
-
- Returns
- None
◆ Cy_CTB_SetInterruptMask()
Configure the CTB comparator edge interrupt to be forwarded to the CPU interrupt controller.
- Parameters
-
- Returns
- None
- Function Usage
◆ Cy_CTB_GetInterruptMask()
Return whether the CTB comparator edge interrupt output is forwarded to the CPU interrupt controller as configured by Cy_CTB_SetInterruptMask.
- Parameters
-
- Returns
- The interrupt mask. If compNum is CY_CTB_OPAMP_BOTH, cast the returned mask to cy_en_ctb_opamp_sel_t to determine which comparator interrupt output (or both) is forwarded.
- 0: Interrupt output not forwarded to interrupt controller
- Non-zero: Interrupt output forwarded to interrupt controller
- Function Usage
uint32_t intrMask;
if (0UL == intrMask)
{
}
◆ Cy_CTB_GetInterruptStatusMasked()
Return the CTB comparator edge output interrupt state after being masked.
This is the bitwise AND of Cy_CTB_GetInterruptStatus and Cy_CTB_GetInterruptMask.
- Parameters
-
- Returns
- If compNum is CY_CTB_OPAMP_BOTH, cast the returned value to cy_en_ctb_opamp_sel_t to determine which comparator interrupt output (or both) is detected and masked.
- 0: Configured edge not detected or not masked
- Non-zero: Configured edge type detected and masked