uart8250

Crates.iouart8250
lib.rsuart8250
version0.6.0
sourcesrc
created_at2021-07-22 04:15:46.436132
updated_at2022-04-13 02:21:28.657886
descriptionThis crate provide a struct with many methods to operate uart 8250.
homepagehttps://github.com/duskmoon314/uart-rs
repositoryhttps://github.com/duskmoon314/uart-rs
max_upload_size
id425764
size36,853
Campbell He (duskmoon314)

documentation

README

uart8250

This crate provide a struct with many methods to operate uart 8250.

REF: Serial Programming/8250 UART Programming

Noticed: This crate may have problems. Any help would be welcomed, even if your help will bring about breaking change. Please feel free to start an Issue or a PR.

Currently I cannot guarantee the stability of this crate, and it is likely to introduce destructive updates (including but not limited to renaming of structs, renaming of functions and methods, code restructuring). So fixing the dependency version should be a good way to go.

Besides, this crate currently is not following Rust API Guidelines. Please feel free to start an Issue or a PR to help me fix this.

Usage

let uart = MmioUart8250::new(0x1000_0000);
uart.init(11_059_200, 115200);
if let Some(c) = uart.read_byte() {
    //...
}

If you turn on feature fmt

let uart = MmioUart8250::new(0x1000_0000);
uart.init(11_059_200, 115200);

pub fn print_uart(args: fmt::Arguments) {
    uart.write_fmt(args).unwrap();
}
Commit count: 34

cargo fmt