fix(serial): now wait instead of kernel panick on serial !EMPTY_TRANSMITTER
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
parent
03acf2943e
commit
da5dd55ce6
@ -29,11 +29,7 @@ pub fn init() {
|
|||||||
pub extern "C" fn julios_main() -> ! {
|
pub extern "C" fn julios_main() -> ! {
|
||||||
init();
|
init();
|
||||||
println!("***JuliOS V0.1.0***");
|
println!("***JuliOS V0.1.0***");
|
||||||
fn stack_overflow() {
|
serial_println!("Hello serial");
|
||||||
stack_overflow(); // for each recursion, the return address is pushed
|
|
||||||
}
|
|
||||||
|
|
||||||
stack_overflow();
|
|
||||||
|
|
||||||
panic!("Kernel end of flow");
|
panic!("Kernel end of flow");
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,9 @@ impl SerialPort {
|
|||||||
fn write_string(&mut self, s: &str) -> usize {
|
fn write_string(&mut self, s: &str) -> usize {
|
||||||
let mut len: usize = 0;
|
let mut len: usize = 0;
|
||||||
for byte in s.bytes() {
|
for byte in s.bytes() {
|
||||||
let written: bool = self.write_byte(byte);
|
let mut written: bool = self.write_byte(byte);
|
||||||
if !written {
|
while !written {
|
||||||
return len;
|
written = self.write_byte(byte);
|
||||||
}
|
}
|
||||||
len += 1;
|
len += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user