diff --git a/src/platform/mini_uart.rs b/src/platform/mini_uart.rs index 534f1b6..25caa0f 100644 --- a/src/platform/mini_uart.rs +++ b/src/platform/mini_uart.rs @@ -233,7 +233,7 @@ impl ConsoleOps for MiniUart { /// Display a string fn puts(&self, string: &str) { for c in string.chars() { - // convert newline to carrige return + newline + // convert newline to carriage return + newline if c == '\n' { self.putc('\r') } @@ -251,7 +251,7 @@ impl ConsoleOps for MiniUart { // read it and return let mut ret = self.AUX_MU_IO.get() as u8 as char; - // convert carrige return to newline + // convert carriage return to newline if ret == '\r' { ret = '\n' } diff --git a/src/platform/uart.rs b/src/platform/uart.rs index 4039ab2..2e51619 100644 --- a/src/platform/uart.rs +++ b/src/platform/uart.rs @@ -242,7 +242,7 @@ impl ConsoleOps for PL011Uart { /// Display a string fn puts(&self, string: &str) { for c in string.chars() { - // convert newline to carrige return + newline + // convert newline to carriage return + newline if c == '\n' { self.putc('\r') } @@ -259,7 +259,7 @@ impl ConsoleOps for PL011Uart { // read it and return let mut ret = self.DR.get() as u8 as char; - // convert carrige return to newline + // convert carriage return to newline if ret == '\r' { ret = '\n' }