re architectures drivers

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
Julien CLEMENT 2022-12-10 18:41:26 +01:00
parent 9ae31eb2f6
commit c85e7b5e5a
6 changed files with 7 additions and 6 deletions

0
src/drivers/atapi/mod.rs Normal file

2
src/drivers/mod.rs Normal file

@ -0,0 +1,2 @@
pub mod serial;
pub mod vga;

@ -48,7 +48,7 @@ pub fn _print(args: ::core::fmt::Arguments) {
#[macro_export] #[macro_export]
macro_rules! serial_print { macro_rules! serial_print {
($($arg:tt)*) => { ($($arg:tt)*) => {
$crate::serial::_print(format_args!($($arg)*)); $crate::drivers::serial::_print(format_args!($($arg)*));
}; };
} }

@ -16,7 +16,7 @@ lazy_static! {
#[macro_export] #[macro_export]
macro_rules! print { macro_rules! print {
($($arg:tt)*) => ($crate::vga::_print(format_args!($($arg)*))); ($($arg:tt)*) => ($crate::drivers::vga::_print(format_args!($($arg)*)));
} }
#[macro_export] #[macro_export]

@ -1,6 +1,6 @@
use crate::gdt; use crate::gdt;
use crate::hlt_loop; use crate::hlt_loop;
use crate::vga::{self, Color, ColorCode}; use crate::drivers::vga::{self, Color, ColorCode};
use crate::{println}; use crate::{println};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use x86_64::structures::idt::PageFaultErrorCode; use x86_64::structures::idt::PageFaultErrorCode;

@ -6,8 +6,7 @@
mod gdt; mod gdt;
mod interrupts; mod interrupts;
mod memory; mod memory;
mod serial; mod drivers;
mod vga;
mod task; mod task;
//#[macro_use] //#[macro_use]
@ -16,7 +15,7 @@ extern crate multiboot2;
use core::panic::PanicInfo; use core::panic::PanicInfo;
use multiboot2::BootInformation; use multiboot2::BootInformation;
use vga::{Color, ColorCode}; use drivers::vga::{self, Color, ColorCode};
use task::{executor::Executor, Task, keyboard}; use task::{executor::Executor, Task, keyboard};
#[alloc_error_handler] #[alloc_error_handler]