Skip to content

Conversation

GrantM11235
Copy link
Contributor

Pros

  • Much faster for iterators, probably because it doesn't take a dyn Iterator anymore
  • Easier to write interface drivers, no more gigantic match blocks (the parallel interface impl is about 100 lines shorter)
  • No more runtime errors for unimplimented data formats
  • It should work with 9-bit and 18-bit interfaces (untested)

Cons

  • 8-bit Display drivers are now responsible for splitting up u16s. This only requires 1-3 lines of code
  • Display drivers that support 8-bit and 16-bit interfaces are slightly more complex (only an extra 50 lines or so)

Todo

  • Rename trait?
  • Update comments
  • Update changelog
  • Write migration guide

@GrantM11235
Copy link
Contributor Author

Update: I was able to port the top three display drivers (ssd1306, ili9341, and st7789) to this api without much difficulty

@GrantM11235
Copy link
Contributor Author

Sorry for the force-push, I wanted to make a small change to the api.
The previous version of this PR had send_{iter,slice} methods that took a DataOrCommand enum but I realized that it is more ergonomic to just have send_{command,data}_{iter,slice} methods.

@GrantM11235 GrantM11235 mentioned this pull request Mar 13, 2021
2 tasks
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