Commit graph

76 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Marc Herbert 2cd51a33ce samples: make find_package(Zephyr...) REQUIRED
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-29 10:47:25 +02:00
Andy Ross 32bb2395c2 timeout: Fix up API usage
Kernel timeouts have always been a 32 bit integer despite the
existence of generation macros, and existing code has been
inconsistent about using them.  Upcoming commits are going to make the
timeout arguments opaque, so fix things up to be rigorously correct.
Changes include:

+ Adding a K_TIMEOUT_EQ() macro for code that needs to compare timeout
  values for equality (e.g. with K_FOREVER or K_NO_WAIT).

+ Adding a k_msleep() synonym for k_sleep() which can continue to take
  integral arguments as k_sleep() moves away to timeout arguments.

+ Pervasively using the K_MSEC(), K_SECONDS(), et. al. macros to
  generate timeout arguments.

+ Removing the usage of K_NO_WAIT as the final argument to
  K_THREAD_DEFINE().  This is just a count of milliseconds and we need
  to use a zero.

This patch include no logic changes and should not affect generated
code at all.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-03-31 19:40:47 -04:00
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
Andrzej Głąbek 4253eae005 boards: nrf52840_pca10056: Rename board to nrf52840dk_nrf52840
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-03-27 09:14:08 +01:00
Pavlo Hamov 44b43710f2 samples: display: lvgl use posix input, remove defaults
Add support of SDL mouse events as input for the LVGL
platforms: native_posix(_64)

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2020-03-11 13:23:19 -05:00
Maureen Helm 06d17aa68d samples: display: Enhance lvgl sample to support touch input
Enhances the lvgl sample to support an optional touch panel input on
mimxrt10{50,60,64}_evk boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-01 08:50:16 -05:00
Johann Fischer cf6fd8482b samples: lvgl: write initial content before blanking_off
Write initial content of the display before blanking_off.
This allow faster update of the electronic ink displays as
the controller do not update the pannel when the banking
is enabled (currently this behaviour is only implemented
in gd7965 driver).

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-31 11:37:35 -05:00
Ulf Magnusson cf89ba33ea global: Fix up leading/trailing blank lines in files
To make the updated test in
https://github.com/zephyrproject-rtos/ci-tools/pull/121 clean, though it
only checks modified files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 17:41:55 -06:00
Jan Van Winkel b6beec9e68 samples: display: Move LVGL sample
Move LVGL sample from samples/gui/lvgl to samples/display/lvgl to have
a unified location for display related samples.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 21:01:41 -05:00
Jan Van Winkel 6d0deba1d0 samples: display: Remove ST7789V sample
Remove ST7789V display sample as there is a unified display sample
in samples/drivers/display.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 19:19:45 -05:00
Jan Van Winkel b912df91cf samples: display: Remove ILI9340 sample
Remove ILI9340 display sample as there is a unified display sample
in samples/drivers/display.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 19:19:45 -05:00
Jan Van Winkel 78c6241ee2 samples: display: Build for st7789v_waveshare_240x240
Update sample.yaml file for ST7789v sample to also build with
st7789v_waveshare_240x240 shield.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Jan Van Winkel a781d1267f samples: display: Enable display support in ST7789V sample
Enable display support for ST7789V sample by setting CONFIG_DISPLAY in
prj.conf.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Johann Fischer 04db2dcea7 shields: st7789v_generic: rename shield to TL019FQV01
Rename shield to TL019FQV01.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Jan Van Winkel 3e63d6a088 samples: display: Use ST7789V generic shield
Use the ST7789V generic shield in ST7789V display sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-02 17:00:06 -05:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
David B. Kinder 82d6347355 doc: fix broken file and zephyr-app refs
found some references to files (via :zephyr_file: and :zephyr-app:) that
were moved, so the links were broken

Fixes: #19660

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-08 15:42:32 -05:00
Peter Bigot 49d6837bec samples: move board overlay files into boards directory
Application board.overlay files tend to be paired with
boards/board.conf files that extend the functionality of a board.
Move the overlay files to the same location as the config files that
they work with.

A few overlay files that are paired with a prj_board.conf file in the
application root directory are left in place.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-01 20:38:24 -07:00
Johann Fischer 1609f4af52 samples: ili9340: add adafruit_2_8_tft_touch_v2 to samples test
Add adafruit_2_8_tft_touch_v2 to samples test.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer 7a6e7e66db shields: add Adafruit 2.8" TFT Touch Shield v2
Add Adafruit 2.8" TFT Touch Shield v2.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer ce1ef72448 boards: reel_board: add support for reel board v2
Add support for reel board v2.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-18 22:30:15 -04:00
Johann Fischer cc9a96c88b sample: cfb: fix test sample.display.cfb.ssd1306
Fix extra_args for test sample.display.cfb.ssd1306.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:49:37 -05:00
Johann Fischer 39bfc845b7 samples: cfb_shell: remove FRDM-K64F board config and overlay
Remove FRDM-K64F board config and overlay from cfb_shell sample.
Enable test for the shield ssd1306_128x32.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:49:37 -05:00
Johann Fischer 1dace68a69 sample: cfb: enable test for the shield ssd1306_128x64
Enable test for the shield ssd1306_128x64.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-07 17:15:51 +02:00
Johann Fischer fe0edb7595 samples: cfb: remove FRDM-K64F board config and overlay
Remove FRDM-K64F board config and overlay from cfb sample.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-07 17:15:51 +02:00
Marc Reilly 40a3e600a9 samples: display: add a simple sample for st7789v display
This adds a basic app which puts some rectangles on the display

It's hard to write an equivalent README to the rest of the sample
documentation, as the LCD I have uses a custom board thrown together for
testing. (ie other LCDs have publicly available modules)

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2019-08-08 10:11:47 -05:00
Peter A. Bigot 0626c8f1d3 samples: add board customization for native_posix_64
Sample applications for display functions do not work on native_posix_64
due to missing overrides.  Clone the native_posix_64 Kconfig override
for all samples that have a native_posix Kconfig override.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-17 15:29:42 -07:00
Johann Fischer fc57ea8d3c drivers: ssd1673: rename driver to ssd16xx
ssd1673 driver supports different controllers,
rename it to more generic ssd16xx.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-07-04 07:27:09 -04:00
Anas Nashif 9ab2a56751 cleanup: include/: move misc/printk.h to sys/printk.h
move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 9e35d53d1f cleanup: include/: move display.h to drivers/display.h
move display.h to drivers/display.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 8f692c7d38 cleanup: include/: move i2c.h to drivers/i2c.h
move i2c.h to drivers/i2c.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Bernard Lee b14f4f67a8 samples: display: ili9340: Document 2 Arduino TFT shield configurations.
Update README.rst with Arduino TFT shields setup details for nRF52 DK
and nRF52840 DK.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-06-17 17:06:06 -04:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Kumar Gala a2693975d7 dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 08:02:15 -05:00
Anas Nashif efb47ace39 doc: samples: cleanup board reference and layout
Cleanup references to boards in some of the example and use the same
boards through the examples. Other minot cleanups and make the text more
generic and not specific to certain boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-13 16:09:02 -04:00
Bernard Lee 591ed2677d samples: display: ili9340: Add 2 Arduino shield sample configurations.
Add 2 Arduino shield sample configurations.
1. nRF52 DK (PCA10040) with Seeed 2.8" TFT Touch Shield v2.0.
2. nRF52840 DK (PCA10056) with Adafruit 2.8" TFT Touch Shield (1947).

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-05-30 09:39:07 -04:00
Bernard Lee 3d2b994633 samples: display: ili9340: Add support of RGB565 pixel format.
ILI9340 display demo supports RGB565 as well as RGB888 pixel format.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-05-30 09:39:07 -04:00
Bernard Lee 72fa9d9556 samples: display: ili9340: ST NUCLEO-L476RG config file.
Put ST NUCLEO-L476RG specific parameters to own configuration file.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-05-30 09:39:07 -04:00
Bernard Lee 1b3b461265 samples: display: ili9340: Get ILI9340 device by DT label.
Get ILI9340 device by DT label instead of a fixed name.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-05-30 09:39:07 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif da5f185e06 samples: add test identifier
Add unique identifier instead of just 'test' for samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-29 17:44:11 -04:00
David B. Kinder 505cc2bb0e doc: use :zephyr_file: where appropriate
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub.  Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-09 09:50:27 -05:00
Sebastian Bøe 4e5300ba7f cmake: Drop all in-tree usage 'set_conf_file'
Port all users of 'set_conf_file' to use the built-in rules
instead. This follows the convention-over-configuration principle to
make the system as a whole simpler and more consistent.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-01 09:44:09 +01:00
Carles Cufi 997ef85ea9 doc: Clean up build instructions and use of variables
Remove most unnecessary instances of `export` and `cmake` use that can
instead be replaced with `zephyr-app-commands` or similar. This is to
avoid documentation using different mechanisms to describe the same
actions and in preparation for documenting `west build` everywhere.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-21 11:46:45 +01:00
David B. Kinder 882702e688 doc: fix misspellings in docs
Fix misspelling in boards, samples, and doc missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-19 21:35:45 -05:00
Johann Fischer 6e885cfd97 samples: cfb: remove unused variable and fix style
Remove unused variable and fix style.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-02-05 11:05:47 -05:00
Kumar Gala d0aca3b92c display: ili9340: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert ili9340 display driver to use new defines so we can remove
the dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 15:25:46 -06:00
Kumar Gala fe8edc2884 display: ssd1306: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert ssd1306 display driver to use new defines so we can remove
the dts_fixup.h code for it.  Also dropped "-i2c" from compatible.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 14:21:32 -06:00