Crates.io | portable |
lib.rs | portable |
version | 0.2.1 |
source | src |
created_at | 2024-07-28 19:33:44.321398 |
updated_at | 2024-08-11 22:28:06.169273 |
description | A minimal and portable low-level x86 IO port handling library |
homepage | |
repository | https://github.com/andofwinds/portable/ |
max_upload_size | |
id | 1318187 |
size | 6,685 |
This crate is inspired by x86_64 and designed to be simple, lightweight and pretty to use.
Here is an example reading from 0x01
and writing 0x02
into it:
// At first, read from port
let foo_port = Port::new(0x01);
let data: u8 = foo_port.read();
// And write
foo_port.write(0x02_u8);
Please, take a note that this is a no_std
crate and can be used in something like osdev