[][src]Struct riscv_emu_rust::device::uart::Uart

pub struct Uart { /* fields omitted */ }

Emulates UART. Refer to the specification for the detail.

Implementations

impl Uart[src]

pub fn new(terminal: Box<dyn Terminal>) -> Self[src]

Creates a new Uart. Input/Output data is transferred via Terminal.

pub fn tick(&mut self)[src]

Runs one cycle. Uart gets/puts input/output data via Terminal at certain timing.

pub fn is_interrupting(&mut self) -> bool[src]

Indicates whether Uart raises an interrupt signal

pub fn load(&mut self, address: u64) -> u8[src]

Loads register content

Arguments

  • address

pub fn store(&mut self, address: u64, value: u8)[src]

Stores register content

Arguments

  • address
  • value

pub fn get_mut_terminal(&mut self) -> &mut Box<dyn Terminal>[src]

Returns mutable reference to Terminal.

Auto Trait Implementations

impl !RefUnwindSafe for Uart

impl !Send for Uart

impl !Sync for Uart

impl Unpin for Uart

impl !UnwindSafe for Uart

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.