CAT2 Peripheral Driver Library
Interrupt Functions

Functions

__STATIC_INLINE void Cy_ISOUART_ClearInterrupt (ISOUART_Type *base, uint32_t intrMask)
 Clears the specified iso UART interrupt. More...
 
__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptStatus (const ISOUART_Type *base)
 Get the specified iso UART interrupt status. More...
 
__STATIC_INLINE void Cy_ISOUART_SetInterrupt (ISOUART_Type *base, uint32_t intrMask)
 Software triggers the specified iso UART interrupt. More...
 
__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptMask (const ISOUART_Type *base)
 Get the specified iso UART interrupt mask. More...
 
__STATIC_INLINE void Cy_ISOUART_SetInterruptMask (ISOUART_Type *base, uint32_t intrMask)
 Enables the specified iso UART interrupt mask. More...
 
__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptStatusMasked (const ISOUART_Type *base)
 Get the specified iso UART interrupt masked (enabled) status. More...
 
__STATIC_INLINE uint8_t Cy_ISOUART_NodeGetIntrAddrPrim (const ISOUART_Type *base)
 Get the address of request that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_P. More...
 
__STATIC_INLINE cy_en_isouart_event_t Cy_ISOUART_NodeGetIntrEventPrim (const ISOUART_Type *base)
 Get the event that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_P. More...
 
__STATIC_INLINE uint8_t Cy_ISOUART_NodeGetIntrAddrSec (const ISOUART_Type *base)
 Get the address of request that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_S. More...
 
__STATIC_INLINE cy_en_isouart_event_t Cy_ISOUART_NodeGetIntrEventSec (const ISOUART_Type *base)
 Get the event that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_S. More...
 

Detailed Description

Function Documentation

◆ Cy_ISOUART_ClearInterrupt()

__STATIC_INLINE void Cy_ISOUART_ClearInterrupt ( ISOUART_Type *  base,
uint32_t  intrMask 
)

Clears the specified iso UART interrupt.

Parameters
baseThe base address for the iso UART.
intrMaskThe bitmask of statuses to clear. Select one or more values from Interrupt Masks and "OR" them together.
Note
This function is valid for both Host and Node.
Function Usage
/* Interrupt handler. */
void ISOUART_Isr(void)
{
uint32_t intr_status = Cy_ISOUART_GetInterruptStatus(ISOUART);
uint32_t masked_status = Cy_ISOUART_GetInterruptStatusMasked(ISOUART);
/* Check if interrupt occurs due to framing communication error. */
if(0UL != (CY_ISOUART_INTR_FRAME_ERR & intr_status & masked_status))
{
/* Process interrupt. */
}
else
{
/* Process unexpected behavior. */
}
/* Clear all possible interrupt sources using combined interrupt mask. */
}

◆ Cy_ISOUART_GetInterruptStatus()

__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptStatus ( const ISOUART_Type *  base)

Get the specified iso UART interrupt status.

Parameters
baseThe base address for the iso UART.
Returns
The bit field determines which iso UART interrupt is set. To find out occurred interrupt, use Interrupt Masks.
Note
This function is valid for both Host and Node.
Function Usage
/* Interrupt handler. */
void ISOUART_Isr(void)
{
uint32_t intr_status = Cy_ISOUART_GetInterruptStatus(ISOUART);
uint32_t masked_status = Cy_ISOUART_GetInterruptStatusMasked(ISOUART);
/* Check if interrupt occurs due to framing communication error. */
if(0UL != (CY_ISOUART_INTR_FRAME_ERR & intr_status & masked_status))
{
/* Process interrupt. */
}
else
{
/* Process unexpected behavior. */
}
/* Clear all possible interrupt sources using combined interrupt mask. */
}

◆ Cy_ISOUART_SetInterrupt()

__STATIC_INLINE void Cy_ISOUART_SetInterrupt ( ISOUART_Type *  base,
uint32_t  intrMask 
)

Software triggers the specified iso UART interrupt.

Parameters
baseThe base address for the iso UART.
intrMaskThe bit field determines which interrupt will be triggered. Select one or more values from Interrupt Masks and "OR" them together.
Note
This function is valid for both Host and Node.
General use is to set the interrupt source to check if HW operates correctly or to use it as a SW interrupt.
Function Usage
/* Scenario: Set interrupt to simulate framing communication error. */
/* Hook interrupt service routine. */
(void) Cy_SysInt_Init(&ISOUARTIntrConfig, &ISOUART_Isr);
uint32_t intrMask = Cy_ISOUART_GetInterruptMask(ISOUART);
/* Check whether trigger interrupt source is enabled. */
{
/* Enable trigger interrupt. */
Cy_ISOUART_SetInterruptMask(ISOUART, CY_ISOUART_INTR_FRAME_ERR);
}
/* Enable interrupt for interrupt controller. */
NVIC_EnableIRQ(ISOUARTIntrConfig.intrSrc);
/* Set trigger interrupt. */
Cy_ISOUART_SetInterrupt(ISOUART, CY_ISOUART_INTR_FRAME_ERR);

◆ Cy_ISOUART_GetInterruptMask()

__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptMask ( const ISOUART_Type *  base)

Get the specified iso UART interrupt mask.

Parameters
baseThe base address for the iso UART.
Returns
The bit field determines which status changes can cause an interrupt. To find out which interrupts are enabled, use Interrupt Masks.
Note
This function is valid for both Host and Node.
Function Usage
/* Scenario: Set interrupt to simulate framing communication error. */
/* Hook interrupt service routine. */
(void) Cy_SysInt_Init(&ISOUARTIntrConfig, &ISOUART_Isr);
uint32_t intrMask = Cy_ISOUART_GetInterruptMask(ISOUART);
/* Check whether trigger interrupt source is enabled. */
if (CY_ISOUART_INTR_FRAME_ERR != (intrMask & CY_ISOUART_INTR_FRAME_ERR))
{
/* Enable trigger interrupt. */
Cy_ISOUART_SetInterruptMask(ISOUART, CY_ISOUART_INTR_FRAME_ERR);
}
/* Enable interrupt for interrupt controller. */
NVIC_EnableIRQ(ISOUARTIntrConfig.intrSrc);
/* Set trigger interrupt. */
Cy_ISOUART_SetInterrupt(ISOUART, CY_ISOUART_INTR_FRAME_ERR);

◆ Cy_ISOUART_SetInterruptMask()

__STATIC_INLINE void Cy_ISOUART_SetInterruptMask ( ISOUART_Type *  base,
uint32_t  intrMask 
)

Enables the specified iso UART interrupt mask.

Parameters
baseThe base address for the iso UART.
intrMaskThe bit field determines which status changes can cause an interrupt. Select one or more values from Interrupt Masks and "OR" them together.
Note
This function is valid for both Host and Node.
Function Usage
/* Scenario: Set interrupt to simulate framing communication error. */
/* Hook interrupt service routine. */
(void) Cy_SysInt_Init(&ISOUARTIntrConfig, &ISOUART_Isr);
uint32_t intrMask = Cy_ISOUART_GetInterruptMask(ISOUART);
/* Check whether trigger interrupt source is enabled. */
if (CY_ISOUART_INTR_FRAME_ERR != (intrMask & CY_ISOUART_INTR_FRAME_ERR))
{
/* Enable trigger interrupt. */
Cy_ISOUART_SetInterruptMask(ISOUART, CY_ISOUART_INTR_FRAME_ERR);
}
/* Enable interrupt for interrupt controller. */
NVIC_EnableIRQ(ISOUARTIntrConfig.intrSrc);
/* Set trigger interrupt. */
Cy_ISOUART_SetInterrupt(ISOUART, CY_ISOUART_INTR_FRAME_ERR);

◆ Cy_ISOUART_GetInterruptStatusMasked()

__STATIC_INLINE uint32_t Cy_ISOUART_GetInterruptStatusMasked ( const ISOUART_Type *  base)

Get the specified iso UART interrupt masked (enabled) status.

Parameters
baseThe base address for the iso UART.
Returns
Bitwise AND of the interrupt request and mask registers. To find out the state of the interrupts status masked, use Interrupt Masks.
Note
This function is valid for both Host and Node.
Function Usage
/* Interrupt handler. */
void ISOUART_Isr(void)
{
uint32_t intr_status = Cy_ISOUART_GetInterruptStatus(ISOUART);
uint32_t masked_status = Cy_ISOUART_GetInterruptStatusMasked(ISOUART);
/* Check if interrupt occurs due to framing communication error. */
if(0UL != (CY_ISOUART_INTR_FRAME_ERR & intr_status & masked_status))
{
/* Process interrupt. */
}
else
{
/* Process unexpected behavior. */
}
/* Clear all possible interrupt sources using combined interrupt mask. */
}

◆ Cy_ISOUART_NodeGetIntrAddrPrim()

__STATIC_INLINE uint8_t Cy_ISOUART_NodeGetIntrAddrPrim ( const ISOUART_Type *  base)

Get the address of request that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_P.

Parameters
baseThe base address for the iso UART.
Returns
The address value.
Note
This function is valid only for Node.

◆ Cy_ISOUART_NodeGetIntrEventPrim()

__STATIC_INLINE cy_en_isouart_event_t Cy_ISOUART_NodeGetIntrEventPrim ( const ISOUART_Type *  base)

Get the event that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_P.

Parameters
baseThe base address for the iso UART.
Returns
The event value cy_en_isouart_event_t.
Note
This function is valid only for Node.

◆ Cy_ISOUART_NodeGetIntrAddrSec()

__STATIC_INLINE uint8_t Cy_ISOUART_NodeGetIntrAddrSec ( const ISOUART_Type *  base)

Get the address of request that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_S.

Parameters
baseThe base address for the iso UART.
Returns
The address value.
Note
This function is valid only for Node.

◆ Cy_ISOUART_NodeGetIntrEventSec()

__STATIC_INLINE cy_en_isouart_event_t Cy_ISOUART_NodeGetIntrEventSec ( const ISOUART_Type *  base)

Get the event that triggered the interrupt CY_ISOUART_INTR_REG_ACCESS_S.

Parameters
baseThe base address for the iso UART.
Returns
The event value cy_en_isouart_event_t.
Note
This function is valid only for Node.