From: Nathael Pajani Date: Sat, 4 Jan 2014 12:28:41 +0000 (+0100) Subject: Make timer a parameter of the RGB led test function Remove RGB Led related code from... X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=49e13558da702e5f831567737a4a6afca0e4d616;p=soft%2Flpc122x%2Fcore Make timer a parameter of the RGB led test function Remove RGB Led related code from serial interrupt handler code, to be replaced by some callback mechanism. --- diff --git a/drivers/serial.c b/drivers/serial.c index b8bb6f1..c9b1692 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -78,15 +78,9 @@ static void UART_Handler(struct uart_device* uart) uint32_t intr = uart->regs->func.intr_pending; if ((intr & LPC_UART_INT_MASK) == LPC_UART_INT_RX) { - static int i = 0; uint8_t data = uart->regs->func.buffer; /* Echo */ uart->regs->func.buffer = data; - /* Change RGB Led color */ - timer_set_match(LPC_TIMER_32B1, i++, data); - if (i > 2) { - i = 0; - } } /* We are currently sending, send next char */ if ((intr & LPC_UART_INT_MASK) == LPC_UART_INT_TX) {