Screen API implementation
This pull request adds an interface for screen management. It includes implementations and unit tests, and has been tested on a Raspberry Pi Pico using a Pico Explorer Base.
Files added:
-
unittest/src/fake/display/mod.rs -
unittest/src/fake/display/tests.rs -
examples/screen.rs -
apis/interface/display/src/lib.rs -
apis/interface/display/src/tests.rs
Tests:
- Manually tested on a Raspberry Pi Pico with a Pico Explorer Base.
- Unit tests added for both fake and real interfaces.
This seems to be a rust version problem, @inesmaria08 could you please rebase your branch and force push it?
I would like to try this out. It seems like it needs a rebase at this point. I was able to confirm that just including the relevant changes do work with the nrf52840dk (https://github.com/tock/libtock-rs/compare/display-bradjc?expand=1).
To merge this I think we should rename "display" to "screen" to be consistent with the kernel.
Any chance you have tried embedded graphics? https://crates.io/crates/embedded-graphics
To merge this I think we should rename "display" to "screen" to be consistent with the kernel.
The display crate should be renamed to screen and moved to a folder called display in the apis folder.
I tested this on a Pico Explorer Base with 2 Pico boards (Pico 1 and Pico 2). On the Pico 2 this works out of the box, but on the Pico 1 there is a strange bug. If I am using normal UART for debugging, it works out of the box, but when I use UART over USB, the screen gets stuck on the init and I have to reset the board from Process Console for it to work. I can't tell if this is an issue with the board, the Tock port or libtock-rs.
This looks good except for making the crate apis/display/screen so we can add other displays in the future.
@alexandruradovici can you review?