Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andelf/memory-lcd-spi

embedded-hal driver for JDI's Memory In Pixel display or Sharp's Memory LCD: LPM013M126A, LPM009M360A
https://github.com/andelf/memory-lcd-spi

Last synced: about 1 month ago
JSON representation

embedded-hal driver for JDI's Memory In Pixel display or Sharp's Memory LCD: LPM013M126A, LPM009M360A

Awesome Lists containing this project

README

        

# memory-lcd-spi

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

[![crates.io](https://img.shields.io/crates/v/memory-lcd-spi.svg)](https://crates.io/crates/memory-lcd-spi)
[![Docs](https://docs.rs/memory-lcd-spi/badge.svg)](https://docs.rs/memory-lcd-spi)

## Features

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

## Tested

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

## Usage

```rust
let mut display: MemoryLCD, _, _> = 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:

```rust
let mut display: MemoryLCD, _, _> = 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.