-
Notifications
You must be signed in to change notification settings - Fork 94
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
Display Driver and Example for Waveshare 1.28 Round LCD #77
Conversation
Added board wavershare-rp2040-lcs-1-28, added a driver for this board.
Set the backlight low (off) then clear the screen to black, initialize the screen, set the backlight high (on). This prevents the unset memory as showing as static on the screen.
Use the V2::outputPin for the backlight.
Added two buffers so that I can swap between them and prevent screen flickering when updating the display.
Added comments and formmating.
Added arrow and window region updates.
Added Precomputation details on the arrow.
Added frame rate delay adjustment
Fixed a defect in the angle_index
Used one buffer for the background, one buffer for the LCD, copy data from background to LCD buffer before displaying the region on screen.
Clean up and simplify the code.
Background Image for the LCD Clock Display.
Removed the display driver and cleaned up the examples so they always use the frame buffer.
Hi! Also easier if an example fits in a single file - framebuffer.rs looks like it's another example, not a module used by an example. There's also already a handful of crates that support gc8a01a, is there something your driver does that more established crates like mipidsi don't? |
Also this has some build warnings, and the use of static mut's for your framebuffer is a concern:
|
I can simplify the example. This specific example was created because the display is commonly used for watches so I made something that was also like a watch. I will remove the complexities from it. I created this display driver as it is a closer match to the one provided by Waveshare for their Python and C examples. I wanted to explicitly show the configuration instructions of the display. I commented the display instructions from the chipset where possible. Some configuration instructions remain undocumented as Waveshare never provided details on them. I will remove the framebuffer and simplify the example. I am happy to make the changes as this is the first project I have made with Rust. |
Simplified the example made it more like 0.96
All comments have been considered and new code has been committed for your review. |
Fixed a typo.
Removed unused dependency
Moved Dependency to Workspace, updated backlight code.
Are there any further outstanding issues, I updated the code so that the automatic checks would pass. I learned a lot with those automatic checks and have added some into my own projects. |
* Added board waveshare-rp2040-lcd-1-28
Example project for the Waveshare 1.28 Round LCD Display. Renders simple graphics and displays a ticking second hand as a lock with the Rust logo as the background image.