Make timer a parameter of the RGB led test function Remove RGB Led related code from...
authorNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 4 Jan 2014 12:28:41 +0000 (13:28 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
drivers/serial.c

index b8bb6f1..c9b1692 100644 (file)
@@ -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) {