forked from AbleOS/ableos
Redux
This commit is contained in:
parent
0404fdd41f
commit
1d195d618e
|
@ -100,26 +100,20 @@ extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStac
|
||||||
|
|
||||||
// print!("{}", char::try_from(character).unwrap());
|
// print!("{}", char::try_from(character).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0x5E => KERNEL_STATE.lock().shutdown(),
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
print!("{}", char::try_from(character).unwrap());
|
print!("{}", char::try_from(character).unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let crazy = true;
|
|
||||||
if crazy {
|
|
||||||
let mut xyz = crate::kmain::KEY_BUFFER.lock();
|
|
||||||
xyz.push(character.try_into().unwrap());
|
|
||||||
// println!("{:?}", &xyz);
|
|
||||||
|
|
||||||
crate::kmain::key_entropy(character.try_into().unwrap());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DecodedKey {
|
DecodedKey {
|
||||||
kind: DecodedKeyKind::RawKey,
|
kind: DecodedKeyKind::RawKey,
|
||||||
value: key,
|
value: key,
|
||||||
} => match KeyCode::from(key) {
|
} => match KeyCode::from(key) {
|
||||||
KeyCode::AltLeft => {}
|
KeyCode::AltLeft => {}
|
||||||
// KeyCode::Escape => {}
|
|
||||||
KeyCode::AltRight => {}
|
KeyCode::AltRight => {}
|
||||||
_ => {
|
_ => {
|
||||||
print!("{:?}", KeyCode::from(key))
|
print!("{:?}", KeyCode::from(key))
|
||||||
|
|
|
@ -122,6 +122,9 @@ impl ScreenBuffer {
|
||||||
info!("Shaders done");
|
info!("Shaders done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO force clear
|
// TODO force clear
|
||||||
pub fn force_redraw(&mut self) {
|
pub fn force_redraw(&mut self) {
|
||||||
use shadeable::pixel_format::into_vga_16;
|
use shadeable::pixel_format::into_vga_16;
|
||||||
|
|
|
@ -1,29 +1,21 @@
|
||||||
#![allow(clippy::empty_loop)]
|
#![allow(clippy::empty_loop)]
|
||||||
|
|
||||||
use alloc::{format, vec::Vec};
|
|
||||||
|
|
||||||
use crate::{
|
|
||||||
boot_conf::BootConfig,
|
|
||||||
capabilities::FileAccess,
|
|
||||||
file::{File, PathRep},
|
|
||||||
scheduler::SCHEDULER,
|
|
||||||
ALIAS_TABLE,
|
|
||||||
};
|
|
||||||
|
|
||||||
// use crate::scheduler;
|
// use crate::scheduler;
|
||||||
|
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
arch::{init, sloop},
|
arch::{init, sloop},
|
||||||
boot_conf,
|
boot_conf,
|
||||||
|
boot_conf::BootConfig,
|
||||||
|
capabilities::FileAccess,
|
||||||
experiments::{
|
experiments::{
|
||||||
info::master,
|
info::master,
|
||||||
systeminfo::{KERNEL_VERSION, RELEASE_TYPE},
|
systeminfo::{KERNEL_VERSION, RELEASE_TYPE},
|
||||||
},
|
},
|
||||||
graphics::{VgaBuffer, SCREEN_BUFFER},
|
file::{File, PathRep},
|
||||||
|
relib::network::socket::SimpleSock,
|
||||||
relib::network::socket::Socket,
|
relib::network::socket::Socket,
|
||||||
relib::network::socket::{SimpleSock, SocketReturns},
|
scheduler::SCHEDULER,
|
||||||
vga_e::{self, num_to_vga16},
|
|
||||||
},
|
},
|
||||||
alloc::{
|
alloc::{
|
||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
|
@ -32,10 +24,6 @@ use {
|
||||||
core::sync::atomic::{AtomicU64, Ordering::*},
|
core::sync::atomic::{AtomicU64, Ordering::*},
|
||||||
lazy_static::lazy_static,
|
lazy_static::lazy_static,
|
||||||
log::*,
|
log::*,
|
||||||
picorand::PicoRandGenerate,
|
|
||||||
rkyv::{ser::serializers::AllocSerializer, Deserialize},
|
|
||||||
shadeable::pixel_format::from_vga_16,
|
|
||||||
y_compositor_protocol::Version,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -47,7 +35,6 @@ pub extern "C" fn stack_overflow() -> u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref KEY_BUFFER: spin::Mutex<String> = spin::Mutex::new("".to_string());
|
|
||||||
pub static ref TICK: AtomicU64 = AtomicU64::new(0);
|
pub static ref TICK: AtomicU64 = AtomicU64::new(0);
|
||||||
pub static ref BOOT_CONF: BootConfig = boot_conf::BootConfig::new();
|
pub static ref BOOT_CONF: BootConfig = boot_conf::BootConfig::new();
|
||||||
}
|
}
|
||||||
|
@ -117,8 +104,6 @@ pub fn tick() {
|
||||||
|
|
||||||
TICK.store(data, Relaxed)
|
TICK.store(data, Relaxed)
|
||||||
}
|
}
|
||||||
/// called every time a key is pressed to add it to the randomness pool
|
|
||||||
pub fn key_entropy(key: u8) {}
|
|
||||||
|
|
||||||
pub fn cpu_socket_startup() {
|
pub fn cpu_socket_startup() {
|
||||||
let mut cpu_info_socket = SimpleSock::new();
|
let mut cpu_info_socket = SimpleSock::new();
|
||||||
|
|
|
@ -93,7 +93,7 @@ pub fn screen_writer_test() {
|
||||||
// sock_print_id.write(format!("1....2....3....4....5....6....7....8....9").into());
|
// sock_print_id.write(format!("1....2....3....4....5....6....7....8....9").into());
|
||||||
|
|
||||||
for current in (*String::from_utf8_lossy(&sock_print_id.peek().unwrap())).chars() {
|
for current in (*String::from_utf8_lossy(&sock_print_id.peek().unwrap())).chars() {
|
||||||
vga_e::draw_char(0, 0, current, 0);
|
vga_e::draw_char(0, 0, current, 0xff000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue