From 86b10b69aaebfc754bb940e04e49ac576e5d4734 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 24 Mar 2018 21:29:51 +0000 Subject: [PATCH] Resolve multiple symbol definitions --- arch/cpu/cc2538/dbg.c | 17 ++--------------- arch/cpu/cc26xx-cc13xx/dbg.c | 23 +---------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/arch/cpu/cc2538/dbg.c b/arch/cpu/cc2538/dbg.c index e95a6c94a..8f51f235c 100644 --- a/arch/cpu/cc2538/dbg.c +++ b/arch/cpu/cc2538/dbg.c @@ -60,7 +60,7 @@ #define SLIP_END 0300 /*---------------------------------------------------------------------------*/ int -putchar(int c) +dbg_putchar(int c) { #if DBG_CONF_SLIP_MUX static char debug_frame = 0; @@ -79,7 +79,7 @@ putchar(int c) write_byte(SLIP_END); debug_frame = 0; #endif - dbg_flush(); + flush(); } return c; } @@ -99,18 +99,5 @@ dbg_send_bytes(const unsigned char *s, unsigned int len) return i; } /*---------------------------------------------------------------------------*/ -int -puts(const char *s) -{ - unsigned int i = 0; - - while(s && *s != 0) { - putchar(*s++); - i++; - } - putchar('\n'); - return i; -} -/*---------------------------------------------------------------------------*/ /** @} */ diff --git a/arch/cpu/cc26xx-cc13xx/dbg.c b/arch/cpu/cc26xx-cc13xx/dbg.c index 7cbd1901a..bf03aade4 100644 --- a/arch/cpu/cc26xx-cc13xx/dbg.c +++ b/arch/cpu/cc26xx-cc13xx/dbg.c @@ -34,33 +34,12 @@ #include /*---------------------------------------------------------------------------*/ int -putchar(int c) +dbg_putchar(int c) { cc26xx_uart_write_byte(c); return c; } /*---------------------------------------------------------------------------*/ -int -puts(const char *str) -{ - int i; - if(str == NULL) { - return 0; - } - for(i = 0; i < strlen(str); i++) { - cc26xx_uart_write_byte(str[i]); - } - cc26xx_uart_write_byte('\n'); - - /* - * Wait for the line to go out. This is to prevent garbage when used between - * UART on/off cycles - */ - while(cc26xx_uart_busy() == UART_BUSY); - - return i; -} -/*---------------------------------------------------------------------------*/ unsigned int dbg_send_bytes(const unsigned char *s, unsigned int len) {