pub struct Mmio { /* private fields */ }Expand description
The serial port and root counter 0, through the SDK’s register steps.
Trait Implementations§
Source§impl Hw for Mmio
impl Hw for Mmio
Source§fn select(&mut self, port: Port, ack_irq: bool)
fn select(&mut self, port: Port, ack_irq: bool)
Configure 250 kHz 8N1, clear a stale latched IRQ, and assert
/CS on
port with the /ACK interrupt armed when ack_irq.Source§fn reset_uart(&mut self)
fn reset_uart(&mut self)
Reset the UART, so a reply still in flight from an abandoned packet
cannot be taken for the next one’s.
Source§fn drain_receive(&mut self)
fn drain_receive(&mut self)
Pop stale bytes from the receive FIFO.
Source§fn wait_ack_release(&mut self) -> bool
fn wait_ack_release(&mut self) -> bool
Wait, a few microseconds at most, for a pulse of
/ACK already seen to
end. false when the line stays asserted.Source§fn clear_ack_latch(&mut self, port: Option<Port>, ack_irq: bool)
fn clear_ack_latch(&mut self, port: Option<Port>, ack_irq: bool)
Clear the latched
/ACK IRQ so the next pulse raises IRQ7 again,
leaving /CS asserted on port, or released when None.Source§fn arm_deadline(&mut self, cycles: u32)
fn arm_deadline(&mut self, cycles: u32)
Raise the timer interrupt in
cycles CPU cycles, once, replacing any
deadline already armed.Source§fn cancel_deadline(&mut self)
fn cancel_deadline(&mut self)
Disarm the deadline.
Source§fn deadline_expired(&mut self) -> bool
fn deadline_expired(&mut self) -> bool
Whether the armed deadline has been reached. An interrupt left over from
a deadline that was cancelled or replaced answers
false.