Skip to content

Restructure display components to nested class/driver/resolution/product hierarchy#304

Open
tyeth wants to merge 10 commits intoadafruit:v2-mainfrom
tyeth:v2-displays
Open

Restructure display components to nested class/driver/resolution/product hierarchy#304
tyeth wants to merge 10 commits intoadafruit:v2-mainfrom
tyeth:v2-displays

Conversation

@tyeth
Copy link
Copy Markdown
Member

@tyeth tyeth commented Apr 2, 2026

Summary

  • Restructures display components from flat naming (eink-29-grayscale-ssd1680/) to a nested hierarchy (epd/ssd1680/296x128/mono/) aligned with Wippersnapper_Protobuf PR #170's unified display.proto
  • Adds all missing display classes: OLED, LED Backpack, and Character LCD — migrated from existing i2c_output/ definitions and the proto driver list
  • Updates schema.json to support free-form driver strings, new display classes, panel disambiguation, and I2C address arrays

Changes

Folder Convention: components/display/{class}/{driver}/{resolution}/{mode|panel}/

Class Drivers Components
epd UC8151D, ILI0373, SSD1680, SSD1683, UC8179, UC8253, MAGTAG 9 (inc. 2.13" SSD1680 pre2024/rev2024 panel variants)
tft ST7789 2
oled SSD1306, SSD1305, SSD1327, SH1106, SH1107 8
led_backpack HT16K33 2 (7-segment + quad alphanumeric)
char_lcd MCP23008, PCF8574 3 (16x2 + 20x4)

Total: 24 display components across 5 classes (was 9 EPD/TFT only)

Schema Updates

  • driver: enum → free-form string (bare uppercase, e.g. "SSD1680" not "epd_ssd1680")
  • type enum: added oled, led_backpack, char_lcd
  • New panel field for same-driver disambiguation
  • New i2c.addresses array (hex strings, matching i2c_output pattern)
  • New config blocks: displayConfig, ledBackpackConfig, charLcdConfig

I2C Output Parity

All existing i2c_output/ components have unified display/ equivalents. The old text size duplication (SZ_DEFAULT / SZ_LARGE per OLED) is collapsed — v2 proto handles text_size as a configurable property in DisplayProperties.

Panel Variants (SSD1680 2.13")

Two panels with identical driver/resolution/mode distinguished by purchase year:

  • epd/ssd1680/250x122/mono/pre2024/ — original panel (pre-2024)
  • epd/ssd1680/250x122/mono/rev2024/ — revised panel (2024+)

Test plan

  • Validate all 24 definition.json files against updated schema.json
  • Verify I2C addresses match existing i2c_output/ definitions
  • Confirm proto field mapping: displayType.typeDisplayClass, displayType.driverAdd.driver, displayType.panelAdd.panel
  • Review with Brent for alignment with Wippersnapper_Protobuf PR #170

🤖 Generated with Claude Code

tyeth and others added 6 commits October 21, 2025 13:52
…archy

Move display components from flat naming (e.g. eink-29-grayscale-ssd1680/)
to nested hierarchy: {class}/{driver}/{WxH}/{mode}/ aligned with
Wippersnapper_Protobuf PR adafruit#170 unified display.proto.

Folder convention: components/display/{class}/{driver}/{resolution}/{mode}/
- EPD: epd/{driver}/{WxH}/{mode}/ (e.g. epd/ssd1680/296x128/mono/)
- TFT: tft/{driver}/{WxH}/ (e.g. tft/st7789/240x135/)
- OLED: oled/{driver}/{WxH}/ (e.g. oled/ssd1306/128x64/)
- LED Backpack: led_backpack/{driver}/{panel}/ (e.g. led_backpack/ht16k33/4digit-7seg/)
- Char LCD: char_lcd/{driver}/{RxC}/ (e.g. char_lcd/mcp23008/16x2/)

Schema changes:
- driver field: enum -> free-form string (bare uppercase e.g. "SSD1680")
- type enum: added oled, led_backpack, char_lcd
- Added panel field for same-driver disambiguation
- Added i2c config with addresses array (hex strings)
- Added displayConfig, ledBackpackConfig, charLcdConfig blocks

New components (migrated from i2c_output + proto driver list):
- OLED: SSD1306 (128x64, 128x32, 64x32), SSD1305, SSD1327, SH1106, SH1107 (128x64, 128x128)
- LED Backpack: HT16K33 (7-segment, quad alphanumeric)
- Char LCD: MCP23008 (16x2, 20x4), PCF8574 (16x2)
- EPD: SSD1680 2.13" panel variants (pre2024, rev2024)

Total: 24 display components across 5 classes (was 9 EPD/TFT only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tyeth tyeth changed the base branch from main to v2-main April 2, 2026 18:12
@tyeth
Copy link
Copy Markdown
Member Author

tyeth commented Apr 2, 2026

This path system isn't quite correct. There is no product distinction possible for the 128x64 SSD1306 OLED and FeatherWing OLED 128x64.
We expect to have an entry for each product ID in the adafruit range, so two components in this case.

tyeth and others added 4 commits April 2, 2026 19:39
…ct entries

Each Adafruit product ID gets its own component entry. OLEDs now use
{class}/{driver}/{WxH}/{product-id}/ to distinguish products that share
the same driver and resolution.

Key fix: SSD1306 128x32 split into two entries:
- adafruit-4440 (breakout, addresses 0x3C/0x3D)
- adafruit-2900 (FeatherWing, address 0x3C only)

All OLEDs now have product-level subfolders:
- oled/ssd1306/128x64/adafruit-938/
- oled/ssd1306/128x32/adafruit-4440/
- oled/ssd1306/128x32/adafruit-2900/
- oled/ssd1306/64x32/generic-midas/
- oled/ssd1305/128x64/adafruit-2720/
- oled/sh1106/128x64/adafruit-5297/
- oled/sh1107/128x64/adafruit-4650/
- oled/sh1107/128x128/adafruit-5297/
- oled/ssd1327/128x128/adafruit-4741/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove i2c_output from validation matrix (superseded by display/)
- Change definition.json glob from */ to **/ to match nested display paths
- Remove i2c_output from filename validation regexes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add oldNames array to all display definitions that have v1 equivalents,
mapping old folder names from display/ (EPD/TFT) and i2c_output/
(OLED/LED backpack/char LCD) to the new nested structure.

OLED entries map to both text size variants (e.g. oled128x64default +
oled128x64large) since v2 handles text_size as a configurable property.

Schema updated with optional oldNames string array field.

5 new-only components correctly have no oldNames:
- char_lcd/pcf8574/16x2 (proto-only, no v1 product)
- epd/ssd1680/250x122/mono/pre2024 and rev2024 (new panel variants)
- oled/sh1106 and oled/ssd1305 (proto-only, no v1 i2c_output entry)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tyeth tyeth changed the title Restructure display components to nested class/driver/resolution hierarchy Restructure display components to nested class/driver/resolution/product hierarchy Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant