Skip to content

Added driver and setup-example for ST7567s displays #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2023

Conversation

EnricoRoss98
Copy link

This driver allows the use of the nano-gui library on displays driven by ST7567s IC. Those have usually a resolution of 128x64 and are monochrome backlight LCD displays. Due to the similarities, these displays are basically drop-in replacements (except for changing the driver) for the famous SSD1306 IIC 128x64 OLED display, allowing a fast transition from 0.96" to 2.14" and from OLED to LCD.

Copy link
Owner

@peterhinch peterhinch left a comment

Choose a reason for hiding this comment

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

This looks good, but please prepend constant names with an underscore:

_CMD_DISPLAY_ON          = const(0xAF)

This saves RAM at zero cost.

This is because Python creates a memory variable for globals unless they start with underscore. This caters for the case where someone issues from module import *.

Copy link
Owner

@peterhinch peterhinch left a comment

Choose a reason for hiding this comment

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

Thank you.

@peterhinch peterhinch merged commit 21a0d0d into peterhinch:master Sep 2, 2023
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