-
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
Merged
MaureenHelm
merged 1 commit into
zephyrproject-rtos:master
from
vanwinkeljan:display_shield_sample
Jan 10, 2020
Merged
Display driver API sample #20580
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| cmake_minimum_required(VERSION 3.13.1) | ||
| include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
| project(display) | ||
|
|
||
| target_sources(app PRIVATE src/main.c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| .. _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. | ||
|
|
||
| Below is an example on how to build for a :ref:`nrf52840_pca10056` board with a | ||
| :ref:`adafruit_2_8_tft_touch_v2`. | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/drivers/display_shield | ||
| :board: nrf52840_pca10056 | ||
| :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:: | ||
| :zephyr-app: samples/drivers/display_shield | ||
| :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` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright (c) 2019 Jan Van Winkel <[email protected]> | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #ifdef DT_INST_0_ILITEK_ILI9340_LABEL | ||
| #define DISPLAY_DEV_NAME DT_INST_0_ILITEK_ILI9340_LABEL | ||
| #endif | ||
|
|
||
| #ifdef DT_INST_0_SOLOMON_SSD1306FB_LABEL | ||
| #define DISPLAY_DEV_NAME DT_INST_0_SOLOMON_SSD1306FB_LABEL | ||
| #endif | ||
|
|
||
| #ifdef DT_INST_0_GOODDISPLAY_GDEH0213B1_LABEL | ||
| #define DISPLAY_DEV_NAME DT_INST_0_GOODDISPLAY_GDEH0213B1_LABEL | ||
| #endif | ||
|
|
||
| #ifdef DT_INST_0_SITRONIX_ST7789V_LABEL | ||
| #define DISPLAY_DEV_NAME DT_INST_0_SITRONIX_ST7789V_LABEL | ||
| #endif | ||
|
|
||
| #ifdef DT_INST_0_FSL_IMX6SX_LCDIF_LABEL | ||
| #define DISPLAY_DEV_NAME DT_INST_0_FSL_IMX6SX_LCDIF_LABEL | ||
| #endif | ||
|
|
||
| #ifdef CONFIG_SDL_DISPLAY_DEV_NAME | ||
| #define DISPLAY_DEV_NAME CONFIG_SDL_DISPLAY_DEV_NAME | ||
| #endif | ||
|
|
||
| #ifdef CONFIG_DUMMY_DISPLAY_DEV_NAME | ||
| #define DISPLAY_DEV_NAME CONFIG_DUMMY_DISPLAY_DEV_NAME | ||
| #endif | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| CONFIG_HEAP_MEM_POOL_SIZE=16384 | ||
| CONFIG_LOG=y | ||
| CONFIG_DISPLAY=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| sample: | ||
| description: Sample application for displays | ||
| name: display_sample | ||
| tests: | ||
| sample.display.shield.adafruit_2_8_tft_touch_v2: | ||
| platform_whitelist: nrf52840_pca10056 | ||
| extra_args: SHIELD=adafruit_2_8_tft_touch_v2 | ||
| tags: display shield | ||
| sample.display.shield.ssd1306_128x32: | ||
| platform_whitelist: nrf52840_pca10056 | ||
| extra_args: SHIELD=ssd1306_128x32 | ||
| tags: display shield | ||
| sample.display.shield.ssd1306_128x64: | ||
| platform_whitelist: nrf52840_pca10056 | ||
| extra_args: SHIELD=ssd1306_128x64 | ||
| tags: display shield | ||
| sample.display.shield.waveshare_epaper_gdeh0213b1: | ||
| platform_whitelist: nrf52840_pca10056 | ||
| extra_args: SHIELD=waveshare_epaper_gdeh0213b1 | ||
| sample.display.st7789v_tl019fqv01: | ||
| platform_whitelist: nrf52_pca10040 | ||
| extra_args: SHIELD=st7789v_tl019fqv01 | ||
| tags: display shield | ||
| sample.display.st7789v_waveshare_240x240: | ||
| platform_whitelist: nrf52_pca10040 | ||
| extra_args: SHIELD=st7789v_waveshare_240x240 | ||
| tags: display shield | ||
jfischer-no marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sample.display.mcux_elcdif: | ||
| platform_whitelist: mimxrt1050_evk | ||
| tags: display | ||
| sample.display.sdl: | ||
| build_only: true | ||
| platform_whitelist: native_posix_64 | ||
| tags: display | ||
| sample.display.dummy: | ||
| platform_whitelist: native_posix | ||
| extra_configs: | ||
| - CONFIG_DUMMY_DISPLAY=y | ||
| - CONFIG_SDL_DISPLAY=n | ||
| - CONFIG_TEST=y | ||
| tags: display | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.