diff --git a/src/drivers/atapi/mod.rs b/src/drivers/atapi/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/drivers/mod.rs b/src/drivers/mod.rs new file mode 100644 index 0000000..fd30178 --- /dev/null +++ b/src/drivers/mod.rs @@ -0,0 +1,2 @@ +pub mod serial; +pub mod vga; \ No newline at end of file diff --git a/src/serial.rs b/src/drivers/serial/mod.rs similarity index 98% rename from src/serial.rs rename to src/drivers/serial/mod.rs index c2cc565..bff02bc 100644 --- a/src/serial.rs +++ b/src/drivers/serial/mod.rs @@ -48,7 +48,7 @@ pub fn _print(args: ::core::fmt::Arguments) { #[macro_export] macro_rules! serial_print { ($($arg:tt)*) => { - $crate::serial::_print(format_args!($($arg)*)); + $crate::drivers::serial::_print(format_args!($($arg)*)); }; } diff --git a/src/vga.rs b/src/drivers/vga/mod.rs similarity index 97% rename from src/vga.rs rename to src/drivers/vga/mod.rs index 0cdf0b7..7aeddc2 100644 --- a/src/vga.rs +++ b/src/drivers/vga/mod.rs @@ -16,7 +16,7 @@ lazy_static! { #[macro_export] macro_rules! print { - ($($arg:tt)*) => ($crate::vga::_print(format_args!($($arg)*))); + ($($arg:tt)*) => ($crate::drivers::vga::_print(format_args!($($arg)*))); } #[macro_export] diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index e5f5dd5..8511435 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -1,6 +1,6 @@ use crate::gdt; use crate::hlt_loop; -use crate::vga::{self, Color, ColorCode}; +use crate::drivers::vga::{self, Color, ColorCode}; use crate::{println}; use lazy_static::lazy_static; use x86_64::structures::idt::PageFaultErrorCode; diff --git a/src/lib.rs b/src/lib.rs index 7689332..e598070 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,8 +6,7 @@ mod gdt; mod interrupts; mod memory; -mod serial; -mod vga; +mod drivers; mod task; //#[macro_use] @@ -16,7 +15,7 @@ extern crate multiboot2; use core::panic::PanicInfo; use multiboot2::BootInformation; -use vga::{Color, ColorCode}; +use drivers::vga::{self, Color, ColorCode}; use task::{executor::Executor, Task, keyboard}; #[alloc_error_handler]