|
|
@ -31,19 +31,6 @@ impl INode for Vga {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fn write_at(&self, _offset: usize, _buf: &[u8]) -> Result<usize> {
|
|
|
|
fn write_at(&self, _offset: usize, _buf: &[u8]) -> Result<usize> {
|
|
|
|
info!("the _offset is {} {}", _offset, _buf[0]);
|
|
|
|
info!("the _offset is {} {}", _offset, _buf[0]);
|
|
|
|
//let mut result : usize = 0;
|
|
|
|
|
|
|
|
//if let Some(fb) = FRAME_BUFFER.lock().as_mut() {
|
|
|
|
|
|
|
|
//for x in 0..1024 { // TODO, should not use CONSTS
|
|
|
|
|
|
|
|
//for y in 0..768 {
|
|
|
|
|
|
|
|
//let blue = _buf[3 * (x * 768 + y)];
|
|
|
|
|
|
|
|
//let green = _buf[3 * (x * 768 + y) + 1];
|
|
|
|
|
|
|
|
//let red = _buf[3 * (x * 768 + y) + 2];
|
|
|
|
|
|
|
|
//let pixel : u32 = ((blue as u32) << 16) | ((green as u32) << 8) | (red as u32);
|
|
|
|
|
|
|
|
//fb.write(x as u32, y as u32, pixel);
|
|
|
|
|
|
|
|
//result += 3;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
use crate::consts::KERNEL_OFFSET;
|
|
|
|
use crate::consts::KERNEL_OFFSET;
|
|
|
|
use core::slice;
|
|
|
|
use core::slice;
|
|
|
|
let frame_buffer_data =
|
|
|
|
let frame_buffer_data =
|
|
|
|