Crates.io | uart8250 |
lib.rs | uart8250 |
version | 0.6.0 |
source | src |
created_at | 2021-07-22 04:15:46.436132 |
updated_at | 2022-04-13 02:21:28.657886 |
description | This crate provide a struct with many methods to operate uart 8250. |
homepage | https://github.com/duskmoon314/uart-rs |
repository | https://github.com/duskmoon314/uart-rs |
max_upload_size | |
id | 425764 |
size | 36,853 |
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.
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();
}