diff --git a/src/libsys/boards/denano/board.c b/src/libsys/boards/denano/board.c index b6fb7d7..e5b6fc2 100644 --- a/src/libsys/boards/denano/board.c +++ b/src/libsys/boards/denano/board.c @@ -27,6 +27,8 @@ con_if_t con_if = }; 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; void dbg_uart_setup(); @@ -50,6 +52,7 @@ void board_init(void) interrupt_init(); // Do some initializations here + *pGpioDir = 0xFF; } extern void dbg_handler(struct xcptcontext * xcp); @@ -87,8 +90,11 @@ inline void _dbg_writechar(uart_if_t const *pUart, char c) inline char _dbg_readchar(uart_if_t const *pUart) { // busy read - while(!(SYS_UART_BIT_RX_AVAIL & *pUart->pCTRL)); - + while(!(SYS_UART_BIT_RX_AVAIL & *pUart->pCTRL)) + { + (*pGpioData)++; + } + (*pGpioData) = 0; return (*pUart->pDATA & 0xFF); } diff --git a/src/libsys/xcpt.h b/src/libsys/xcpt.h index fcb3120..04fcaee 100644 --- a/src/libsys/xcpt.h +++ b/src/libsys/xcpt.h @@ -43,10 +43,10 @@ typedef int (*fp_xcpt_t)(struct xcptcontext * xcp); #define PRINT_REG_CHG(tag_str, reg, reg_last) \ - dbg_puts(tag_str); \ - dbg_print_word(reg); \ - dbg_puts(reg != reg_last ? "*" : " "); \ - dbg_puts(" "); + sputs(tag_str); \ + print_word(reg); \ + sputs(reg != reg_last ? "*" : " "); \ + sputs(" "); // Public functions