Exemplo n.º 1
0
/*******************************************************************************
* Function Name: UART_ScbModeEnableIntr
********************************************************************************
*
* Summary:
*  Enables interrupt for specific mode.
*
* Parameters:
*  None
*
* Return:
*  None
*
*******************************************************************************/
static void UART_ScbEnableIntr(void)
{
#if(UART_SCB_IRQ_INTERNAL)
    #if(UART_SCB_MODE_UNCONFIG_CONST_CFG)
        /* Enable interrupt source */
        if(0u != UART_scbEnableIntr)
        {
            UART_SCB_IRQ_Enable();
        }
    #else
        UART_SCB_IRQ_Enable();
        
    #endif /* (UART_SCB_MODE_UNCONFIG_CONST_CFG) */
#endif /* (UART_SCB_IRQ_INTERNAL) */
}
Exemplo n.º 2
0
/*******************************************************************************
* Function Name: UART_SCB_IRQ_StartEx
********************************************************************************
*
* Summary:
*  Sets up the interrupt and enables it. This function disables the interrupt,
*  sets the interrupt vector based on the address passed in, sets the priority 
*  from the value in the Design Wide Resources Interrupt Editor, then enables 
*  the interrupt to the interrupt controller.
*  
*  When defining ISR functions, the CY_ISR and CY_ISR_PROTO macros should be 
*  used to provide consistent definition across compilers:
*  
*  Function definition example:
*   CY_ISR(MyISR)
*   {
*   }
*   Function prototype example:
*   CY_ISR_PROTO(MyISR);
*
* Parameters:  
*   address: Address of the ISR to set in the interrupt vector table.
*
* Return:
*   None
*
*******************************************************************************/
void UART_SCB_IRQ_StartEx(cyisraddress address)
{
    /* For all we know the interrupt is active. */
    UART_SCB_IRQ_Disable();

    /* Set the ISR to point to the UART_SCB_IRQ Interrupt. */
    UART_SCB_IRQ_SetVector(address);

    /* Set the priority. */
    UART_SCB_IRQ_SetPriority((uint8)UART_SCB_IRQ_INTC_PRIOR_NUMBER);

    /* Enable it. */
    UART_SCB_IRQ_Enable();
}