[][src]Trait riscv_emu_rust::terminal::Terminal

pub trait Terminal {
    fn put_byte(&mut self, value: u8);
fn get_output(&mut self) -> u8;
fn put_input(&mut self, data: u8);
fn get_input(&mut self) -> u8; }

Emulates terminal. It holds input/output data in buffer transferred to/from Emulator.

Required methods

fn put_byte(&mut self, value: u8)

Puts an output ascii byte data to output buffer. The data is expected to be read by user program via get_output() and be displayed to user.

fn get_output(&mut self) -> u8

Gets an output ascii byte data from output buffer. This method returns zero if the buffer is empty.

fn put_input(&mut self, data: u8)

Puts an input ascii byte data to input buffer. The data is expected to be read by Emulator via get_input() and be handled.

fn get_input(&mut self) -> u8

Gets an input ascii byte data from input buffer. Used by Emulator.

Loading content...

Implementors

impl Terminal for DefaultTerminal[src]

Loading content...