fix(serial): now wait instead of kernel panick on serial !EMPTY_TRANSMITTER
continuous-integration/drone/push Build is passing

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2021-12-03 22:36:40 +01:00
1 parent 03acf2943e
commit da5dd55ce6
2 files changed
+4 -8

No files matched your search

+1 -5
View File
@@ -29,11 +29,7 @@ pub fn init() {
pub extern "C" fn julios_main() -> ! {
init();
println!("***JuliOS V0.1.0***");
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
}
stack_overflow();
serial_println!("Hello serial");
panic!("Kernel end of flow");
}
+3 -3
View File
@@ -93,9 +93,9 @@ impl SerialPort {
fn write_string(&mut self, s: &str) -> usize {
let mut len: usize = 0;
for byte in s.bytes() {
let written: bool = self.write_byte(byte);
if !written {
return len;
let mut written: bool = self.write_byte(byte);
while !written {
written = self.write_byte(byte);
}
len += 1;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.