Crates.io | vga-rs |
lib.rs | vga-rs |
version | 0.1.4 |
source | src |
created_at | 2023-11-28 15:18:05.173221 |
updated_at | 2023-11-29 00:31:40.796522 |
description | Low level VGA(0xB8000) library in freestanding Rust. |
homepage | https://gitlab.com/hwoy/vga-rs |
repository | |
max_upload_size | |
id | 1052074 |
size | 15,009 |
Low level VGA(0xB8000) library in freestanding Rust.
cargo add vga-rs
#![no_std]
extern crate vga_rs;
use vga_rs::*;
extern crate cursor_rs;
fn reset_screen() {
let mut vga_buffer = VgaBuffer::new()
let buffer_slice = let mut vga_buffer.as_mut_slice();
for vchar in buffer_slice.iter_mut()
{
let VgaChar { codepoint: _,attribute: attr,} = vchar.get_volatile();
vchar.set_volatile(VgaChar::new(0u8, Attribute::from_u8(attr)));
}
cursor_rs::set_cursor(0,0);
}