Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Mmio

Struct Mmio 

Source
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

Source§

fn status(&mut self) -> u32

The status register.
Source§

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 deselect(&mut self)

Release /CS.
Source§

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)

Pop stale bytes from the receive FIFO.
Source§

fn transmit(&mut self, byte: u8)

Start shifting one byte out.
Source§

fn receive(&mut self) -> u8

Pop one received byte.
Source§

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)

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)

Raise the timer interrupt in cycles CPU cycles, once, replacing any deadline already armed.
Source§

fn cancel_deadline(&mut self)

Disarm the deadline.
Source§

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.

Auto Trait Implementations§

§

impl Freeze for Mmio

§

impl RefUnwindSafe for Mmio

§

impl Send for Mmio

§

impl Sync for Mmio

§

impl Unpin for Mmio

§

impl UnsafeUnpin for Mmio

§

impl UnwindSafe for Mmio

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.