Skip to content

Reduce unnecessary chunking#236

Open
bugadani wants to merge 2 commits into
rust-embedded-community:masterfrom
card-io-ecg:contiguous
Open

Reduce unnecessary chunking#236
bugadani wants to merge 2 commits into
rust-embedded-community:masterfrom
card-io-ecg:contiguous

Conversation

@bugadani

@bugadani bugadani commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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

This PR sends contiguous buffers in one operation, instead of chunking it up in 8-pixel tall stripes. If you update the whole display, the underlying display driver can transfer the buffer much more efficiently - in my case, with a 128x64 display, the driver issues a single send_data call instead of 8.

Before (ignore the 8MHz, my logic analyser is too slow to sample the 40MHz clock so it's aliasing):

image

After

image

@bugadani bugadani force-pushed the contiguous branch 4 times, most recently from 5ec86f5 to 03a11e5 Compare July 4, 2026 11:39

@MabezDev MabezDev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

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