Crate cursor_rs

source ·
Expand description

cursor_rs

Getter & Setter cursor position on VGA(0xB8000) in freestanding Rust.

Example

#![no_std]
extern crate vgainfo_rs;
use vgainfo_rs::*;
extern crate cursor_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) };
    }
    cursor_rs::set_cursor(0,0);
}

Structs

  • An empty struct for invoking the method.

Traits