[][src]Struct st7735_lcd::ST7735

pub struct ST7735<SPI, DC, RST> where
    SPI: Write<u8>,
    DC: OutputPin,
    RST: OutputPin
{ /* fields omitted */ }

ST7735 driver to connect to TFT displays.

Methods

impl<SPI, DC, RST> ST7735<SPI, DC, RST> where
    SPI: Write<u8>,
    DC: OutputPin,
    RST: OutputPin
[src]

pub fn new(spi: SPI, dc: DC, rst: RST, rgb: bool, inverted: bool) -> Self[src]

Creates a new driver instance that uses hardware SPI.

pub fn init<DELAY>(&mut self, delay: &mut DELAY) -> Result<(), ()> where
    DELAY: DelayMs<u8>, 
[src]

Runs commands to initialize the display.

pub fn hard_reset(&mut self) -> Result<(), ()>[src]

pub fn set_orientation(&mut self, orientation: &Orientation) -> Result<(), ()>[src]

pub fn set_offset(&mut self, dx: u16, dy: u16)[src]

Sets the global offset of the displayed image

pub fn set_pixel(&mut self, x: u16, y: u16, color: u16) -> Result<(), ()>[src]

Sets a pixel color at the given coords.

pub fn write_pixels<P: IntoIterator<Item = u16>>(
    &mut self,
    colors: P
) -> Result<(), ()>
[src]

Writes pixel colors sequentially into the current drawing window

pub fn set_pixels<P: IntoIterator<Item = u16>>(
    &mut self,
    sx: u16,
    sy: u16,
    ex: u16,
    ey: u16,
    colors: P
) -> Result<(), ()>
[src]

Sets pixel colors at the given drawing window

Trait Implementations

impl<SPI, DC, RST> Drawing<Rgb565> for ST7735<SPI, DC, RST> where
    SPI: Write<u8>,
    DC: OutputPin,
    RST: OutputPin
[src]

impl<SPI, DC, RST> SizedDrawing<Rgb565> for ST7735<SPI, DC, RST> where
    SPI: Write<u8>,
    DC: OutputPin,
    RST: OutputPin
[src]

Auto Trait Implementations

impl<SPI, DC, RST> Send for ST7735<SPI, DC, RST> where
    DC: Send,
    RST: Send,
    SPI: Send

impl<SPI, DC, RST> Sync for ST7735<SPI, DC, RST> where
    DC: Sync,
    RST: Sync,
    SPI: Sync

impl<SPI, DC, RST> Unpin for ST7735<SPI, DC, RST> where
    DC: Unpin,
    RST: Unpin,
    SPI: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.