From 7d2f03611b30bf762dd1c00fdc2d490d7a81754c Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 11 Mar 2013 17:56:20 +0100 Subject: [PATCH] Use serial_write() --- core/fault_handlers.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/core/fault_handlers.c b/core/fault_handlers.c index 39bcd49..a2ee78f 100644 --- a/core/fault_handlers.c +++ b/core/fault_handlers.c @@ -23,23 +23,11 @@ *****************************************************************************/ #include "core/lpc_regs_12xx.h" -#include "lib/string.h" - -#if 0 -extern char* UARTBUFFER; -extern volatile int UARTPTR; -extern volatile int UARTSENDPTR; -extern volatile int UARTSENDING; +#include "drivers/serial.h" void fault_info(const char* name, uint32_t len) { - struct lpc_uart* uart = LPC_UART_1; - char* dest = &UARTBUFFER[UARTPTR]; - UARTPTR += len; - memcpy(dest, name, len); - if (UARTSENDING == 0) { - uart->func.buffer = UARTBUFFER[UARTSENDPTR++]; - } + serial_write(1, name, len); } /* Cortex M0 core interrupt handlers */ @@ -63,7 +51,6 @@ void SysTick_Handler(void) { fault_info(__FUNCTION__, sizeof(__FUNCTION__)); } -#endif -- 2.43.0