static void uart_rx_irq( void ) { uart_put_rx_data_type handler; // read in the received data, this will clear the interrupt also unsigned char c = UART_RECEIVE( UART_NUMBER, UART_LOCATION ); BSP_CRITICAL_STATEMENT( handler = uart_rx_handler ); if( handler != NULL ) // if a handler exists to receive data if( ( *handler)( c ) == false ) // if the user is suspending uart_rx_message_suspend( handler ); return; }
/****************************************************************************** * @fn uart_rx_irq * * @brief RX interrupt service routine * * input parameters * * output parameters * * @return */ void uart_rx_irq( void ) { uart_put_rx_data_type handler; /* read in the received data, this will clear the interrupt also */ unsigned char c = UART_RECEIVE( UART_NUMBER_1, UART1_LOCATION ); BSP_CRITICAL_STATEMENT( handler = uart_rx_handler ); if( handler != NULL ) /* if a handler exists to receive data */ if( ( *handler)( c ) == false ) /* if the user is done receiveing */ /* indicate the receiver is available */ BSP_CRITICAL_STATEMENT( uart_rx_handler = NULL ); return; }