Fix typos
This commit is contained in:
parent
0cbda1201a
commit
e5ab830594
|
@ -233,7 +233,7 @@ impl ConsoleOps for MiniUart {
|
||||||
/// Display a string
|
/// Display a string
|
||||||
fn puts(&self, string: &str) {
|
fn puts(&self, string: &str) {
|
||||||
for c in string.chars() {
|
for c in string.chars() {
|
||||||
// convert newline to carrige return + newline
|
// convert newline to carriage return + newline
|
||||||
if c == '\n' {
|
if c == '\n' {
|
||||||
self.putc('\r')
|
self.putc('\r')
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ impl ConsoleOps for MiniUart {
|
||||||
// read it and return
|
// read it and return
|
||||||
let mut ret = self.AUX_MU_IO.get() as u8 as char;
|
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' {
|
if ret == '\r' {
|
||||||
ret = '\n'
|
ret = '\n'
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,7 +242,7 @@ impl ConsoleOps for PL011Uart {
|
||||||
/// Display a string
|
/// Display a string
|
||||||
fn puts(&self, string: &str) {
|
fn puts(&self, string: &str) {
|
||||||
for c in string.chars() {
|
for c in string.chars() {
|
||||||
// convert newline to carrige return + newline
|
// convert newline to carriage return + newline
|
||||||
if c == '\n' {
|
if c == '\n' {
|
||||||
self.putc('\r')
|
self.putc('\r')
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ impl ConsoleOps for PL011Uart {
|
||||||
// read it and return
|
// read it and return
|
||||||
let mut ret = self.DR.get() as u8 as char;
|
let mut ret = self.DR.get() as u8 as char;
|
||||||
|
|
||||||
// convert carrige return to newline
|
// convert carriage return to newline
|
||||||
if ret == '\r' {
|
if ret == '\r' {
|
||||||
ret = '\n'
|
ret = '\n'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue