memory-lcd-spi

Crates.iomemory-lcd-spi
lib.rsmemory-lcd-spi
version0.0.7
sourcesrc
created_at2023-06-02 16:39:59.872981
updated_at2024-01-30 18:39:24.426576
descriptionA driver for Sharp's Memory LCD or JDI's Memory In Pixel display, LPM013M126A, LPM009M360A, LS027B7DH01, etc.
homepagehttps://github.com/andelf/memory-lcd-spi
repositoryhttps://github.com/andelf/memory-lcd-spi
max_upload_size
id881030
size33,253
Andelf (andelf)

documentation

https://docs.rs/memory-lcd-spi

README

memory-lcd-spi

embedded-hal driver for Sharp's Memory LCD and JDI's Memory In Pixel displays.

crates.io Docs

Features

  • Rotation support
  • 8-color mode with Rgb111 color
  • black/white mode for fast update

Tested

  • JDI's LPM013M126A or LPM013M126C, 176x176 1.3inch
  • JDI's LPM009M360A, 72x144 0.9inch
  • Sharp's LS006B7DH01, 64x64 0.56inch
  • Sharp's LS013B7DH03, 128x128 1.28inch
  • Sharp's LS027B7DH01, 400x240 2.7inch
  • ...

Usage

let mut display: MemoryLCD<LPM009M360A<BinaryColor>, _, _> = MemoryLCD::new(spi, cs);

display.set_rotation(memory_lcd_spi::framebuffer::Rotation::Deg90);
display.clear(BinaryColor::Off);

// drawing code with embedded-graphics
Line::new(
    Point::new(0, 0),
    Point::new(20, 20),
)
.into_styled(PrimitiveStyle::with_stroke(BinaryColor::On, 1))
.draw(&mut *display) // Yes, explicit deref is required
.unwrap();

display.update(&mut delay);

Or Rgb111 mode:

let mut display: MemoryLCD<LPM013M126A<Rgb111>, _, _> = MemoryLCD::new(spi, cs);
display.clear(Rgb111::BLACK);

Note

DISP pin is not managed by this driver. You should control it by yourself.

EXTCOMIN in is not managed by this driver. Follow the datasheet, use either 60Hz PWM or GND.

Commit count: 17

cargo fmt