5 releases (breaking)

0.5.0 Mar 10, 2025
0.4.0 Mar 11, 2024
0.3.0 Dec 9, 2023
0.2.0 Mar 20, 2023
0.1.0 Aug 29, 2021

#553 in Embedded development

Download history 31/week @ 2024-12-04 44/week @ 2024-12-11 15/week @ 2024-12-18 8/week @ 2024-12-25 37/week @ 2025-01-08 23/week @ 2025-01-15 25/week @ 2025-01-22 39/week @ 2025-01-29 50/week @ 2025-02-05 135/week @ 2025-02-12 137/week @ 2025-02-19 153/week @ 2025-02-26 1276/week @ 2025-03-05 506/week @ 2025-03-12 861/week @ 2025-03-19

2,829 downloads per month

MIT license

7KB
162 lines

NS16550A

crates.io doc github

NS16550A UART driver written in Rust.

Installation

Add the following to Cargo.toml:

ns16550a = "0.5"

Example

Example usage:

use ns16550a::*;

fn main() {
    let mut uart = Uart::new(0x1000_0000);
    uart.init(WordLength::EIGHT,
              StopBits::ONE,
              ParityBit::DISABLE,
              ParitySelect::EVEN,
              StickParity::DISABLE,
              Break::DISABLE,
              DMAMode::MODE0,
              Divisor::BAUD1200,
              );
    write!(&mut uart, "Hello, world!\n\r");
    loop {
        uart.put(uart.get().unwrap_or_default());
    }
}

lib.rs:

NS16550A UART driver.

No runtime deps