vgainfo-rs

Crates.iovgainfo-rs
lib.rsvgainfo-rs
version0.1.1
sourcesrc
created_at2023-11-28 10:58:25.602602
updated_at2023-11-28 13:04:37.588603
descriptionVGA(0xB8000) info in freestanding Rust.
homepagehttps://gitlab.com/hwoy/vgainfo-rs
repository
max_upload_size
id1051867
size8,213
Watthanachai Dueanklang (hwoy)

documentation

https://docs.rs/vgainfo-rs

README

vgainfo-rs

VGA(0xB8000) info in freestanding Rust.

How use


cargo add vgainfo-rs

Example

#![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) };
    }
}

Contact me

Commit count: 0

cargo fmt