[−][src]Struct st7735_lcd::ST7735
ST7735 driver to connect to TFT displays.
Implementations
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,
width: u32,
height: u32
) -> Self
[src]
spi: SPI,
dc: DC,
rst: RST,
rgb: bool,
inverted: bool,
width: u32,
height: u32
) -> Self
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<DELAY>(&mut self, delay: &mut DELAY) -> Result<(), ()> where
DELAY: DelayMs<u8>,
[src]
DELAY: DelayMs<u8>,
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 write_pixels_buffered<P: IntoIterator<Item = u16>>(
&mut self,
colors: P
) -> Result<(), ()>
[src]
&mut self,
colors: P
) -> Result<(), ()>
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
pub fn set_pixels_buffered<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<(), ()>
Trait Implementations
impl<SPI, DC, RST> DrawTarget<Rgb565> for ST7735<SPI, DC, RST> where
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
[src]
SPI: Write<u8>,
DC: OutputPin,
RST: OutputPin,
type Error = ()
Error type to return when a drawing operation fails. Read more
fn draw_pixel(&mut self, pixel: Pixel<Rgb565>) -> Result<(), Self::Error>
[src]
fn draw_rectangle(
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<Rgb565>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<Rgb565>>
) -> Result<(), Self::Error>
fn draw_image<'a, 'b, I>(
&mut self,
item: &'a Image<'b, I, Rgb565>
) -> Result<(), Self::Error> where
&'b I: IntoPixelIter<Rgb565>,
I: ImageDimensions,
[src]
&mut self,
item: &'a Image<'b, I, Rgb565>
) -> Result<(), Self::Error> where
&'b I: IntoPixelIter<Rgb565>,
I: ImageDimensions,
fn size(&self) -> Size
[src]
fn draw_iter<T>(&mut self, item: T) -> Result<(), Self::Error> where
T: IntoIterator<Item = Pixel<C>>,
[src]
T: IntoIterator<Item = Pixel<C>>,
fn clear(&mut self, color: C) -> Result<(), Self::Error>
[src]
fn draw_line(
&mut self,
item: &Styled<Line, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Line, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
fn draw_triangle(
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
fn draw_circle(
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
[src]
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
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>,