rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | //! The Arm PL011 UART: QEMU virt's serial port, and the Pi 3's "UART0"
//! (which the Pi wires to Bluetooth by default; the mini-UART is the other
//! one). QEMU needs no setup at all; on real hardware the firmware has set
//! the baud rate, so `init` only makes sure it's on, 8 bits, FIFOs on.
use Uart;
use cratemmio;
use ;
const DR: usize = 0x00; // data register
const FR: usize = 0x18; // flags
const FR_TXFF: u32 = 1 << 5; // transmit FIFO full
const LCRH: usize = 0x2c; // line control
const CR: usize = 0x30; // control
|