This set of functions is related to the comparator interrupts.
More...
This set of functions is related to the comparator interrupts.
◆ Cy_CTB_GetInterruptStatus()
__STATIC_INLINE uint32_t Cy_CTB_GetInterruptStatus |
( |
const CTBM_Type * |
base, |
|
|
cy_en_ctb_opamp_sel_t |
compNum |
|
) |
| |
Returns 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: The edge was not detected
- Non-zero: The configured edge type was detected.
- Function Usage
uint32_t intrStatus;
{
}
{
}
◆ Cy_CTB_ClearInterrupt()
Clears 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
-
◆ Cy_CTB_SetInterrupt()
Forces the CTB interrupt to trigger using software.
- Parameters
-
◆ Cy_CTB_SetInterruptMask()
Configures the CTB comparator edge interrupt to be forwarded to the CPU interrupt controller.
- Parameters
-
- Function Usage
◆ Cy_CTB_GetInterruptMask()
__STATIC_INLINE uint32_t Cy_CTB_GetInterruptMask |
( |
const CTBM_Type * |
base, |
|
|
cy_en_ctb_opamp_sel_t |
compNum |
|
) |
| |
Returns 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: None interrupt output was forwarded to the interrupt controller.
- Non-zero: An interrupt output was forwarded to the interrupt controller.
- Function Usage
uint32_t intrMask;
if (0UL == intrMask)
{
}
◆ Cy_CTB_GetInterruptStatusMasked()
__STATIC_INLINE uint32_t Cy_CTB_GetInterruptStatusMasked |
( |
const CTBM_Type * |
base, |
|
|
cy_en_ctb_opamp_sel_t |
compNum |
|
) |
| |
Returns 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) was detected and masked.
- 0: The configured edge was not detected or masked.
- Non-zero: The configured edge type was detected and masked