[riot-notifications] [RIOT-OS/RIOT] Add color depth types to disp_dev API (#14054)
notifications at github.com
Mon May 11 11:33:33 CEST 2020
### Contribution description
This PR addresses the issue with colors in the disp_dev API. Mentioned briefly in #13787
It's a proposal how to address it.
The idea behind this is simple: The user application shouldn't care too much about the underlying color depth of a display.
It should provide the color data in the correct format. The driver should do the rest. This also makes it possible to switch displays with different color depths without changing the color data itself. Also the application code should be the same. The user only has to change the makefile.
- User applications uses 24bit color data and a 24bit color display. The driver itself doesn't need to change the data that much, since it can display it directly.
- For another version of the hardware, the user changes the display to a 16bit display. The driver abstracts this, accepts the 24bit color data and transforms it to the needed 16bit color.
This is an down scaling example. The same can be done for up scaling as well.
The biggest benefit is backwards compatibility. The user can simply maintain backwards compatibility, without caring too much about the old hardware.
### Testing procedure
The tests are not changed yet.
### Issues/PRs references
Addresses #13787 . Should be merged after #14051 .
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* drivers/disp_dev: Adapt API to use struct for coordinates
* drivers/ili9341: Adapt API to use struct for coordinates
* pkg/lvgl: Adapt to coordinate struct API of disp_dev
* drivers/disp_dev: Add color specific color depth types to API
-- File Changes --
M drivers/disp_dev/disp_dev.c (9)
M drivers/ili9341/ili9341.c (45)
M drivers/ili9341/ili9341_disp_dev.c (8)
M drivers/include/disp_dev.h (103)
M drivers/include/ili9341.h (38)
M pkg/lvgl/contrib/lvgl.c (5)
M tests/disp_dev/main.c (13)
M tests/driver_ili9341/main.c (25)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications