created stdio module, added hardware script
This commit is contained in:
@@ -4,3 +4,38 @@ pub use crate::drivers::io::{
|
||||
serial::_serial_write,
|
||||
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!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user