1.. zephyr:code-sample:: display
2   :name: Display
3   :relevant-api: display_interface
4
5   Draw basic rectangles on a display device.
6
7Overview
8********
9
10This sample will draw some basic rectangles onto the display.
11The rectangle colors and positions are chosen so that you can check the
12orientation of the LCD and correct RGB bit order. The rectangles are drawn
13in clockwise order, from top left corner: red, green, blue, grey. The shade of
14grey changes from black through to white. If the grey looks too green or red
15at any point or the order of the corners is not as described above then the LCD
16may be endian swapped.
17
18Building and Running
19********************
20
21As this is a generic sample it should work with any display supported by Zephyr.
22
23Below is an example on how to build for a :ref:`nrf52840dk_nrf52840` board with a
24:ref:`adafruit_2_8_tft_touch_v2`.
25
26.. zephyr-app-commands::
27   :zephyr-app: samples/drivers/display
28   :board: nrf52840dk/nrf52840
29   :goals: build
30   :shield: adafruit_2_8_tft_touch_v2
31   :compact:
32
33For testing purpose without the need of any hardware, the :ref:`native_sim <native_sim>`
34board is also supported and can be built as follows;
35
36.. zephyr-app-commands::
37   :zephyr-app: samples/drivers/display
38   :board: native_sim
39   :goals: build
40   :compact:
41
42List of Arduino-based display shields
43*************************************
44
45- :ref:`adafruit_2_8_tft_touch_v2`
46- :ref:`ssd1306_128_shield`
47- :ref:`st7789v_generic`
48- :ref:`waveshare_epaper`
49