From d3c3e79d53df73a210dc07eeb0ffee1b34b6930a Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Wed, 28 Aug 2024 15:01:54 +0900 Subject: [PATCH] addressed review comments --- hal/raspi3.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hal/raspi3.c b/hal/raspi3.c index 05c5d58d2..04ef83148 100644 --- a/hal/raspi3.c +++ b/hal/raspi3.c @@ -152,10 +152,6 @@ char uart_read(void) } while(*UART0_FR & 0x10); /* read it and return */ c = (char)(*UART0_DR); - /* convert carrige return to newline */ - if (c == '\r') - c = '\n'; - return c; } @@ -166,10 +162,6 @@ void uart_write(const char* buf, uint32_t sz) { uint32_t len = sz; while (len > 0 && *buf) { - /* convert newline to carrige return + newline */ - if (*buf == '\n') - uart_tx('\r'); - uart_tx(*buf++); len--; } @@ -216,7 +208,7 @@ void uart_init() *UART0_IBRD = 2; /* Fractional part register = (.17013 * 64) + 0.5 = 11.38 = ~11 */ *UART0_FBRD = 0xB; - /* Enable fifo, 8bit data transmission ( 1stop bit, no parity) */ + /* Enable fifo, 8bit data transmission (1 stop bit, no parity) */ *UART0_LCRH = (1 << 4) | (1 << 5) | (1 << 6); /* enable UART0 transfer & receive*/ *UART0_CR = (1 << 0) | (1 << 8) | (1 << 9);