Skip to content

Added function to clear only region of display#235

Open
MartinBroers wants to merge 3 commits intorust-embedded-community:masterfrom
MartinBroers:feature/clear-region-of-screen
Open

Added function to clear only region of display#235
MartinBroers wants to merge 3 commits intorust-embedded-community:masterfrom
MartinBroers:feature/clear-region-of-screen

Conversation

@MartinBroers
Copy link
Copy Markdown

@MartinBroers MartinBroers commented Feb 27, 2026

Rather than clearing entire screen buffer, just clear a portion of the screen for faster partial writes.

Hi! Thank you for helping out with SSD1306 development! Please:

  • Check that you've added documentation to any new methods
  • Rebase from master if you're not already up to date
  • Add or modify an example if there are changes to the public API
  • Add a CHANGELOG.md entry in the Unreleased section under the appropriate heading (Added, Fixed, Changed, etc)
  • Run rustfmt on the project with cargo fmt --all - CI will not pass without this step
  • Check that your branch is up to date with master and that CI is passing once the PR is opened

PR description

Awesome repository, I could use it out of the box! I am running on a time-critical MCU, so my writings to the display should be as quick as possible. However, when writing new text over and existing text will just leave the old text there and overwrite it. That is why I added a function to clear a portion of the screen to allow both a short write and a clear text.

I am, however, not sure I did this in the way we want to design the library. If you are not happy with the current implementation, could you help me (point me) how to do this?

Thanks,
Martin

Martin Broers added 3 commits February 27, 2026 10:22
Rather than clearing entire screen buffer, just clear a portion of the
screen for faster partial writes.

Signed-off-by: Martin Broers <martin.broers@bluebirdpower.com>
aligned 0.4.3 uses edition2024, which requires Cargo 1.85+. The MSRV
job is unaffected as it only builds the lib at 1.75.
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.

1 participant