Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ idf_component_register(SRCS
"display_driver.c"
"5in65_acep_7c_display_driver.c"
"ili934x_display_driver.c"
"ili948x_display_driver.c"
"memory_display_driver.c"
"ssd1306_display_driver.c"
"st7789_display_driver.c"
Expand Down
2 changes: 2 additions & 0 deletions README.Md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ that would otherwise be impossible to support with traditional frame buffer appr
## Supported Hardware

* `ilitek,ili9341` / `ilitek,ili9342c`: ILI9341 / ILI9342C - 240x320, 16-bit colors
* `ilitek,ili9486`: ILI9486 - 320x480, 16-bit colors (RGB565)
* `ilitek,ili9488`: ILI9488 - 320x480, 18-bit colors (RGB666 over SPI; 3 bytes/pixel transfer)
* `waveshare,5in65-acep-7c`: Waveshare 7-color 5.65" ACeP display module - 600x480, 7 colors +
software dithering
* `sharp,memory-lcd`: Sharp Memory LCDs - 400x240, 1-bit monochrome
Expand Down
5 changes: 5 additions & 0 deletions display_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static const char *TAG = "display_driver";

Context *acep_5in65_7c_display_driver_create_port(GlobalContext *global, term opts);
Context *ili934x_display_create_port(GlobalContext *global, term opts);
Context *ili948x_display_create_port(GlobalContext *global, term opts);
Context *memory_lcd_display_create_port(GlobalContext *global, term opts);
Context *ssd1306_display_create_port(GlobalContext *global, term opts);
Context *st7789_display_create_port(GlobalContext *global, term opts);
Expand Down Expand Up @@ -60,6 +61,10 @@ Context *display_create_port(GlobalContext *global, term opts)
ctx = ili934x_display_create_port(global, opts);
} else if (!strcmp(compat_string, "ilitek,ili9342c")) {
ctx = ili934x_display_create_port(global, opts);
} else if (!strcmp(compat_string, "ilitek,ili9486")) {
ctx = ili948x_display_create_port(global, opts);
} else if (!strcmp(compat_string, "ilitek,ili9488")) {
ctx = ili948x_display_create_port(global, opts);
} else if (!strcmp(compat_string, "solomon-systech,ssd1306")) {
ctx = ssd1306_display_create_port(global, opts);
} else if (!strcmp(compat_string, "sino-wealth,sh1106")) {
Expand Down
40 changes: 40 additions & 0 deletions docs/display-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,46 @@ ili9341_opts = [
]
```

### ILI9486 / ILI9488 (ilitek,ili9486 / ilitek,ili9488)

320×480 TFT displays.

- **ILI9486**: RGB565 over SPI (16-bit color)
- **ILI9488**: RGB666 over SPI (18-bit color; transferred as 3 bytes/pixel). AtomGL renders in RGB565 and converts scanlines for transfer.

**Compatible strings:** `"ilitek,ili9486"` or `"ilitek,ili9488"`

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| `spi_host` | term | SPI host reference | Required |
| `width` | integer | Display width in pixels (kept for API consistency) | 320 |
| `height` | integer | Display height in pixels (kept for API consistency) | 480 |
| `cs` | integer | Chip select GPIO pin | Required |
| `dc` | integer | Data/Command GPIO pin | Required |
| `reset` | integer | Reset GPIO pin | Required |
| `rotation` | integer | Display rotation (0-3) | 0 |
| `enable_tft_invon` | boolean | Enable color inversion | false |
| `color_order` | atom | Color order (:bgr/:rgb) | :bgr |
| `backlight` | integer | Backlight GPIO pin | Optional |
| `backlight_active` | atom | Backlight active level (:low/:high) | Optional |
| `backlight_enabled` | boolean | Enable backlight on init | Optional |

**Example:**
```elixir
ili948x_opts = [
spi_host: spi_host,
compatible: "ilitek,ili9488",
width: 320,
height: 480,
cs: 22,
dc: 21,
reset: 18,
rotation: 1,
enable_tft_invon: false,
color_order: :bgr
]
```

### ST7789 / ST7796 (sitronix,st7789 / sitronix,st7796)

TFT displays with 16-bit colors.
Expand Down
Loading