[platform] rename all of the dputc/dgetc routines to match the new platform_ debug interface

-just a simple rename
This commit is contained in:
Travis Geiselbrecht
2012-09-23 17:57:40 -07:00
parent f138f35a91
commit e307791ba2
8 changed files with 16 additions and 16 deletions

View File

@@ -27,12 +27,12 @@
#include <platform/armemu/memmap.h>
#include <platform/debug.h>
void _dputc(char c)
void platform_dputc(char c)
{
*REG8(DEBUG_STDOUT) = c;
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
for (;;) {
int8_t result = (int8_t)*REG8(DEBUG_STDIN);

View File

@@ -64,13 +64,13 @@ void ser_puts(const char *s)
}
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
return -1;
}
void _dputc(char c)
void platform_dputc(char c)
{
ser_putc(c);
}

View File

@@ -93,12 +93,12 @@ static int uart_getc(int port, bool wait) /* returns -1 if no data available */
return -1;
}
void _dputc(char c)
void platform_dputc(char c)
{
uart_putc(0, c);
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
int result = uart_getc(0, false);

View File

@@ -30,14 +30,14 @@
#include <dev/uart.h>
#include <target/debugconfig.h>
void _dputc(char c)
void platform_dputc(char c)
{
if (c == '\n')
uart_putc(DEBUG_UART, '\r');
uart_putc(DEBUG_UART, c);
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
int _c;

View File

@@ -92,7 +92,7 @@ static int uart_getc(int port, bool wait) /* returns -1 if no data available */
return read_uart_reg(port, UART_RHR);
}
void _dputc(char c)
void platform_dputc(char c)
{
if (c == '\n')
uart_putc(0, '\r');
@@ -111,7 +111,7 @@ static enum handler_return debug_timer_callback(timer_t *t, time_t now, void *ar
}
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
ssize_t len;

View File

@@ -87,7 +87,7 @@ int uart_getc(char *c, bool wait)
return cbuf_read(&uart_rx_buf, c, 1, wait);
}
void _dputc(char c)
void platform_dputc(char c)
{
#if WITH_CGA_CONSOLE
cputc(c);
@@ -96,7 +96,7 @@ void _dputc(char c)
#endif
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
#if WITH_CGA_CONSOLE
int ret = platform_read_key(c);

View File

@@ -78,7 +78,7 @@ void sam_debug_init(void)
uart_enable_interrupt(UART, UART_IER_RXRDY);
}
void _dputc(char c)
void platform_dputc(char c)
{
if (c == '\n') {
_dputc('\r');
@@ -89,7 +89,7 @@ void _dputc(char c)
uart_write(UART, c);
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
return cbuf_read(&debug_rx_buf, c, 1, wait);
}

View File

@@ -44,14 +44,14 @@ void stm32_debug_init(void)
uart_init();
}
void _dputc(char c)
void platform_dputc(char c)
{
if (c == '\n')
uart_putc(DEBUG_UART, '\r');
uart_putc(DEBUG_UART, c);
}
int dgetc(char *c, bool wait)
int platform_dgetc(char *c, bool wait)
{
int ret = uart_getc(DEBUG_UART, wait);
if (ret == -1)