Skip to content

[EPM-3469] Add ILI9488 TFT driver, GPIO monitor, UI dashboard, and LCD backlight on boot#63

Open
vmanchala-dev wants to merge 6 commits intocomcard_v2_cifrom
vj/test_lcd_touch_dts_ci
Open

[EPM-3469] Add ILI9488 TFT driver, GPIO monitor, UI dashboard, and LCD backlight on boot#63
vmanchala-dev wants to merge 6 commits intocomcard_v2_cifrom
vj/test_lcd_touch_dts_ci

Conversation

@vmanchala-dev
Copy link

@vmanchala-dev vmanchala-dev commented Feb 16, 2026

Summary

Adds the ILI9488 TFT display stack and turns on the LCD backlight at boot on device targets.

New modules

  • Ili9488.Driver (ili9488_driver.ex) – SPI/GPIO setup, reset, init, and drawing (fill, rectangles) for the ILI9488 (320×480, RGB666).
  • Ili9488.GPIOMonitor (ili9488_gpio_monitor.ex) – Monitors GPIO 71 every 500 ms and updates the on-screen indicator (green = high, grey = low).
  • Ili9488.UI (ili9488_ui.ex) – Draws the dashboard: blue background, textbox, "GPIO71" label, and GPIO indicator.
  • TestC2.LcdBacklight (lcd_backlight.ex) – Turns on the LCD backlight (GPIO 116) at application start; supervised on device targets only (not host).

Other changes

  • Application: TestC2.LcdBacklight added to target_children() so the backlight is on at boot on device.
  • Docs: docs/ILI9488_MODULES.md with module overview, API, how to run, and testing GPIO 71 toggle from the console.
  • README: Boot behavior (LCD backlight), ILI9488 section with link to full docs.

How to run (IEx)

{:ok, devs} = Ili9488.Driver.start()
Ili9488.UI.draw_dashboard(devs)
Ili9488.GPIOMonitor.start(devs)

Toggle GPIO 71 from console to see indicator change:

{:ok, g} = Circuits.GPIO.open(71, :output)
Circuits.GPIO.write(g, 1)  # green
Circuits.GPIO.write(g, 0)  # grey

Note

Medium Risk
Directly manipulates SPI/GPIO and adds a supervised boot-time hardware side effect (backlight), which could impact device startup or interfere with pin assignments if misconfigured.

Overview
Adds an initial ILI9488 TFT display stack: a new Ili9488.Driver for SPI/GPIO init + basic drawing, a simple Ili9488.UI dashboard (blue background, textbox, GPIO71 label + indicator), and an Ili9488.GPIOMonitor process that polls GPIO 71 every 500ms and updates the indicator on changes.

Enables the LCD backlight at device boot by adding a supervised TestC2.LcdBacklight GenServer (GPIO 116 driven high) to target_children() (targets only). Documentation is updated with boot/display behavior plus a new docs/ILI9488_MODULES.md usage guide.

Written by Cursor Bugbot for commit 74793a7. This will update automatically on new commits. Configure here.

@vmanchala-dev vmanchala-dev changed the title [Test] Disable spi-cpha and set d0 as out and d1 in [EPM-3469] WIP:Add ILI9488 TFT driver, GPIO monitor, UI dashboard, and LCD backlight on boot Feb 17, 2026
@vmanchala-dev vmanchala-dev changed the title [EPM-3469] WIP:Add ILI9488 TFT driver, GPIO monitor, UI dashboard, and LCD backlight on boot [EPM-3469] Add ILI9488 TFT driver, GPIO monitor, UI dashboard, and LCD backlight on boot Feb 18, 2026
@vmanchala-dev vmanchala-dev requested a review from vs-pp February 18, 2026 13:30
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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.

2 participants