Commit graph

525 commits

Author SHA1 Message Date
Karsten Koenig 758c461252 drivers: can: mcp2515: fix devicetree bindings
Adding required fields to the devicetree overlay of the CAN sample as
this is often used as a reference. Also use these fields instead of the
KConfig entries.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-08-18 09:56:42 +02:00
Alexander Wachter f19dd97517 samples: drivers: CAN: reworked sample code
The CAN sample is rewritten to be board independent.
The CAN controller and LED is determined automatically and the
button is removed.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-18 09:56:42 +02:00
Tomasz Bursztyka 08a93d276b samples: Counter alarm should display seconds, not ticks
The message talks about seconds but displays ticks. Adjusting the
parameter to convert ticks to seconds then. But also adding the ticks
since it is a valuable information when testing counter devices.

Fixing small style issue (parameter indentation) as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-08-05 13:27:36 +02:00
Anas Nashif ffaba63b10 boards: remove arduino 101 and related boards
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Alexander Wachter 45358ca2d7 samples: drivers: CAN: enable can shell for the sample
This commit enables the CAN shell for the sample code.
Also, the device shell is activated to find the proper device-name.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-29 10:27:54 +03:00
Jose Alberto Meza 11d0725489 samples: drivers: espi: Add eSPI driver sample app
Show eSPI API driver usage, including early configuration,
send of virtual wire packets and callback mechanism

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Peter A. Bigot 7f2edeef6c samples/drivers/spi_flash: add board overrides
Particle mesh feather devices, and Nordic PCA10056, can both run
this example with the on-board JEDEC SPI NOR device if the driver
is enabled.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-24 09:20:56 -04:00
Peter A. Bigot 0e338efb3c samples/drivers/spi_flash: fix device naming
There are multiple flash implementations.  This sample was originally
written for the W25QXXDV driver, but has since been used for
jedec,spi-nor.  The sample should work with multiple drivers.

Add device name sources for several drivers, falling back to spi-nor
which was recently used as a test filter.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-24 09:20:56 -04:00
Anas Nashif 92ddf63cb8 samples: led_apa102c_bitbang: remove whitelisting
Remove whitelisting and enable broader testing on all boards with needed
features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif 4042ea5ec7 samples: i2c_fujitsu_fram: remove whitelisting
Remove whitelisting and enable broader testing on all boards with needed
features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif db5aa49978 samples: spi_flash: remove whitelisting
Instead of whitelisting, use filtering on configured SPI Flash device.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Krzysztof Chruscinski a37fce6171 drivers: counter: Add optional flags to alarm configuration structure
Flags in alarm configuration structure will allow further extention
without breaking API. Initially, existing absolute flag was added
as the only flag.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-10 07:42:12 -05:00
Kumar Gala db167c606d dts: Rename LED._GPIO_* -> DT_ALIAS_LED._GPIOS_*
We use the following commands to rename any
LED._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_LED._GPIOS_{CONTROLLER,PIN,FLAGS}

git grep -l LED._GPIO_CONTROLLER | xargs sed -i 's/LED\(.\)_GPIO_CONTROLLER/DT_ALIAS_LED\1_GPIOS_CONTROLLER/g'
git grep -l LED._GPIO_PIN | xargs sed -i 's/LED\(.\)_GPIO_PIN/DT_ALIAS_LED\1_GPIOS_PIN/g'
git grep -l LED._GPIO_FLAGS | xargs sed -i 's/LED\(.\)_GPIO_FLAGS/DT_ALIAS_LED\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-02 08:26:37 -04:00
Kumar Gala 284bc9d964 dts: Rename SW._GPIO_* -> DT_ALIAS_SW._GPIOS_*
We use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS}

git grep -l SW._GPIO_CONTROLLER | xargs sed -i 's/SW\(.\)_GPIO_CONTROLLER/DT_ALIAS_SW\1_GPIOS_CONTROLLER/g'
git grep -l SW._GPIO_PIN | xargs sed -i 's/SW\(.\)_GPIO_PIN/DT_ALIAS_SW\1_GPIOS_PIN/g'
git grep -l SW._GPIO_FLAGS | xargs sed -i 's/SW\(.\)_GPIO_FLAGS/DT_ALIAS_SW\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-01 07:14:36 -05:00
Anas Nashif a2fd7d70ec cleanup: include/: move misc/util.h to sys/util.h
move misc/util.h to sys/util.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 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 bd70f6f1ed cleanup: include/: move spi.h to drivers/spi.h
move spi.h to drivers/spi.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 fd359c21e9 cleanup: include/: move rtc.h to drivers/rtc.h
move rtc.h to drivers/rtc.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 afa85cdc0f cleanup: include/: move led_strip.h to drivers/led_strip.h
move led_strip.h to drivers/led_strip.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 a14ef3bf01 cleanup: include/: move led.h to drivers/led.h
move led.h to drivers/led.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
Anas Nashif 6aa9c3a68f cleanup: include/: move gpio.h to drivers/gpio.h
move gpio.h to drivers/gpio.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 fe051a9055 cleanup: include/: move flash.h to drivers/flash.h
move flash.h to drivers/flash.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 969f8f1c68 cleanup: include/: move entropy.h to drivers/entropy.h
move entropy.h to drivers/entropy.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 7e7a9bdf88 cleanup: include/: move counter.h to drivers/counter.h
move counter.h to drivers/counter.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 c0c9396d44 cleanup: include/: move can.h to drivers/can.h
move can.h to drivers/can.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 d4d20677ac cleanup: include/: move watchdog.h to drivers/watchdog.h
move watchdog.h to drivers/watchdog.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
Kumar Gala a614a026b7 dts: Rename DT_.*_GPIO_* to DT_.*_GPIOS_*
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} ->
	DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS)

Used the following commands to make these conversions:

git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g'
git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g'
git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-27 13:02:34 -05:00
Alexander Wachter 7a73bb7efe samples: CAN: Add FRDM-K64F defconfig
This commit adds a board defconfig for the FRDM-K64F board.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-06-26 16:05:51 -05:00
Krzysztof Chruscinski 4fabc07ce5 samples: drivers: counter: alarm: add nordic boards to the whitelist
Add nordic boards to the whitelist to ensure that compilation is
checked by the CI.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-06-25 15:00:55 +02:00
Charles E. Youse ca4910827b boards/x86/quark_d2000_crb: drop support for Quark D2000 dev board
Remove the board directory as well as references in tests and samples.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-06-25 08:06:43 -04:00
Henrik Brix Andersen a361d7caad samples: drivers: CAN: add support for twr_ke18f board
Add support for the NXP TWR-KE18F developement board to CAN sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-24 14:33:46 -05:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05: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
Krzysztof Chruscinski ea44b056bc samples: drivers: counter: alarm: Fix compilation for nrf boards
Sample was not compiling for nordic boards because RTC_0
instance was not enabled by default and RTC_0 device is using
different DT define.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-06-14 05:44:39 -04:00
Anas Nashif c95b97db2e samples: spi_fujitsu_fram: remove whitelisting
Remove restrictive whitelisting and adapt board configuration causing
issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-13 16:09:02 -04:00
Anas Nashif 2fb19fcbdd style: samples/tests: add braces around if/while statements
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-06 15:20:21 +02:00
Krzysztof Chruscinski d6176f8697 samples: drivers: led_lp3943: Rename log module
main.c in the sample was registered to the logger as 'log'. Changed
to 'app'.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-29 13:52:31 +02:00
Erwan Gouriou bddb343b09 stm32: Remove redundant I2C variant Kconfig symbols definitions
I2C_STM32_V1 and I2C_STM32_V2 are Kconfig symbols used to
select STM32 I2C driver variant based on I2C IP available on a
given STM32 SoC.
Being SoC dependent, they are automatically selected in soc/
if CONFIG_I2C is set. Then there is no need to define them at board
level, nor for a specific application like this is done in
some sample or test applications. Remove these definitions when
this is the case.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-05-24 22:29:51 -04:00
Alexander Wachter b3b43b8921 drivers: can: Extend can_send with void *arg and pass it to the isr cb
This commit extends the CAN api can_send function by an argument
that is passed to the isr callback.
With this extension it is possible to distinguish between sent masseges
when they use the same callback.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-05-12 16:54:49 -04:00
Alexander Wachter 1b93522304 drivers: can: Extend attach_isr with void *arg and pass to the isr cb
This commit extends the CAN api attach_isr function by an argument
that is passed to the isr callback.
With this extension it is possible to distinguish between filter matches
when they use the same callback.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-05-12 16:54:49 -04:00
Antony Pavlov bfcfe14764 samples/drivers/watchdog: make it work on STM32
IWDG driver for STM32 doesn't support the callback parameter.
The patch adds necessary workaround for STM32.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-12 15:13:21 -04:00
Henrik Brix Andersen d481fa8cce samples: drivers: ht16k33: add sample application for the HT16K33
Add a sample application for showcasing the functionality of the
Holtek HT16K33 LED driver with keyscan functionality.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-05-07 22:33:06 -04:00
Andrzej Puzdrowski d422d56633 samples/drivers/soc_flash_nrf: enable nrf9160_pca10090 targets
The patch provides flash offsets appropriate for running
this sample on nrf9160_pac10090 targets.
As that sample is small one, it is done with assumption that image_1
flash partition is empty.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Andrzej Puzdrowski 2d24ce8565 tests/drivers/soc_flash_nrf: fix lack of disabled protection
Write protection was not disabled prior erase call.
It used to work before only because nrf driver had not check
the protection before erase execution. This behavior was changed in
order to align to zephyr - which implied requirement for this test fix.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-19 11:50:46 +02:00
Karsten Koenig c9090caad7 drivers: can: mcp2515: Fixes for DT SPI cs
Fixed using chipselect with seperate chipselect GPIOs and how they were
referenced from/in DeviceTree.
Also configure the device during initialization so it's ready to go
after init.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-04-17 16:12:30 -04:00
Karsten Koenig bf52bfea90 samples: can: Added project configuration for MCP2515
Project configuration to run the CAN sample with the MCP2515 attached
via SPI as the CAN controller.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-04-17 16:12:30 -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 6e6f13c18a samples: fix identifiers for samples
Fix identifiers for tests in samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-01 12:23:09 -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
Patrik Flykt 21358baa72 all: Update unsigend 'U' suffix due to multiplication
As the multiplication rule is updated, new unsigned suffixes
are added in the code.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Cinly Ooi 097a71cbfe samples: watchdog: Confirm that reset occured
Updated test harness to check for a second instance of
"Watchdog sample application". This is to confirm the
board did reset itself.

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-03-28 09:35:30 -05:00
Erwan Gouriou 25d04049ce samples/drivers/counter: alarm: fix printk usage
When displaying int and u32_t, use %u instead of %d.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-03-26 07:29:08 -05:00
Flavio Ceolin 11abc64315 samples: can: Check return of can_attach_isr
Problem spotted by coverity, CID 195786

Fixes #14417

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-14 19:15:03 -05:00
Maksim Masalski b324f35e61 macros: deleted macros SECONDS(), MSEC(), USEC()
Changed everywhere these macros to the K_MSEC(), K_SECONDS()

Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-03-04 19:04:21 -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
Kumar Gala bb6b1918b2 drivers: can: stm32: Cleanup Kconfig enablement
Follow the pattern we have for other peripherals in that if the driver
class (CAN) is enabled than enable the driver for that class
(CAN_STM32).  Also have the STM32 CAN driver depend on being on a STM32
SoC.

Remove setting of CONFIG_CAN_STM32 in any .conf files as it will get set
of CONFIG_CAN is set/enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-25 10:05:21 -06:00
Jukka Rissanen c478b5bb6e can: Rename can_msg and can_msg_filter structs
In order to follow the naming from Linux, change the name of
can_msg to zcan_frame, and can_msg_filter to zcan_filter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-22 08:07:03 -05:00
Jukka Rissanen 58f3ae5334 can: Add Linux compatible frame and filter structs
Add new "struct can_frame" which is compatible with Linux so that it
is easier to port socket-can applications from Linux.
Rename existing can_filter to can_msg_filter so that the name will
not conflict with Linux compatible can_filter struct.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-22 08:07:03 -05:00
Krzysztof Chruscinski 3605e48c44 shell: Modify subcommands to use SHELL_STATIC_SUBCMD_SET_CREATE
It is planned to deprecate SHELL_CREATE_STATIC_SUBCMD_SET macro
which is replaced by SHELL_STATIC_SUBCMD_SET_CREATE.

Additionally, removed irrelevant comments about alphabetical
ordering which is no longer needed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-20 07:31:35 -05:00
Kumar Gala 1f68831197 samples: Use DT_ prefix define for DT filters
Update the filters that are extracting info from DT to use a define that
has a DT_ prefix so its clear that its coming from DT_.  Also this lets
us remove any non-DT prefixed defines in the conf db.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-14 10:45:25 -06:00
Erwan Gouriou 50eff0bf33 samples/drivers/flash_shell: Add nucleo_f746zg to platform_whitelist
In order to enable build of stm32f7 flash driver in sanitytests,
add nucleo_f746zg to flash_shell platform whitelist.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-12 20:16:22 -05:00
Andy Ross 453ce6afb8 samples/drivers/counter/alarm: Fix YAML schema failure
On my build host (where apparently the Python has a different version
of yaml than CI) this test is producing schema faiulres from the YAML:

    E: samples/drivers/counter/alarm/sample.yaml: can't load (skipping):
       <SchemaError: error code 2: Schema validation failed:
     - Value 'None' is not of type 'str'.
       Path: '/tests/test/harness_config/regex/1'.: Path: '/'>

The bug seems to be that the regex must be a list of strings, and the
empty list element is being parsed as a python None.  Just remove,
presumably the intent was an empty string, which is a noop in a regex
anyway.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-02-12 20:15:32 -05:00
Anas Nashif f164b056b0 samples: fix alarm sample doc and inclusion
Fix reference for alarm sample and how it is included in the
documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-07 16:14:00 -05:00
Erwan Gouriou da744314ca samples/drivers: Provides basic sample for counter alarm
Provide basic sample to exercise counter alarm API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-07 16:14:00 -05:00
Marc Pignat 8b6204b7ae samples/drivers/led_apa102: add a sample for using APA102 LEDs strip
Add a sample demonstrating usage of the APA102 driver, heavily based
on led_ws2812. Tested on nucleo_l432kc with an Adafruit DotStar strip.

Signed-off-by: Marc Pignat <marc@absintheaudio.com>
2019-02-07 11:19:00 -06:00
Marc Pignat 9dba1feaf1 samples: rename led_apa102c sample to led_apa102c_bitbang
There is a apa102 driver, and an upcomming patch will provide a sample
for using it, but let's keep the bitbang version which is intersting.

Signed-off-by: Marc Pignat <marc@absintheaudio.com>
2019-02-07 11:19:00 -06:00
qianfan Zhao 634e482fe1 samples: watchdog: Remove stm32 iwdg sample
STM32 iwdg driver are convented to new API now, the old sample
are doesn't need again.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2019-02-01 19:16:59 -05:00
Kumar Gala 75d84ffd7a led: lp3943: Remove dts_fixup.h
Since the lp3943 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-31 09:09:36 -06:00
Kumar Gala 489cecd505 led: pca9633: Remove dts_fixup.h
Since the pca9633 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-31 09:09:36 -06:00
Kumar Gala be0d753721 led: lp5562: Remove dts_fixup.h
Since the lp5562 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-31 09:09:36 -06:00
Kumar Gala 003bdb5fb6 led_strip: lpd880x: Add Device Tree support
Convert the lpd880x driver to use device tree and new DT_<COMPAT>
defines.  Support both LPD8803 & LPD8806 device tree compats.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 12:04:07 -06:00
Kumar Gala 8b691f50ca led_strip: ws2182: Add Device Tree support
Convert the ws2812 driver to use device tree and new DT_<COMPAT>
defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:47:45 -06:00
Karol Lasończyk c0a5739bda drivers: watchdog: align sample and test to new DT
Sample application and test are aligned to new DT naming convention.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2019-01-15 12:40:13 -06:00
Andy Ross b69d0da82d arch/x86_64: New architecture added
This patch adds a x86_64 architecture and qemu_x86_64 board to Zephyr.
Only the basic architecture support needed to run 64 bit code is
added; no drivers are added, though a low-level console exists and is
wired to printk().

The support is built on top of a "X86 underkernel" layer, which can be
built in isolation as a unit test on a Linux host.

Limitations:

+ Right now the SDK lacks an x86_64 toolchain.  The build will fall
  back to a host toolchain if it finds no cross compiler defined,
  which is tested to work on gcc 8.2.1 right now.

+ No x87/SSE/AVX usage is allowed.  This is a stronger limitation than
  other architectures where the instructions work from one thread even
  if the context switch code doesn't support it.  We are passing
  -no-sse to prevent gcc from automatically generating SSE
  instructions for non-floating-point purposes, which has the side
  effect of changing the ABI.  Future work to handle the FPU registers
  will need to be combined with an "application" ABI distinct from the
  kernel one (or just to require USERSPACE).

+ Paging is enabled (it has to be in long mode), but is a 1:1 mapping
  of all memory.  No MMU/USERSPACE support yet.

+ We are building with -mno-red-zone for stack size reasons, but this
  is a valuable optimization.  Enabling it requires automatic stack
  switching, which requires a TSS, which means it has to happen after
  MMU support.

+ The OS runs in 64 bit mode, but for compatibility reasons is
  compiled to the 32 bit "X32" ABI.  So while the full 64 bit
  registers and instruction set are available, C pointers are 32 bits
  long and Zephyr is constrained to run in the bottom 4G of memory.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-01-11 15:18:52 -05:00
Anas Nashif 5060ca6a30 cmake: increase minimal required version to 3.13.1
Move to latest cmake version with many bug fixes and enhancements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-03 11:51:29 -05:00
Peter A. Bigot 173d07c6e5 samples: driver: i2c_scanner: use arduino-defined device if available
nucleo_l476rg uses I2C_3 rather than I2C_0, and uses special magic to
synthesize a corresponding define from a device tree node label.  Update
the sample to use the Arduino binding if that's present.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-02 13:02:38 +01:00
Peter A. Bigot c416f61974 samples: driver: i2c_scanner: fix support on Nordic TWIM driver
The Nordic TWIM driver uses DMA which requires that the source address
be located in RAM.  If it isn't the transfer will rejected as invalid.
Provide a RAM address even though it's never dereferenced.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-02 13:02:38 +01:00
Peter A. Bigot 75240aa504 samples: driver: i2c_scanner: fix upper bound on address range
0x77 is an available device address (and is the secondary address for
the BME280).  0x78 is a reserved address.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-02 13:02:38 +01:00
Andrzej Głąbek 23d28ab400 samples: Remove redundant Kconfig adjustments for nRF boards
The options selecting nRF drivers are now enabled by default when
an nRF SoC is selected as the build target.
The options selecting given hardware instances are now enabled at
the board level.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-21 21:01:37 +01:00
Tavish Naruka 72b0289de4 samples: driver: i2c scanner
Scans i2c bus for any devices present.

Signed-off-by: Tavish Naruka <tavishnaruka@gmail.com>
2018-12-21 10:27:53 +01:00
Erwan Gouriou 1cfec48646 samples: yaml: filter can be limited to GPIO_CONTROLLER
It is safe to assume that if X_GPIO_CONTROLLER is defined (hence
generated) X_GPIO_PIN should also be defined.
If this is not the case, this is an issue and letting the sample
build will reveal the issue.
Update the yaml filter to rely only on _GPIO_CONTROLLER #define's


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-17 08:18:56 -06:00
Erwan Gouriou c338dd9b94 samples/drivers: gpio: LED0 and SW0 might not share GPIO controller
In gpio driver sample, same GPIO controller was used for out pin
(LED0) and in pin (SW0), which is actually a particular case.

This change implements the general case, where button an led might
not have the same gpio controller.
Tested on nucleo_f429zi and frdm_k64f.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-17 08:18:56 -06:00
Robert Lubos e8620e2cca ext: mbedtls: Unify mbedTLS Kconfig prefixes
Currently there is a mixed approach in prefixes from mbedTLS
configuration (MBEDTLS_ and TLS_). The latter was used in generic config
file and could bring up confusion that it can only be used with TLS
subsystem. Hence unify the approach to MBEDTLS_ prefix to avoid such
confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-12-17 11:27:02 +01:00
Anas Nashif bf649de0b9 samples: gpio: make sample generic and use DT
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.

Simplified documentation and made it more generic. Remove HW setup and
made sample work with built-in LEDs and buttons.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-11 13:13:26 -06:00
Jakub Rzeszutko b928b71756 shell: rename shell_help_print function
Function printing help has been renamed to shell_help.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-05 15:15:44 +01:00
Jakub Rzeszutko 3064ca4f2f shell: creating new module for help functionality
1. Created new shell module: shell_help.
2. Simplified command handlers with new shell print macros.
3. Removed help functions from command handlers.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-05 15:15:44 +01:00
Jakub Rzeszutko 5451ff2848 shell: remove "options" concept
Removing help "options" from shell API.

Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.

Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.

And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-05 15:15:44 +01:00
Patrik Flykt 079f55d519 samples: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00
Henrik Brix Andersen 4844afa04a samples: drivers: watchdog: enable debug logging
Enable debug logging in the watchdog driver sample application to aid
in debugging watchdog drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-11-27 14:15:58 -06:00
Anas Nashif 10970a60c0 sanitycheck: remove unused platforms keyword
This keyword had no effect and was being copied over to many samples
errornously.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-19 15:03:55 -05:00
Kumar Gala 1634cf2248 drivers/spi: Always selecet HAS_DTS_SPI once SPI is enabled
All drivers require DTS for their primary SPI settings.

Removing SPI_[0-9]_NAME config option added some more samples changes.
Usage of these options there was anyway not relevant.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Spoorthi K 93ddc232d7 samples: drivers: Update yaml with regex and fixture
Include regex pattern matching of console output
to determine the sample execution status.

Add fixture to determine the hardware dependency
if any. If FRAM is connected to board externally,
then with fixture, automation would be able to
identify the board with sensor to trigger the
execution.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-11-14 23:43:48 -05:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Andrzej Głąbek f39ba7230d dts_fixups: Update labels generated from DTS with DT_ prefix
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Krzysztof Chruscinski 97345dbb1b logging: Fix errors in log usage
Couple of findings which were revealed after changing
LOG_MODULE_REGISTER macro:
- missing semicolons after LOG_MODULE_REGISTER()
- missing LOG_LEVEL defines
- other

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-10 12:38:29 -05:00
Tomasz Bursztyka d658e03488 drivers/spi: Remove unused legacy options
These have been osbolete for some time already.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Himanshu Jha 148d515f9b samples: flash_shell: Replace incorrect assignment to boolean expression
`shell_cmd_precheck()` function has the second argument as boolean
and currently we pass assignment expression instead of boolean
expression. Therefore, fix the expression by passing `argc == 2`
as the boolean argument.

Fixes #11099
Coverity-CID: 189507

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-11-08 10:46:17 +01:00
Reto Schneider 7eabab2f5d samples, tests: Use semi-accurate project names
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-10-27 21:31:25 -04:00
Jakub Rzeszutko 147122e77f shell: examples unification
Updating examples according to new return value of function
shell_cmd_precheck.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 13:35:56 +02:00
Anas Nashif deaab90641 tests/samples: cleanup tags
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.

Avoid short abbriviations and using full names for fs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 09:17:51 -04:00
Anas Nashif 20b73e74a1 tests/samples: rename 'app' tag to something meaningful
Remove very generic apps tag and replace it with something that matches
what the test/sample does.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 09:17:51 -04:00
Anas Nashif 733a054ab0 samples: fix sample tags
Use correct tags instead of obvious 'sample' tag.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 09:17:51 -04:00
Jakub Rzeszutko f6197c4f3c shell: create instances automatically basing on enabled backend
If user will enable shell than for each backend shell instance
will be created automatically.

Update all shell examples according to the new initialization
procedure.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-11 12:08:04 +02:00
Ulf Magnusson 92ef8582b9 Kconfig: Remove redundant $(ZEPHYR_BASE) from 'source's
The $srctree environment variable gives the path relative to which
'(o)source' statements work (the current directory is used if $srctree
is unset). It is set to $ZEPHYR_BASE in cmake/kconfig.cmake, so there's
no need to qualify the source of Kconfig.zephyr in sample Kconfig files
(or in external projects).

All 'source's in Zephyr assume that the Zephyr root directory is used as
the srctree as well, and would break otherwise.

Remove the $(ZEPHYR_BASE)s to make it clearer that all 'source'
statements work relative to the Zephyr root. There was some user
confusion on IRC.

Also explain how things work in the documentation.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-10-10 11:28:27 -05:00
Jakub Rzeszutko b0571746e2 shell: parsing output LF character
Some terminals literally interprets shell output data. Hence to print
a message in new line shell needs to send `\r\n` each time. To minimize
flash usage user can now send `\n` as a line delimiter and shell will
automatically add missing CR character.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-10 10:45:28 +02:00
Jakub Rzeszutko 3d4c525c4c samples: flash_shell: migrate example to new shell
Convert flash_shell example to use the new shell API.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-09 13:22:53 +02:00
Anas Nashif 27eec649bf samples: led: fix default log level kconfig
Use correct Kconfig for default log level.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif c60aa42da7 samples: flash_shell: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif a37274b8f4 samples: led_lpd8806: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif 6038070704 samples: led_pca9633: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif 567f818d44 samples: led_ws2812: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif 7d9d0451fb samples: led_lp3943: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif b5c795d909 samples: led_lp5562: move to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif f7009d3a95 samples: move crypto sample to new logger
move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif c4d1324ce4 samples: crypto: move to new logger
Move sample to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif 88587b34c8 samples: fix prj.conf to use new logger
Configure samples to use new logger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Anas Nashif 3da714193f drivers: crypto: move to new logger
Move to new logger subsystem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Sebastian Bøe 8eb734cd82 DT: Rename from dts.fixup to dts_fixup.h
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.

To this end we rename the dts.fixup files to the correct file
extension '.h'.

This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-08 11:38:56 -04:00
Maureen Helm 75bc6ba454 drivers: boards: Merge HAS_DTS_I2C_DEVICE with HAS_DTS_I2C
Every board that uses dts-enabled i2c drivers has a board-level dts, so
there is no need to have separate configs HAS_DTS_I2C_DEVICE and
HAS_DTS_I2C.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-10-01 21:15:06 -05:00
Sebastian Bøe 72e7bfa680 cmake: Remove unnecessary KCONFIG_ROOT configuration
It is no longer necessary to set the KCONFIG_ROOT variable when the
KConfig file is in the application root directory.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-09-21 13:37:21 -04:00
Spoorthi K 58542d8d6c samples: Include regex matching in samples
Add harness console and include regex for output
pattern matching to determine correctness of
sample execution.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-09-21 00:40:44 -04:00
Krzysztof Chruscinski 527256501f shell: Rename shell to legacy_shell
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-19 09:30:29 -04:00
Ulf Magnusson d713033d5c Kconfig: Use new preprocessor syntax for env. variables
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.

$(FOO) is a general preprocessor variable expansion, which falls back to
environment variables if the variable isn't set (like in Make). It can
also be used in prompts, 'comment's, etc.

The old syntax will probably be supported forever in Kconfiglib for
backwards compatibility, but might as well make it consistent now that
people might start using the preprocessor more.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 19:17:25 -04:00
Filip Kubicz 5c3992f34f dts: update I2C bindings for nRF chips
Change 'nRF5' family names to 'nRF' in I2C DTS.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2018-09-11 11:41:37 +02:00
Flavio Ceolin f6210cf430 samples: drivers: crypto: Fix minimum values for mbedTLS
The latest mbedTLS (2.12) release increased resources requirements on
Zephyr, so it was required increasing the minimum SRAM to run this test
and the main stack size.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-06 21:11:31 -04:00
Flavio Ceolin 8b70ace563 crypto: tests: Change crypto tests to use Kconfig defined header
While it's possible to define which mbedTLS config header to use, our
samples should use config-tls-generic.h as default because this header
is configurable through Kconfig.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-06 21:11:31 -04:00
Karol Lasończyk c9e3c938e6 tests/samples: watchdog: Update projects' configuration
WDT_NRFX is now enabling by default. Its configuration from proj.conf
files was removed.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-08-20 06:38:02 -07:00
Karol Lasończyk 6c669ace6e samples: watchdog: Update watchdog example to new API
Watchdog example is updated to use new watchdog API.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-08-20 06:38:02 -07:00
Anas Nashif 36ef19217f samples: led_lp5562: cmake_minimum_required added
Add missing cmake_minimum_required()

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-16 08:39:55 -07:00
Johannes Hutter f8d53e5d20 samples: drivers: Add sample application for LP5562
Add a sample application to show the LP5562 driver. The three RGB
channels are used to set multiple colors after each other under the
assumption that accordingly colored LEDs are connected. Blinking is also
shown in multiple colors.

Signed-off-by: Johannes Hutter <johannes@proglove.de>
2018-08-16 06:28:53 -07:00
Sebastian Bøe 55ee53ce91 cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.

Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.

To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.

This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.

The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-08-15 04:06:50 -07:00
ravishankar karkala Mallikarjunayya d71a1dfefd samples/driver/gpio : Updated gpio support
Updated gpio configuration for all boards

Signed-off-by: ravishankar karkala Mallikarjunayya <ravix.shankar.km@intel.com>
2018-08-12 06:57:55 -07:00
Ulf Magnusson a8aba2f8d0 Kconfig: Include Kconfig.zephyr last in sample Kconfig files
This will make adding properties to symbols in the base Zephyr Kconfig
files work the same as before.

I didn't actually spot any such cases, so this is just to play it safe.
It also makes the sample Kconfig symbols appear at the top in the
menuconfig interface, which might be nice.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-10 12:38:28 -07:00
Sebastien Bourdelin 2ef1e72607 samples: drivers: Add sample application for PCA9633
Add sample application for NXP PCA9633 LED driver. This application
test the 4 LEDs by doing the following:
 - turn on LEDs
 - turn off LEDs
 - set the brightness to 50%
 - turn off LEDs
 - blink the LEDs
 - turn off LEDs

The application is based on the stm32373_eval board and expects to have
a PCA9633 LED driver on the bus I2C-1 at the address 0x62.

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
2018-07-02 10:25:47 -05:00
Leandro Pereira c16bce7a6a samples, subsys, tests: Use ARRAY_SIZE() whenever possible
The ARRAY_SIZE() utility macro will actually test the parameter types,
and ensure that it is only called with arrays, and not arrays decayed
to pointers.

Changes were performed with a simple Coccinelle script.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-14 19:12:51 -04:00
Anas Nashif 57f6790335 samples: can: move CAN sample under drivers
Move CAN driver sample under samples/drivers and add a sample.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-11 17:11:18 -04:00
Anas Nashif d05442ee9c samples: crypto: adapt harness
Adapt console harness to new changes in sample output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-05 10:26:59 -04:00
Leandro Pereira d06eecbe29 samples: drivers: crypto: Update expected sample output
Some changes were made in the sample implementation that made the test
fail due to differences in the expected output.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-05 10:26:59 -04:00
Leandro Pereira 858cd199ed samples: drivers: crypto: Do not show colors in logs
Showing colors in logs make it harder to write test expectations.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-05 10:26:59 -04:00
Leandro Pereira cf3da3c6c4 samples: crypto: Ensure cap_flags is always initialized
Find the device and query its capabilities just once at boot, then
go through a list of tests to perform.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-05 10:26:59 -04:00
Leandro Pereira a026b9eaca tests: crypto: Fully initialize variables using named initializers
This should get rid of Valgrind warnings in #7478.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-05 10:26:59 -04:00
Leandro Pereira 9c113d29f5 samples: drivers: crypto: Print output length for all operations
Printing the output length for all encryption/decryption operation will
make it easier to know if a particular crypto driver shim provides this
information.  TinyCript and mbedTLS were not providing this, making the
out_len field useless.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-05-16 23:30:11 +03:00
Anas Nashif b3275d651c tests/samples: add hw dependencies
Add hardware dependencies and filters to make sure we do not explode if
for example we try to build a sample/test using rtc when the platform
does not support that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 19:10:27 -04:00
Henrik Brix Andersen 2d1c5241bf samples: flash_shell: Use correct flash write block size
Change the flash_shell sample from using FLASH_WRITE_BLOCK_SIZE
definition to using the flash_get_write_block_size() api for the
selected flash_device.

This fixes the flash_shell sample when using multiple flash devices
with different write block sizes.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-04-30 17:05:06 -04:00
Manivannan Sadhasivam 1572594b53 samples: drivers: Add sample application for LP3943
Add sample application for TI LP3943 LED driver. This application
displays a continuous pattern that turns on 16 LEDs at 1s one by
one until it reaches the end and turns off LEDs in reverse order.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-04-27 10:46:53 -05:00
Diego Sueiro 140daa2f27 sanitycheck: add min_flash option for 32K devices
Following tests were failing on a microcontroller with 32KB flash:
    test-mbedtls
    kernel.common

The min_flash option has been added in the test case yaml files.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-04-21 06:57:38 -07:00
Tomasz Bursztyka 3f4cffc302 spi: Remove SPI legacy API
No drivers nor samples are using it anymore.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 308f4df91d samples/drivers: Switch Fujistu FRAM sample to new SPI API
Replacing legacy API calls by news ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 324265420b api/spi: Disable legacy API by default
Let's start deprecation work of the SPI legacy API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Johan Hedberg dd9f5e2a1d samples: led_strip: Extend ws2812 sample with ws2812b_sw support
Add support for building the WS2812 LED strip driver sample against
the new ws2812b_sw driver. Currently a configuration is only provided
for the BBC micro:bit board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-03-03 20:46:53 +01:00
Alberto Escolar Piedras d118b6470e samples: drivers/entropy fixes
* .yaml: added expression for test
* README: Eeach second 9 bytes are generated not 10

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-23 07:34:07 -05:00
Leandro Pereira 2a98e7cfb4 samples: drivers: crypto: Print correct buffer comparison on failure
When testing whether the CTR mode decrypted the payload properly, a
comparison of `decrypt.out_buf` with the known plain text `plaintext`
is performed, but the buffer comparison that is printed uses
`plaintext` and `encrypt.out_buf` instead.

Coverity-CID: 181847

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-02-17 09:15:10 -05:00
Erwan Gouriou c734c2972f flash: remove obsolete FLASH_DRIVER_NAME
Replace seldom occurrences of FLASH_DRIVER_NAME by equivalent
and commonly used FLASH_DEV_NAME.

Fixes #5919.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-02-06 11:48:53 -06:00
David B. Kinder ec1b1df5ed doc: fix ReST heading underlines
The expected order for heading levels in our ReST documents is # for H1,
* for H2, = for H3, and - for H4.  Some documents snuck in without
following this guideline.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-01 19:33:39 -08:00
Maureen Helm 928ff12c73 samples: drivers: Add freedom boards to flash_shell sample
Adds frdm_k64f, frdm_kw41z, and frdm_kl25z boards to the flash_shell
sample.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 16:43:40 -06:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Anas Nashif 1a67aed51f samples: crypto: remove DEBUG/ASSERT from prj.conf
Those are added by sanitycheck, no need to have them enabled in the
project by default.

CONFIG_DEBUG is causing issues on qemu_nios2, see #5743.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5d3a534807 samples: use console harness for some samples
The output of those samples can be parsed and verified by sanitycheck,
so lets use the console harness for this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Andrzej Puzdrowski 9fdcab9b1b samples: drivers: soc_flash_nrf5 fix missing flash write access
By default CONFIG_MPU_ALLOW_FLASH_WRITE=n so the example must have been
falling on any write to flash.
This patch adds CONFIG_MPU_ALLOW_FLASH_WRITE=y to project configuration.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-19 11:47:43 -06:00
Yannis Damigos 3d1115adea tests: Clear SPI_*_IRQ_PRI from tests and samples
Remove SPI_*_IRQ_PRI from tests and samples.
Using DT to get the *_IRQ_PRI, we can't
override it using Kconfig.

If needed, use a BOARD_NAME.overlay file to
override default values.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Anas Nashif c3880c0db4 samples: crypto: increase min_ram for sample
This samples does not fit on platforms with 8k RAM, increase minimal
requirements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-13 10:48:36 -05:00
Anas Nashif c6d2ba996f samples: drivers: remove build_only flag
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 26ccc0bbcb samples: crypto: remove build_only and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 0d841cf0f2 samples: entropy: filter based on HW capabilities
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 4599bbff67 samples: watchdog: fix dependencies and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif d473d53da8 samples: rtc: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 7440a7ff23 tests: move aio sample to tests
This is clearly a test and not a sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Anas Nashif d55884a34d sample: crypto: also test mbedTLS config
expand testing to mbedTLS

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-16 05:48:16 -05:00
David B. Kinder be9ee06bd9 doc: fix misspellings in boards and samples docs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-15 12:59:22 -05:00
Carles Cufi 19d1e9afd1 samples: drivers: Convert doc to CMake
Convert doc of samples/drivers to CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-12 21:13:23 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Marti Bolivar 306c717b9e samples: drivers: add WS2812 sample application
This is similar to the LPD8806 sample, but uses the WS2812 driver
instead. The app configuration is a bit more finicky, so try to
provide helpful references. This could be made more beginner-friendly
with the addition of timing diagrams, etc., but this should be enough
for an experienced developer to use.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-28 13:23:30 -04:00
Marti Bolivar 3e674eac98 samples: drivers: add LPD8806 sample application
This sample displays the colors red, green, and blue on consecutive
LEDs in an LED strip, moving the starting point where red begins
further down the strip at each time step. The color band wraps around
to the beginning when it reaches the end.

Since this is the first application in samples/drivers to have
documentation, add samples/drivers/drivers.rst as well, and include it
in the top-level toctree from samples/samples.rst.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-28 13:23:30 -04:00
Adam Podogrocki 61467e019e iwdg: the sample of the use of STM32 Independent Watchdog
JIRA: ZEP-2347

Change-Id: I808e9f110681735cae45d14c5802636012f018cc
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-10-23 09:51:16 +02:00
David B. Kinder 4600c37ff1 doc: Fix misspellings in header/doxygen comments
Occasional scan for misspellings missed during PR reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-17 19:40:29 -04:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Andrzej Puzdrowski a568e1399f sample: drivers: soc_flash_nrf5: Test of write-block-size get API
Added example code of using the new API for retrieving write-block-size.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-10-11 11:19:15 -05:00
Marti Bolivar 1047be9dbe samples: flash_shell: update to keep up with flash driver changes
Keep the flash shell up to date with the latest flash driver updates.

- Get the driver name from soc.h
- Add a write_block_size command
- Implement flash_shell_page_layout() using flash_page_foreach()

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-06 22:12:23 -04:00
Marti Bolivar 219b3cd067 samples: drivers: add flash_shell
This is a simple shell module that allows arbitrary boards with flash
driver support to explore the flash device.

- Reading, erasing, and writing by device offsets are supported in all
  cases.

- If the flash page layout is available, it can be printed, and I/O
  can also be done to a specified page as well.

One known issue is that writing to flash on targets that require
doubleword-sized writes (e.g STM32L4) will fail since the number of
arguments required exceeds ARGC_MAX in shell.c. Addressing that is
left to future work.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-09-11 11:41:57 -04:00
Andrzej Puzdrowski 4255766ba7 samples: drivers: soc_flash_nrf5: Get flash page layout sample
Added sample code for testing and displaying the flash layout using
the recently introduced API.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-09-11 11:41:57 -04:00
Tomasz Bursztyka 087354019f samples/crypto: Add mbedtls shim driver support
Normalizing variables names and make sure tag handling behavior, which
might be different among backends, does not make the test failing.

Also, improving debug logs in case of error.

Change-Id: Ic317948aab459bfa75c9a72ac48cb2d12a0d0706
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-17 22:20:23 -04:00
Tomasz Bursztyka 422a769cc2 samples/crypto: Check error code everytime and improve logging
If the encryption/decryption failed there is no need to procceed
further.

Change-Id: If450e40ed6fd601b698b74c56ae21fc7f903d087
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-17 22:20:23 -04:00
Leandro Pereira d89e7e4e45 samples: drivers: gpio: Make the sample work with ESP32
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Erwin Rol 3ff4d7409f samples: random: Add sentinel to check for buffer overflows
Initialize the buffer to 0 and read one byte less than the
buffer size. The result should be that the last byte of
the buffer always stays 0. This way it is possible to verify
it the driver does not write outside the buffer.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-07 07:27:39 -05:00
Anas Nashif c364e06ccb tests: move spi test under tests/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Neil Armstrong 395daba0d4 samples/spi: Enable test on STM32 SoCs
Add support for the STM32 SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 394aa8127a samples/spi: Permit specifying low test frequency
The STM32 lower frequency is different, let us specify a different one.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 9eb865e03a samples/spi: Make async test optional
Handle the case when the async transceive call returns ENOTSUP.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Geoffrey Le Gourriérec 1975ce4f7c samples: gpio: Add support for SensorTag board.
Add extra #defines in samples/drivers/gpio to test
TI SensorTag board.

Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@smile.fr>
2017-06-16 16:18:12 -04:00
Tomasz Bursztyka cced7fd47a api/spi: Change transceive functions signature
Instead of NULL terminated buffer arrays, let's add a parameter for each
that tells the number of spi_buf in it.

It adds a little bit more complexity in driver's side (spi_context.h)
but not on user side (bufer one has to take care of providing the NULL
pointer at the end of the array, now he requires to give the count).

This will saves a significant amount of bytes in more complex setup than
the current dumb spi driver sample.

Fix and Use size_t everywhere (spi_context.h was using u32_t).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-06-01 10:49:30 -04:00