示例#1
0
/*******************************************************************************
* Function Name: UART_SCB_IRQ_Stop
********************************************************************************
*
* Summary:
*   Disables and removes the interrupt.
*
* Parameters:  
*   None
*
* Return:
*   None
*
*******************************************************************************/
void UART_SCB_IRQ_Stop(void)
{
    /* Disable this interrupt. */
    UART_SCB_IRQ_Disable();

    /* Set the ISR to point to the passive one. */
    UART_SCB_IRQ_SetVector(&IntDefaultHandler);
}
示例#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();
}
示例#3
0
/*******************************************************************************
* Function Name: UART_Stop
********************************************************************************
*
* Summary:
*  Disables the SCB component.
*
* Parameters:
*  None
*
* Return:
*  None
*
*******************************************************************************/
void UART_Stop(void)
{
#if(UART_SCB_IRQ_INTERNAL)
    UART_SCB_IRQ_Disable();     /* Disable interrupt before block */
#endif /* (UART_SCB_IRQ_INTERNAL) */

    UART_CTRL_REG &= (uint32) ~UART_CTRL_ENABLED;  /* Disable SCB block */

#if(UART_SCB_IRQ_INTERNAL)
    UART_SCB_IRQ_ClearPending(); /* Clear pending interrupt */
#endif /* (UART_SCB_IRQ_INTERNAL) */
    
    UART_ScbModeStop(); /* Calls scbMode specific Stop function */
}