Exemplo n.º 1
0
__interrupt void USART1RX_ISR (void) {
   debugpins_isr_set();
   if (uart_rx_isr()==KICK_SCHEDULER) {          // UART: RX
      __bic_SR_register_on_exit(CPUOFF);
   }
   debugpins_isr_clr();
}
Exemplo n.º 2
0
void USCIAB0RX_ISR(void)
{
	/* USCI_A0 UART interrupt? */
	if (UC0IFG & UCA0RXIFG)
		uart_rx_isr();

	/* USCI_B0 I2C state change interrupt. */
	if ((UCB0STAT & (UCALIFG | UCNACKIFG | UCSTTIFG | UCSTPIFG)) != 0)
		i2c_state_isr(); 
}
Exemplo n.º 3
0
void USCIA1_ISR(void)
{
	still_asleep = stay_asleep;

	switch ( UCA1IV ) 
	{
		case USCI_UART_UCRXIFG: uart_rx_isr(XUSCI_A1_OFFSET); break;
		case USCI_UART_UCTXIFG: uart_tx_isr(XUSCI_A1_OFFSET); break;
	}  

	if (still_asleep != stay_asleep)
		__bic_SR_register_on_exit(LPM4_bits);
}
Exemplo n.º 4
0
void USCIAB0RX_ISR(void)
{
	still_asleep = stay_asleep;

	/* USCI_A0 UART interrupt? */
	if (UC0IFG & UCA0RXIFG)
		uart_rx_isr(0);

	/* USCI_B0 I2C state change interrupt. */
	if ((UCB0STAT & (UCALIFG | UCNACKIFG | UCSTTIFG | UCSTPIFG)) != 0)
		i2c_state_isr(); 

	if (still_asleep != stay_asleep)
		__bic_SR_register_on_exit(LPM4_bits);
}
Exemplo n.º 5
0
/*******************************************************************************
* Function Name  : USART1_IRQHandler
* Description    : This function handles USART1 global interrupt request.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void USART1_IRQHandler(void)
{  
  debugpins_isr_set();
  if(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) != RESET)
  {
    USART_ClearFlag(USART1, USART_FLAG_RXNE);
    
    uart_rx_isr();
  }

  if(USART_GetFlagStatus(USART1, USART_FLAG_TXE) != RESET)
  { 
    uart_tx_isr(); 
  }
  debugpins_isr_clr();
}
__interrupt void USCI_A1_ISR(void)
{
	switch(__even_in_range(UCA1IV,4))
    {
    case USCI_NONE: break;
    //Vector 2 - RXIFG
    case 2:
    	uart_rx_isr();
        break;
    //Vector 4 - TXIFG
    case 4:
    	uart_tx_isr();
    	break;
    default: break;
    }
}
Exemplo n.º 7
0
static void uart_isr_private(void){
	uint32_t reg;
	debugpins_isr_set();

	// Read interrupt source
	reg = UARTIntStatus(UART0_BASE, true);

	// Clear UART interrupt in the NVIC
	IntPendClear(INT_UART0);

	// Process TX interrupt
	if(reg & UART_INT_TX){
	     uart_tx_isr();
	}

	// Process RX interrupt
	if((reg & (UART_INT_RX)) || (reg & (UART_INT_RT))) {
		uart_rx_isr();
	}

	debugpins_isr_clr();
}
Exemplo n.º 8
0
/*
 * @brief usart_read_callback usart read callback 
 *        from the UART RXC interrupt
 *
 * @param None
 *
 */
void usart_read_callback(void)
{
   uart_rx_isr();
}