[][src]Trait kernel::hil::text_screen::TextScreen

pub trait TextScreen<'a> {
    pub fn set_client(&self, client: Option<&'a dyn TextScreenClient>);
pub fn get_size(&self) -> (usize, usize);
pub fn print(&self, buffer: &'static mut [u8], len: usize) -> ReturnCode;
pub fn set_cursor(&self, x_position: usize, y_position: usize) -> ReturnCode;
pub fn hide_cursor(&self) -> ReturnCode;
pub fn show_cursor(&self) -> ReturnCode;
pub fn blink_cursor_on(&self) -> ReturnCode;
pub fn blink_cursor_off(&self) -> ReturnCode;
pub fn display_on(&self) -> ReturnCode;
pub fn display_off(&self) -> ReturnCode;
pub fn clear(&self) -> ReturnCode; }

Required methods

pub fn set_client(&self, client: Option<&'a dyn TextScreenClient>)[src]

pub fn get_size(&self) -> (usize, usize)[src]

Returns a tuple (width, height) with the resolution of the screen that is being used. This function is synchronous as the resolution is known by the driver at any moment.

The resolution is constant.

pub fn print(&self, buffer: &'static mut [u8], len: usize) -> ReturnCode[src]

Sends a write command to the driver, and the buffer to write from and the len are sent as arguments. When the write operation is finished, the driver will call the write_complete() callback.

Return values:

  • SUCCESS: The write command is valid and will be sent to the driver.
  • EBUSY: The driver is busy with another command.

pub fn set_cursor(&self, x_position: usize, y_position: usize) -> ReturnCode[src]

Sends to the driver a command to set the cursor at a given position (x_position, y_position). When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

pub fn hide_cursor(&self) -> ReturnCode[src]

Sends to the driver a command to hide the cursor. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

pub fn show_cursor(&self) -> ReturnCode[src]

Sends to the driver a command to show the cursor. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

Sends to the driver a command to turn on the blinking cursor. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

Sends to the driver a command to turn off the blinking cursor. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

pub fn display_on(&self) -> ReturnCode[src]

Sends to the driver a command to turn on the display of the screen. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

pub fn display_off(&self) -> ReturnCode[src]

Sends to the driver a command to turn off the display of the screen. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.

pub fn clear(&self) -> ReturnCode[src]

Sends to the driver a command to clear the display of the screen. When finished, the driver will call the command_complete() callback.

Return values:

  • SUCCESS: The command is valid and will be sent to the driver.
  • EBUSY: Another command is in progress.
Loading content...

Implementors

Loading content...