Skip to content
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

Move new SSD1680 driver variant to dedicated module and update examples #86

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

joxl
Copy link

@joxl joxl commented Dec 4, 2024

This PR refactors @mikeysklar's recent driver addition into a dedicated module, updates the examples and adds a new example which I used while testing the new driver.

I moved the driver into its own module and named it "B" (instead of "Z") to maintain consistency with all the other drivers. While trying to locate datasheet details for the new device, I was initially confused by the "SSD1680Z" name because (as I eventually came to realize) the "Z" suffix refers to one of the die packaging options for the SSD1680, rather than a unique die. I decided to rename the Adafruit driver class to "SSD1680B", which (I think) follows the same convention used for a second variant of the SSD1675 driver. To maintain backwards compatibility (prevent breaking changes), the Adafruit_SSD1680Z name can still be imported from the adafruit_epd.ssd1680 module.

In addition to the class name change, there were a few other minor adjustments made during the refactor, including:

  • maintain type hints
  • clean up unnecessary pylint: disable directives
  • add the "Read RAM Option" command (from the datasheet, for completeness)
  • fix the NOP command (wrong hex value, also for completeness as the NOP isn't currently used in this driver)

I also updated the example scripts that follow the "import lots of drivers with usage comments for each" convention, and also added my own (new) example script (with accompanying "grid" bitmap image) which I found useful during driver testing -- the grid image makes it easier to detect if any rows of pixels are missing or offset.

I'm also preparing another PR for the adafruit/Adafruit_Learning_System_Guides project with updates for the Event Calendar and Weather Station learning guides.

Note to reviewers: (cc @ladyada) I applied license headers to all new files as I observed in other places. I'm pretty confident I got it right, but I wasn't able to find a specific document in the repo that says "do license headers like XYZ". Maybe I didn't look hard enough, but if there is such a document, I'd be happy to read it to make sure I've done it correctly.

Recommended review: commit by commit.

Closes #85

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.

Neither SSD1680 drivers (Adafruit_SSD1680/Adafruit_SSD1680Z) work for the latest GDEY0213B74 E-Ink Bonnets
1 participant