-
Notifications
You must be signed in to change notification settings - Fork 974
Add example spi/ssd1309_spi #731
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
base: develop
Are you sure you want to change the base?
Conversation
|
Incidentally I've also created a similar version that uses a frame buffer updated via DMA direct to the SPI peripheral; but I'll submit that as a separate PR. This version is much easier to understand. |
|
|
||
|
|
||
| int main() { | ||
| stdio_init_all(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example doesn't seem to actually use stdio?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - but I thought it might be wise to enable it in case of runtime error messages... What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this one up to @peterharperuk 🙂
|
Thank you for the high-quality example 👍 |
You're more than welcome! I wanted to use one of these displays in a current project, and writing it up as an example encourages me to do a better job. Your comments are really helpful and always on point :-) I'll be interested to see what you think of the DMA frame-buffer version, which should be ready in the next day or two. First time I've dipped my toe into using DMA and it's a really well designed API 👍 |
Add an example of how to attach one of the widely available small OLED displays based on the SSD1309 controller via SPI, complementing the existing SSD1306 example that uses i2c. In fact the two controllers have the same command set so the example should work on either (but I don't have an SSD1306 to test).
For many applications the SPI interface might be a better bet, as it runs a lot faster (10Mbit/sec).