luma.lcd icon indicating copy to clipboard operation
luma.lcd copied to clipboard

Added support for AiP31068 and PCA9633

Open CutterXYZ opened this issue 1 month ago • 1 comments

Support for AiP31068. This is a standard I2C controller for HD44780 LCD displays that includes its own fonts.

Spec sheet: https://www.orientdisplay.com/wp-content/uploads/2022/08/AIP31068L.pdf

Slightly adapted the HD44780 class to accept a custom backlight driver in order to support the PCA9633 backlight driver.

This has been tested with the Waveshare LCD1602 display: https://www.waveshare.com/wiki/LCD1602_RGB_Module

CutterXYZ avatar Dec 07 '25 23:12 CutterXYZ

Summary of Changes

Hello @CutterXYZ, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the hardware compatibility of the LCD display library by introducing support for the AiP31068 controller and its associated font sets. It also refactors the backlight management system to be more modular, allowing for custom backlight drivers such as the PCA9633. These changes enhance the library's versatility and improve the initial display state for supported devices.

Highlights

  • New LCD Controller Support: Added comprehensive support for the AiP31068 LCD controller, including its specific font metrics and character mappings for European Russian (AiP-002), Western European (AiP-003), and French, Polish, and Silesian accented characters (901).
  • Custom Backlight Driver Integration: The hd44780 class has been adapted to accept a custom backlight driver, enabling support for devices like the PCA9633, which was specifically tested with the Waveshare LCD1602 display.
  • Enhanced Backlight Control: The backlit_device class now allows for a custom backlight object to be passed directly, providing greater flexibility in managing display backlights. The default cleanup behavior for backlights has also been adjusted to turn off unless explicitly configured to persist.
  • Display Initialization Improvement: The hd44780 display initialization routine now includes an explicit command to clear the display, ensuring a clean state upon startup.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot] avatar Dec 07 '25 23:12 gemini-code-assist[bot]

Checks should pass now with https://github.com/rm-hull/luma.core/pull/294 merged.

CutterXYZ avatar Dec 15 '25 16:12 CutterXYZ

I'll prepare a new release of luma.core with the changes later today, and will re-run the github actions

rm-hull avatar Dec 16 '25 13:12 rm-hull