Add serial console terminal

This commit is contained in:
Jeremy Soller 2016-12-19 21:34:03 -07:00
parent 7a361b34db
commit b91d0236bb
2 changed files with 11 additions and 15 deletions

View file

@ -72,19 +72,6 @@ impl SerialPort {
self.data.write(data)
}
fn write_translate(&mut self, data: u8) {
match data {
8 | 0x7F => {
self.write(8);
self.write(b' ');
self.write(8);
},
_ => {
self.write(data);
}
}
}
fn init(&mut self) {
//TODO: Cleanup
self.int_en.write(0x00);
@ -111,7 +98,16 @@ impl SerialPort {
impl Write for SerialPort {
fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> {
for byte in s.bytes() {
self.write_translate(byte);
match byte {
8 | 0x7F => {
self.write(8);
self.write(b' ');
self.write(8);
},
_ => {
self.write(byte);
}
}
}
Ok(())

View file

@ -8,5 +8,5 @@
dhcpd -b
getty display:2
getty display:3
stdio debug:
/sbin/orbital display:4/activate /ui/bin/orblogin /ui/bin/launcher
getty debug: -J