ssd1327: Harmonize driver and add test scenario.#55
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR harmonizes the SSD1327 display driver API with project conventions, expands the CPython mock test harness to support SSD1327’s I2C write patterns, and adds a new YAML scenario to exercise the driver in both mock and hardware modes.
Changes:
- Updated SSD1327 I2C constructors to use
address(instead ofaddr) and removed a stray debugprint()in the SPI init path. - Enhanced the CPython test runner: added a
framebufstub and extendedFakeI2Cwithwriteto()/writevto(). - Added a new
tests/scenarios/ssd1327.yamlscenario and improved manual test prompting UX (single keypress).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
lib/ssd1327/ssd1327/device.py |
Harmonizes address naming for I2C classes and removes SPI debug output. |
tests/fake_machine/i2c.py |
Adds writeto()/writevto() needed by SSD1327 I2C implementation in mock mode. |
tests/fake_machine/framebuf_stub.py |
Introduces a minimal framebuf stub so display drivers import/run on CPython. |
tests/runner/executor.py |
Patches framebuf into the mock import environment and reuses the new manual prompt helper. |
tests/test_scenarios.py |
Adds _prompt_yes_no() (Enter/Escape) and uses it for manual checks. |
tests/scenarios/ssd1327.yaml |
Adds SSD1327 mock + hardware/manual scenario coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36
Closes #54
Summary
addr→addressinSSD1327_I2CandWS_OLED_128X128_I2C, remove debugprint()inSSD1327_SPI.__init__writeto()andwritevto()methods (used by SSD1327_I2C instead ofwriteto_mem)framebuf_stub.pyfor testing display drivers on CPythonTests
Test commands
Test results