Struct capsules_extra::hd44780::HD44780

source ·
pub struct HD44780<'a, A: Alarm<'a>> { /* private fields */ }

Implementations§

source§

impl<'a, A: Alarm<'a>> HD44780<'a, A>

source

pub fn new( rs_pin: &'a dyn Pin, en_pin: &'a dyn Pin, data_4_pin: &'a dyn Pin, data_5_pin: &'a dyn Pin, data_6_pin: &'a dyn Pin, data_7_pin: &'a dyn Pin, row_offsets: &'static mut [u8], alarm: &'a A, width: u8, height: u8, ) -> HD44780<'a, A>

source

pub fn screen_command( &self, command: usize, op: usize, value: u8, ) -> Result<(), ErrorCode>

Trait Implementations§

source§

impl<'a, A: Alarm<'a>> AlarmClient for HD44780<'a, A>

source§

fn alarm(&self)

alarm() is called after each alarm finished, and depending on the current state of the program, the next step in being decided.

source§

impl<'a, A: Alarm<'a>> TextScreen<'a> for HD44780<'a, A>

source§

fn get_size(&self) -> (usize, usize)

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. Read more
source§

fn print( &self, buffer: &'static mut [u8], len: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>

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. Read more
source§

fn set_cursor( &self, x_position: usize, y_position: usize, ) -> Result<(), ErrorCode>

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. Read more
source§

fn hide_cursor(&self) -> Result<(), ErrorCode>

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

fn show_cursor(&self) -> Result<(), ErrorCode>

Sends to the driver a command to show the cursor. When finished, the driver will call the command_complete() callback. Read more
Sends to the driver a command to turn on the blinking cursor. When finished, the driver will call the command_complete() callback. Read more
Sends to the driver a command to turn off the blinking cursor. When finished, the driver will call the command_complete() callback. Read more
source§

fn display_on(&self) -> Result<(), ErrorCode>

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

fn display_off(&self) -> Result<(), ErrorCode>

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

fn clear(&self) -> Result<(), ErrorCode>

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

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

Auto Trait Implementations§

§

impl<'a, A> !Freeze for HD44780<'a, A>

§

impl<'a, A> !RefUnwindSafe for HD44780<'a, A>

§

impl<'a, A> !Send for HD44780<'a, A>

§

impl<'a, A> !Sync for HD44780<'a, A>

§

impl<'a, A> Unpin for HD44780<'a, A>

§

impl<'a, A> !UnwindSafe for HD44780<'a, A>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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.
source§

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

Performs the conversion.