3 Commits

Author SHA1 Message Date
zxq5 438ef7a748 stop banning mod.rs 2025-02-24 16:30:38 +00:00
zxq5 2f7ab8fe6b Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2025-02-24 16:29:58 +00:00
zxq5 ca1c695e32 created stdio module, added hardware script 2025-02-24 16:28:56 +00:00
5 changed files with 42 additions and 5 deletions
+4 -2
View File
@@ -10,7 +10,6 @@
rustdoc::missing_errors_doc, rustdoc::missing_errors_doc,
rustdoc::missing_panics_doc rustdoc::missing_panics_doc
)] )]
#![deny(clippy::module_inception)]
extern crate alloc; extern crate alloc;
@@ -62,8 +61,11 @@ pub fn boot() -> Result<(), &'static str> {
let memory_map = memmap::get_memory_map(); let memory_map = memmap::get_memory_map();
print_log!(" Initialising Serial... "); print_log!(" Initialising Serial... ");
libk::drivers::io::serial::init()?; if libk::drivers::io::serial::init().is_err() {
println_log!("[Not Detected]")
} else {
println_log!("[Success]"); println_log!("[Success]");
}
print_log!(" Setting Up Global Descriptor Table... "); print_log!(" Setting Up Global Descriptor Table... ");
gdt::init(); gdt::init();
-1
View File
@@ -11,7 +11,6 @@
rustdoc::missing_errors_doc, rustdoc::missing_errors_doc,
rustdoc::missing_panics_doc rustdoc::missing_panics_doc
)] )]
#![deny(clippy::module_inception)]
// alloc // alloc
// io : serial, framebuffer, ascii(?), keyboard // io : serial, framebuffer, ascii(?), keyboard
+35
View File
@@ -4,3 +4,38 @@ pub use crate::drivers::io::{
serial::_serial_write, serial::_serial_write,
serial_print, serial_println, serial_print, serial_println,
}; };
pub mod stdin {
use alloc::string::String;
/// Reads a line of input from standard input asynchronously, returning a `String` containing
/// the input line. Does not include the newline character at the end of the line.
///
/// If the user presses the abort key (usually Ctrl+C), the returned string will be empty.
///
/// This function is currently unimplemented.
pub async fn read_line() -> String {
todo!()
}
/// Reads a character from standard input and blocks the current task until a character is
/// available.
///
/// # Note
///
/// This function is not yet implemented.
pub async fn read_char() -> char {
todo!()
}
/// Attempt to read a character from standard input without blocking the current task.
///
/// If no character is available, returns `None`.
///
/// # Note
///
/// This function is not yet implemented.
pub fn try_read_char() -> Option<char> {
todo!()
}
}
-1
View File
@@ -8,7 +8,6 @@
rustdoc::missing_errors_doc, rustdoc::missing_errors_doc,
rustdoc::missing_panics_doc rustdoc::missing_panics_doc
)] )]
#![deny(clippy::module_inception)]
use std::fs::File; use std::fs::File;
use std::io::{Read, Seek, SeekFrom}; use std::io::{Read, Seek, SeekFrom};
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
sudo dd if=./build/image.iso of="$1"