| Crates.io | vgainfo-rs |
| lib.rs | vgainfo-rs |
| version | 0.1.1 |
| created_at | 2023-11-28 10:58:25.602602+00 |
| updated_at | 2023-11-28 13:04:37.588603+00 |
| description | VGA(0xB8000) info in freestanding Rust. |
| homepage | https://gitlab.com/hwoy/vgainfo-rs |
| repository | |
| max_upload_size | |
| id | 1051867 |
| size | 8,213 |
VGA(0xB8000) info in freestanding Rust.
cargo add vgainfo-rs
#![no_std]
extern crate vgainfo_rs;
use vgainfo_rs::*;
fn reset_screen() {
let buffer_ptr = LENGTH as *mut VgaCharType;
let iter = (0..LENGTH).map(|i| unsafe { buffer_ptr.add(i) });
for ptr in iter {
let value = unsafe { ptr.read_volatile() };
unsafe { ptr.write_volatile(value & 0xff00) };
}
}