From 586962c3e9f6c071c5df917baa25da1fc911a692 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 15 Jan 2017 13:44:22 +0000 Subject: [PATCH] - slow down led count git-svn-id: http://moon:8086/svn/mips@83 a8ebac50-d88d-4704-bea3-6648445a41b3 --- src/libsys/boards/denano/board.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libsys/boards/denano/board.c b/src/libsys/boards/denano/board.c index e5b6fc2..c2f4700 100644 --- a/src/libsys/boards/denano/board.c +++ b/src/libsys/boards/denano/board.c @@ -26,9 +26,10 @@ con_if_t con_if = con_if_entry, ARRAYSIZE(con_if_entry) }; -uart_if_t const *dbg_uart = NULL; -volatile uint32_t *pGpioData = (uint32_t*)SYS_GPIO_0_DATA; -volatile uint32_t *pGpioDir = (uint32_t*)SYS_GPIO_0_DIR; +static uart_if_t const *dbg_uart = NULL; +static volatile uint32_t *pGpioData = (uint32_t*)SYS_GPIO_0_DATA; +static volatile uint32_t *pGpioDir = (uint32_t*)SYS_GPIO_0_DIR; +static uint32_t led_count = 0; void dbg_uart_setup(); @@ -92,9 +93,9 @@ inline char _dbg_readchar(uart_if_t const *pUart) // busy read while(!(SYS_UART_BIT_RX_AVAIL & *pUart->pCTRL)) { - (*pGpioData)++; + (*pGpioData) = (led_count++) >> 16; } - (*pGpioData) = 0; + led_count = 0; return (*pUart->pDATA & 0xFF); }