[−][src]Struct st7735_lcd::ST7735
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]
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
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]
DELAY: DelayMs<u8>,
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]
&mut self,
colors: P
) -> Result<(), ()>
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]
&mut self,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
colors: P
) -> Result<(), ()>
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]
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
fn draw<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<Rgb565>>,
[src]
T: IntoIterator<Item = Pixel<Rgb565>>,
impl<SPI, DC, RST> SizedDrawing<Rgb565> for ST7735<SPI, DC, RST> where
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
[src]
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
fn draw_sized<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<Rgb565>> + Dimensions,
[src]
T: IntoIterator<Item = Pixel<Rgb565>> + Dimensions,
Auto Trait Implementations
impl<SPI, DC, RST> Send for ST7735<SPI, DC, RST> where
DC: Send,
RST: Send,
SPI: Send,
DC: Send,
RST: Send,
SPI: Send,
impl<SPI, DC, RST> Sync for ST7735<SPI, DC, RST> where
DC: Sync,
RST: Sync,
SPI: Sync,
DC: Sync,
RST: Sync,
SPI: Sync,
impl<SPI, DC, RST> Unpin for ST7735<SPI, DC, RST> where
DC: Unpin,
RST: Unpin,
SPI: Unpin,
DC: Unpin,
RST: Unpin,
SPI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,