10 releases (5 breaking)
0.6.0 | Apr 13, 2022 |
---|---|
0.5.0 | Aug 14, 2021 |
0.4.2 | Aug 4, 2021 |
0.3.2 | Jul 30, 2021 |
0.1.0 | Jul 22, 2021 |
#1384 in Embedded development
29 downloads per month
35KB
447 lines
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();
}
Dependencies
~135KB