ST7735 Display Driver
This crate provides an async driver for the ST7735 display controller, implementing the Panel trait to be used with the display-driver crate.

Usage
This driver is designed to work with the display-driver crate. You can use the DisplayDriver struct to drive the display.
1. Choose a Spec
The ST7735 has many variations (often distinguished by "Tab" colors in other libraries). This crate provides Generic types that map to these common variations.
2. Implementation Example
use ;
// The `Spec` (Generic128x160Type1) defines the hardware-specific constants (Gamma, Voltage).
use ;
// 1. Configure Reset
let reset_opt = new_pin;
// 2. Create the Panel instance using a Generic Spec (e.g., Generic128x160Type1)
let panel = new;
// 3. Bind Bus and Panel, Configure, and Initialize
// The driver orchestrates the logic, delegating transport to 'bus' and commands to 'panel'.
let mut display = builder
.with_color_format
// This framework automatically handles offsets.
.with_orientation
.init.await.unwrap;
// Now you can use `display` to draw:
display.write_frame.await.unwrap;
Full examples can be found at examples
Specs
Because ST7735 panels come in various resolutions, offsets, and color formats, we use a Spec trait.
- Generic Specs: Pre-defined configurations for common panel variations (found in
spec::generic). - Vendor Specs: Specific implementations for known physical display modules (found in
spec::vendor_specs).
You can also define your own Spec by implementing the St7735Spec trait if your panel has unique requirements.
Mapping Table
The following table maps the provided Generic types to common names used in the Adafruit and TFT_eSPI libraries, as well as specific vendor implementations present in this crate.
| Generic Type | Adafruit Name | TFT_eSPI Name | Vendor Specs |
|---|---|---|---|
Generic128x160Type1 |
RedTab | RedTab | - |
Generic128x160Type2 |
BLACKTAB | BLACKTAB | - |
Generic128x160Type3 |
GREENTAB | GREENTAB | CL177SPI (1.77") |
Generic128x160Type4 |
- | GREENTAB2 | - |
Generic128x160Type5 |
- | GREENTAB3 | - |
Generic80x160Type1 |
MINI160x80 | - | - |
Generic80x160Type2 |
- | REDTAB160x80 | - |
Generic80x160Type3 |
MINI160x80PLUGIN | GREENTAB160x80 | XX096T_IF09 (0.96") |
Generic128x128Type1 |
144GREENTAB / HALLOWING | - | - |
Generic128x128Type2 |
- | GREENTAB128 | P144H008_V2 (1.44") |
Implementing a Custom Spec
If the built-in Generic or Vendor specs don't match your display (e.g., incorrect offsets, colors inverted, different Gamma curve), you can define your own.
[!TIP] You can use the
impl_st7735_initr!macro to use standard "InitR" values (common parameters from Adafruit_ST7735) for the complex registers.
use ;
// 1. Define your type
;
// 2. Configure Resolution & Offsets
// 3. Implement St7735Spec
// Option A: Use default "InitR" sequence (Easiest)
impl_st7735_initr!;
// Option B: manual implementation (Advanced)
// Include Gamma, Power, Frame Rate etc.
// impl St7735Spec for MyCustomPanel {
// ... define const FRMCTR1_PARAMS, etc.
// }
License
This project is under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).