__interrupt void uart_rx_tx_enter_irq( void ) { unsigned int v; // while there are interrupts to service for( v = UCA0IV; v != USCI_NONE; v = UCA0IV ) switch( v ) { case USCI_UCRXIFG: // if a receive interrupt uart_rx_irq( ); // handle the receive request break; case USCI_UCTXIFG: // if a transmit interrupt uart_tx_irq( ); // handle the transmit request break; default: // something not quite right asm( " NOP" ); // a place for a break point break; } return; }
static void uart7_rx_irq(void) { uart_rx_irq(SCIFRXI7_IRQn, 7); }
static void uart6_rx_irq(void) { uart_rx_irq(SCIFRXI6_IRQn, 6); }
static void uart5_rx_irq(void) { uart_rx_irq(SCIFRXI5_IRQn, 5); }
static void uart4_rx_irq(void) { uart_rx_irq(SCIFRXI4_IRQn, 4); }
static void uart3_rx_irq(void) { uart_rx_irq(SCIFRXI3_IRQn, 3); }
static void uart2_rx_irq(void) { uart_rx_irq(SCIFRXI2_IRQn, 2); }
static void uart1_rx_irq(void) { uart_rx_irq(SCIFRXI1_IRQn, 1); }
/* RX handler */ static void uart0_rx_irq(void) { uart_rx_irq(SCIFRXI0_IRQn, 0); }
__idata_reentrant __interrupt void uart_0_rx_irq( void ) { uart_rx_irq( ); return; }