grlib: Remove NL -> CR in apbuart_outbyte_polled()

This is already done in rtems_putc().
This commit is contained in:
Sebastian Huber
2021-06-10 14:51:38 +02:00
parent 634a2c0616
commit 85febe7b10
6 changed files with 4 additions and 12 deletions

View File

@@ -65,7 +65,6 @@ extern "C" {
void apbuart_outbyte_polled(
struct apbuart_regs *regs,
unsigned char ch,
int do_cr_on_newline,
int wait_sent
);

View File

@@ -100,7 +100,7 @@ static void bsp_out_char(char c)
*/
}
apbuart_outbyte_polled(grlib_debug_uart, c, 1, 1);
apbuart_outbyte_polled(grlib_debug_uart, c, 1);
}
/*

View File

@@ -641,7 +641,7 @@ static void write_polled(
int nwrite = 0;
while (nwrite < len) {
apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
apbuart_outbyte_polled(uart->regs, *buf++, 0);
nwrite++;
}
}

View File

@@ -12,11 +12,9 @@
void apbuart_outbyte_polled(
struct apbuart_regs *regs,
unsigned char ch,
int do_cr_on_newline,
int wait_sent
)
{
send:
while ( (regs->status & APBUART_STATUS_TE) == 0 ) {
/* Lower bus utilization while waiting for UART */
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
@@ -25,11 +23,6 @@ send:
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
}
if ((ch == '\n') && do_cr_on_newline) {
regs->data = (unsigned int) '\r';
do_cr_on_newline = 0;
goto send;
}
regs->data = (unsigned int) ch;
/* Wait until the character has been sent? */

View File

@@ -78,7 +78,7 @@ static void apbuart_write_polled(
size_t nwrite = 0;
while (nwrite < len) {
apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
apbuart_outbyte_polled(uart->regs, *buf++, 0);
nwrite++;
}
}

View File

@@ -34,7 +34,7 @@ static void bsp_debug_uart_discard(char c)
static void bsp_debug_uart_output_char(char c)
{
apbuart_outbyte_polled(leon3_debug_uart, c, 1, 1);
apbuart_outbyte_polled(leon3_debug_uart, c, 1);
}
static int bsp_debug_uart_poll_char(void)