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>
impl<'a, A: Alarm<'a>> HD44780<'a, A>
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>
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>
impl<'a, A: Alarm<'a>> AlarmClient for HD44780<'a, A>
source§impl<'a, A: Alarm<'a>> TextScreen<'a> for HD44780<'a, A>
impl<'a, A: Alarm<'a>> TextScreen<'a> for HD44780<'a, A>
source§fn get_size(&self) -> (usize, usize)
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])>
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 moresource§fn set_cursor(
&self,
x_position: usize,
y_position: usize,
) -> Result<(), ErrorCode>
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 moresource§fn hide_cursor(&self) -> Result<(), ErrorCode>
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 moresource§fn show_cursor(&self) -> Result<(), ErrorCode>
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 moresource§fn blink_cursor_on(&self) -> Result<(), ErrorCode>
fn blink_cursor_on(&self) -> Result<(), ErrorCode>
Sends to the driver a command to turn on the blinking cursor. When finished,
the driver will call the
command_complete()
callback. Read moresource§fn blink_cursor_off(&self) -> Result<(), ErrorCode>
fn blink_cursor_off(&self) -> Result<(), ErrorCode>
Sends to the driver a command to turn off the blinking cursor. When finished,
the driver will call the
command_complete()
callback. Read moresource§fn display_on(&self) -> Result<(), ErrorCode>
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 moresource§fn display_off(&self) -> Result<(), ErrorCode>
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 moresource§fn clear(&self) -> Result<(), ErrorCode>
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 morefn 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more