Struct Screen

Source
pub struct Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: FullDuplex<u8, Error = ERR>, DC: OutputPin, CS: OutputPin, BUSY: InputPin, RST: OutputPin,
{ /* private fields */ }

Implementations§

Source§

impl<SPI, DC, CS, BUSY, RST, ERR> Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: FullDuplex<u8, Error = ERR>, DC: OutputPin, CS: OutputPin, BUSY: InputPin, RST: OutputPin,

Source

pub fn show_full_screen_image( &mut self, image: &[u8], ) -> Result<(), ScreenError<ERR>>

Source

pub fn load_partial_image( &mut self, x_start: u8, x_size: u8, y_start: u16, y_size: u16, image: &[u8], ) -> Result<(), ScreenError<ERR>>

x_start and x_size are in bytes. y_start and y_size are in pixels.

Source

pub fn load_full_update_lut(&mut self) -> Result<(), ERR>

Source

pub fn load_partial_update_lut(&mut self) -> Result<(), ERR>

Source

pub fn power_on(&mut self) -> Result<(), ERR>

Source

pub fn power_off(&mut self) -> Result<(), ERR>

Source

pub fn update_full(&mut self) -> Result<(), ERR>

Source

pub fn update_partial(&mut self) -> Result<(), ERR>

Source

pub fn load_image(&mut self, image: &[u8]) -> Result<(), ERR>

Source

pub fn set_display_area( &mut self, x_start: u8, x_end: u8, y_start: u16, y_end: u16, ) -> Result<(), ScreenError<ERR>>

x_start and x_end are in bytes. y_start and y_end are in pixels. x_start must be less then x_end and y_start less than y_end.

Source

pub fn write_cmd(&mut self, cmd: Command) -> Result<(), ERR>

Source

pub fn write_data(&mut self, data: u8) -> Result<(), ERR>

Source

pub fn write_cmd_string(&mut self, cmd: Command, data: &[u8]) -> Result<(), ERR>

Auto Trait Implementations§

§

impl<SPI, DC, CS, BUSY, RST, ERR> Freeze for Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: Freeze, DC: Freeze, CS: Freeze, BUSY: Freeze, RST: Freeze,

§

impl<SPI, DC, CS, BUSY, RST, ERR> RefUnwindSafe for Screen<SPI, DC, CS, BUSY, RST, ERR>

§

impl<SPI, DC, CS, BUSY, RST, ERR> Send for Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: Send, DC: Send, CS: Send, BUSY: Send, RST: Send,

§

impl<SPI, DC, CS, BUSY, RST, ERR> Sync for Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: Sync, DC: Sync, CS: Sync, BUSY: Sync, RST: Sync,

§

impl<SPI, DC, CS, BUSY, RST, ERR> Unpin for Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: Unpin, DC: Unpin, CS: Unpin, BUSY: Unpin, RST: Unpin,

§

impl<SPI, DC, CS, BUSY, RST, ERR> UnwindSafe for Screen<SPI, DC, CS, BUSY, RST, ERR>
where SPI: UnwindSafe, DC: UnwindSafe, CS: UnwindSafe, BUSY: UnwindSafe, RST: UnwindSafe,

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>,

Source§

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>,

Source§

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.