forked from Imagelibrary/rtems
grlib: Remove NL -> CR in apbuart_outbyte_polled()
This is already done in rtems_putc().
This commit is contained in:
@@ -65,7 +65,6 @@ extern "C" {
|
|||||||
void apbuart_outbyte_polled(
|
void apbuart_outbyte_polled(
|
||||||
struct apbuart_regs *regs,
|
struct apbuart_regs *regs,
|
||||||
unsigned char ch,
|
unsigned char ch,
|
||||||
int do_cr_on_newline,
|
|
||||||
int wait_sent
|
int wait_sent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ static void write_polled(
|
|||||||
int nwrite = 0;
|
int nwrite = 0;
|
||||||
|
|
||||||
while (nwrite < len) {
|
while (nwrite < len) {
|
||||||
apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
|
apbuart_outbyte_polled(uart->regs, *buf++, 0);
|
||||||
nwrite++;
|
nwrite++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,9 @@
|
|||||||
void apbuart_outbyte_polled(
|
void apbuart_outbyte_polled(
|
||||||
struct apbuart_regs *regs,
|
struct apbuart_regs *regs,
|
||||||
unsigned char ch,
|
unsigned char ch,
|
||||||
int do_cr_on_newline,
|
|
||||||
int wait_sent
|
int wait_sent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
send:
|
|
||||||
while ( (regs->status & APBUART_STATUS_TE) == 0 ) {
|
while ( (regs->status & APBUART_STATUS_TE) == 0 ) {
|
||||||
/* Lower bus utilization while waiting for UART */
|
/* Lower bus utilization while waiting for UART */
|
||||||
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
|
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
|
||||||
@@ -25,11 +23,6 @@ send:
|
|||||||
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
|
__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;
|
regs->data = (unsigned int) ch;
|
||||||
|
|
||||||
/* Wait until the character has been sent? */
|
/* Wait until the character has been sent? */
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static void apbuart_write_polled(
|
|||||||
size_t nwrite = 0;
|
size_t nwrite = 0;
|
||||||
|
|
||||||
while (nwrite < len) {
|
while (nwrite < len) {
|
||||||
apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
|
apbuart_outbyte_polled(uart->regs, *buf++, 0);
|
||||||
nwrite++;
|
nwrite++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static void bsp_debug_uart_discard(char c)
|
|||||||
|
|
||||||
static void bsp_debug_uart_output_char(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)
|
static int bsp_debug_uart_poll_char(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user