-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Display driver API sample #20580
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 API sample #20580
Conversation
|
All checks are passing now. checkpatch (informational only, not a failure)Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
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 suggest to use CONFIG_LVGL_DISPLAY_DEV_NAME as it is already there.
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.
That is not an option CONFIG_LVGL_DISPLAY_DEV_NAME can only be set if LVGL is used else this config is not available.
|
@vanwinkeljan Why not make it more generic and move to samples/drivers/? I guess your plan is also to remove |
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.
change if to If (beginning of a sentence)
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.
Let's fix some issues with this rewrite:
This sample makes use of Arduino-based display shields and should work on any
board supporting such a shield, for example:
- :ref:`adafruit_2_8_tft_touch_v2`
- :ref:`ssd1306_128x32_shield`
- :ref:`ssd1306_128x64_shield`
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.
change build to built
@jfischer-phytec-iot thx for the suggestion will take care of this in the next push. |
708205e to
92b8e2c
Compare
erwango
left a comment
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 addition is not matching the definition of shield: a HW component that could be added on top of a board thanks to compatible connector.
Agree with @jfischer-phytec-iot , it would be better proposed as a sample/driver.
|
@erwango The sample was already moved to |
MaureenHelm
left a comment
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.
@vanwinkeljan Why not make it more generic and move to samples/drivers/? I guess your plan is also to remove samples/display/ili9340 and samples/display/st7789?
@jfischer-phytec-iot thx for the suggestion will take care of this in the next push.
This looks more like a general display driver sample than a shield sample, so I think it belongs in samples/drivers/display. It should work on mimxrt1050_evk, which doesn't need a shield.
|
@MaureenHelm Valid point, only remaining problem is how do we get the correct display name in the sample. An option would be to add a |
I am to implement similar mechanism that network stack has to discover the network interfaces or what we have for the usb classes. |
|
@jfischer-phytec-iot Any suggestion how we proceed with this PR, eg. proceed with a dts_fixup.h file until your mechanism is in place, ... ? |
What about a common dts alias like we do for led0? |
Would probably not work for the configuration like reel board + ssd1306_128x32 or mimxrt1050 + waveshare_epaper. |
I think yes if that with dts_fixup.h works and is acceptable. |
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.
Change to Below
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.
for consistency, use lowercase for the color names (red, green, blue)
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.
What should you do if the LCD is "endian swapped"? Is there a configuration or code change needed?
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.
As this is a generic display sample there is no clear solution to this issue and it is up to the user to figure it out. Could be a Kconfig that is not set correctly or a plain bug in the code.
92b8e2c to
2577976
Compare
|
Updated PR
|
samples/drivers/display/README.rst
Outdated
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.
That's funny. My previous comments ask what someone should do if indeed the LCD is endian swapped and @MaureenHelm hit this. So maybe this is a common enough problem to say more here about what the developer might need to do in this situation?
d3083d8 to
01978be
Compare
dbkinder
left a comment
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.
docs LGTM, thanks.
|
@MaureenHelm @erwango could you please revisit your reviews? |
|
@vanwinkeljan,approved. |
|
@erwango I will have a look at the other PR |
jfischer-no
left a comment
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.
block it to have time for review and test
01978be to
758490f
Compare
f7c27b9 to
4c5c1a1
Compare
jfischer-no
left a comment
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.
LGTM, thanks. Tested with ssd1306, mimxrt1050, st7789v, ssd16xx. As next we should remove samples/display/ili9340 and sample/display/st7789v.
Added a generic display shield sample. Signed-off-by: Jan Van Winkel <[email protected]>
4c5c1a1 to
864f3bd
Compare
|
@MaureenHelm Please revise. |
This PR introduces a generic display shield sample as long as a board supports arduino shields this sample should work for suche board.