MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / new

Method new

crates/virtual-machine/src/devices/uart.rs:44–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42pub const UART_RX_IRQ_SOURCE: u32 = 10;
43
44impl Uart {
45 pub fn new() -> Self {
46 Self {
47 ier: 0,
48 iir: 0x01, // no interrupts pending
49 fcr: 0,
50 lcr: 0,
51 mcr: 0,
52 lsr: 0x60, // TX empty & TX holding empty
53 msr: 0,
54 scr: 0,
55 rx_buf: std::collections::VecDeque::new(),
56 tx_out: Vec::new(),
57 }
58 }
59
60 pub fn receive(&mut self, byte: u8) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected