1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/ableos/src/devices/character_devs/dev_null.rs
2022-03-02 08:38:22 -06:00

32 lines
528 B
Rust

use kernel::device_interface::character::CharacterDevice;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct DevNull;
impl CharacterDevice for DevNull {
fn can_read(&self) -> bool {
true
}
fn can_write(&self) -> bool {
true
}
fn read_char(&mut self) -> Option<char> {
Some(0x00 as char)
}
fn write_char(&mut self, _: char) -> bool {
true
}
fn reset(&mut self) {
todo!()
}
fn initialize(&mut self) -> bool {
todo!()
}
}