()
| 42 | pub const UART_RX_IRQ_SOURCE: u32 = 10; |
| 43 | |
| 44 | impl 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected