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
/*---------------------------------------------------------------------------*/
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;
}
/*---------------------------------------------------------------------------*/
/** @} */

View File

@ -34,33 +34,12 @@
#include <string.h>
/*---------------------------------------------------------------------------*/
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)
{