forked from koniifer/ableos
this ia bad way to handle this but oh well
This commit is contained in:
parent
f4246ae387
commit
fb8a835926
|
@ -7,7 +7,7 @@ use {
|
||||||
},
|
},
|
||||||
alloc::string::String,
|
alloc::string::String,
|
||||||
hashbrown::HashMap,
|
hashbrown::HashMap,
|
||||||
log::info,
|
log::{info, trace},
|
||||||
spin::{lazy::Lazy, Mutex},
|
spin::{lazy::Lazy, Mutex},
|
||||||
};
|
};
|
||||||
pub struct Services(HashMap<u64, Protocol>);
|
pub struct Services(HashMap<u64, Protocol>);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "serial_driver"
|
name = "a_serial_driver"
|
||||||
authors = ["Able"]
|
authors = ["Able"]
|
||||||
|
|
||||||
[dependants.libraries]
|
[dependants.libraries]
|
|
@ -19,11 +19,13 @@ serial_println := fn(ptr: ^u8): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
main := fn(): int {
|
main := fn(): int {
|
||||||
serial_println("Starting Serial Driver.\0")
|
// This must be done first and foremost to prevent racing
|
||||||
// Note that the first byte is reserved, pad accordingly.
|
|
||||||
a := buffer.create("XNumber\0")
|
a := buffer.create("XNumber\0")
|
||||||
|
serial_println("Starting Serial Driver.\0")
|
||||||
|
|
||||||
|
// Note that the first byte is reserved, pad accordingly.
|
||||||
b := buffer.search("XNumber\0")
|
b := buffer.search("XNumber\0")
|
||||||
|
|
||||||
if a == b {
|
if a == b {
|
||||||
serial_println("Stopping Serial Driver.\0")
|
serial_println("Stopping Serial Driver.\0")
|
||||||
}
|
}
|
|
@ -8,5 +8,7 @@ main := fn(): int {
|
||||||
a := memory.inb(0, 70)
|
a := memory.inb(0, 70)
|
||||||
b := memory.inb(0, 71)
|
b := memory.inb(0, 71)
|
||||||
|
|
||||||
|
c := buffer.search("XNumber\0")
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
|
@ -19,8 +19,8 @@ resolution = "1024x768x24"
|
||||||
|
|
||||||
# [boot.limine.ableos.modules.tests]
|
# [boot.limine.ableos.modules.tests]
|
||||||
# path = "boot:///tests.hbf"
|
# path = "boot:///tests.hbf"
|
||||||
[boot.limine.ableos.modules.serial_driver]
|
[boot.limine.ableos.modules.a_serial_driver]
|
||||||
path = "boot:///serial_driver.hbf"
|
path = "boot:///a_serial_driver.hbf"
|
||||||
|
|
||||||
|
|
||||||
[boot.limine.ableos.modules.diskio_driver]
|
[boot.limine.ableos.modules.diskio_driver]
|
||||||
|
|
Loading…
Reference in a new issue