Resolve multiple symbol definitions

This commit is contained in:
George Oikonomou 2018-03-24 21:29:51 +00:00
parent 1bf1f37b24
commit 86b10b69aa
2 changed files with 3 additions and 37 deletions

View File

@ -60,7 +60,7 @@
#define SLIP_END 0300 #define SLIP_END 0300
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int int
putchar(int c) dbg_putchar(int c)
{ {
#if DBG_CONF_SLIP_MUX #if DBG_CONF_SLIP_MUX
static char debug_frame = 0; static char debug_frame = 0;
@ -79,7 +79,7 @@ putchar(int c)
write_byte(SLIP_END); write_byte(SLIP_END);
debug_frame = 0; debug_frame = 0;
#endif #endif
dbg_flush(); flush();
} }
return c; return c;
} }
@ -99,18 +99,5 @@ dbg_send_bytes(const unsigned char *s, unsigned int len)
return i; return i;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int
puts(const char *s)
{
unsigned int i = 0;
while(s && *s != 0) {
putchar(*s++);
i++;
}
putchar('\n');
return i;
}
/*---------------------------------------------------------------------------*/
/** @} */ /** @} */

View File

@ -34,33 +34,12 @@
#include <string.h> #include <string.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int int
putchar(int c) dbg_putchar(int c)
{ {
cc26xx_uart_write_byte(c); cc26xx_uart_write_byte(c);
return 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 unsigned int
dbg_send_bytes(const unsigned char *s, unsigned int len) dbg_send_bytes(const unsigned char *s, unsigned int len)
{ {