- slow down led count

git-svn-id: http://moon:8086/svn/mips@83 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-15 13:44:22 +00:00
parent 301865c2b4
commit 586962c3e9
+6 -5
View File
@@ -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);
}