From 49e13558da702e5f831567737a4a6afca0e4d616 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Sat, 4 Jan 2014 13:28:41 +0100 Subject: [PATCH] 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. --- drivers/serial.c | 6 ------ 1 file changed, 6 deletions(-) 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) { -- 2.43.0