[−][src]Struct st7032i::ST7032i
Driver for the ST7032i
Methods
impl<I2C, E, D> ST7032i<I2C, D> where
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
D: DelayMs<u8>,
[src]
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
D: DelayMs<u8>,
pub fn new(i2c: I2C, delay: D, lines: u8) -> Self
[src]
Initialize the ST7032i driver.
pub fn init(&mut self) -> Result<(), E>
[src]
Initialize the display.
pub fn on(&mut self) -> Result<(), E>
[src]
Switch display on
pub fn off(&mut self) -> Result<(), E>
[src]
Switch display off
pub fn clear(&mut self) -> Result<(), E>
[src]
Clear all the display data by writing "20H" (space code) to all DDRAM address, and set DDRAM address to "00H" into AC (address counter).
pub fn home(&mut self) -> Result<(), E>
[src]
Set DDRAM address to "0" and return cursor to its original position if shifted. The contents of DDRAM are not changed.
pub fn move_cursor(&mut self, row: u8, col: u8) -> Result<(), E>
[src]
Move cursor to specified location
pub fn show_cursor(&mut self, blink: bool) -> Result<(), E>
[src]
Show cursor
pub fn hide_cursor(&mut self) -> Result<(), E>
[src]
Hide cursor
pub fn enable_scroll(&mut self, entry: Direction) -> Result<(), E>
[src]
Enable autoscroll
pub fn disable_scroll(&mut self) -> Result<(), E>
[src]
Disable autoscroll
pub fn shift_display(&mut self, dir: Direction) -> Result<(), E>
[src]
Shift display to specified direction
pub fn shift_cursor(&mut self, dir: Direction) -> Result<(), E>
[src]
Shift cursor to specified direction
pub fn create_char(&mut self, offset: u8, bitmap: [u8; 8]) -> Result<(), E>
[src]
Create custom character in CGRAM
Trait Implementations
impl<I2C: Debug, D: Debug> Debug for ST7032i<I2C, D>
[src]
impl<I2C, E, D> Write for ST7032i<I2C, D> where
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
D: DelayMs<u8>,
[src]
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
D: DelayMs<u8>,
Auto Trait Implementations
impl<I2C, D> Unpin for ST7032i<I2C, D> where
D: Unpin,
I2C: Unpin,
D: Unpin,
I2C: Unpin,
impl<I2C, D> Send for ST7032i<I2C, D> where
D: Send,
I2C: Send,
D: Send,
I2C: Send,
impl<I2C, D> Sync for ST7032i<I2C, D> where
D: Sync,
I2C: Sync,
D: Sync,
I2C: Sync,
impl<I2C, D> UnwindSafe for ST7032i<I2C, D> where
D: UnwindSafe,
I2C: UnwindSafe,
D: UnwindSafe,
I2C: UnwindSafe,
impl<I2C, D> RefUnwindSafe for ST7032i<I2C, D> where
D: RefUnwindSafe,
I2C: RefUnwindSafe,
D: RefUnwindSafe,
I2C: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,