2019-11-11 21:58:18 +08:00
|
|
|
.. _display-sample:
|
|
|
|
|
|
|
|
Display Sample
|
|
|
|
##############
|
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
|
|
|
This sample will draw some basic rectangles onto the display.
|
|
|
|
The rectangle colors and positions are chosen so that you can check the
|
|
|
|
orientation of the LCD and correct RGB bit order. The rectangles are drawn
|
|
|
|
in clockwise order, from top left corner: red, green, blue, grey. The shade of
|
|
|
|
grey changes from black through to white. If the grey looks too green or red
|
|
|
|
at any point or the order of the corners is not as described above then the LCD
|
|
|
|
may be endian swapped.
|
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
|
|
|
As this is a generic sample it should work with any display supported by Zephyr.
|
|
|
|
|
2020-03-17 19:41:28 +08:00
|
|
|
Below is an example on how to build for a :ref:`nrf52840dk_nrf52840` board with a
|
2019-11-11 21:58:18 +08:00
|
|
|
:ref:`adafruit_2_8_tft_touch_v2`.
|
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
2020-03-10 15:28:52 +08:00
|
|
|
:zephyr-app: samples/drivers/display
|
2020-03-17 19:41:28 +08:00
|
|
|
:board: nrf52840dk_nrf52840
|
2019-11-11 21:58:18 +08:00
|
|
|
:goals: build
|
|
|
|
:shield: adafruit_2_8_tft_touch_v2
|
|
|
|
:compact:
|
|
|
|
|
|
|
|
For testing purpose without the need of any hardware, the :ref:`native_posix`
|
|
|
|
board is also supported and can be built as follows;
|
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
2020-03-10 15:28:52 +08:00
|
|
|
:zephyr-app: samples/drivers/display
|
2019-11-11 21:58:18 +08:00
|
|
|
:board: native_posix
|
|
|
|
:goals: build
|
|
|
|
:compact:
|
|
|
|
|
|
|
|
List of Arduino-based display shields
|
|
|
|
*************************************
|
|
|
|
|
|
|
|
- :ref:`adafruit_2_8_tft_touch_v2`
|
|
|
|
- :ref:`ssd1306_128_shield`
|
|
|
|
- :ref:`st7789v_generic`
|
|
|
|
- :ref:`waveshare_e_paper_raw_panel_shield`
|