From: Nathael Pajani Date: Mon, 11 Mar 2013 16:56:20 +0000 (+0100) Subject: Use serial_write() X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=7d2f03611b30bf762dd1c00fdc2d490d7a81754c;p=soft%2Flpc122x%2Fcore Use serial_write() --- 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