Commit graph

500 commits

Author SHA1 Message Date
Jun Yang 933d59ee3c samples/fs: support fs demo on mimxrt_1050 evk board
Add mimxrt_1050 evk board into white list.

FS demo Kconfig for mimxrt_1050 evk board.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00
Jun Yang c7e625f2b3 sdhc: rename disk_access_sdhc.c
The name disk_access_sdhc.c is ambiguous,

actually this driver depends on SPI,

rename this file.

In addition, move the generic sdhc stuff from C file

to head file for other sdhc drivers to use.

1) disk_access_sdhc.c->disk_access_spi_sdhc.c.

2) create .h and move sdhc specifications from .c to .h.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00
Andrei Emeltchenko 7cc57a1586 samples: usb: webusb: Remove dependence on GPIO
Remove old dependence.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-07-08 11:20:53 -07: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 5b0aa794b2 cleanup: include/: move misc/reboot.h to power/reboot.h
move misc/reboot.h to power/reboot.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 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 5d001f3e41 cleanup: include/: move misc/byteorder.h to sys/byteorder.h
move misc/byteorder.h to sys/byteorder.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 7435e5e089 cleanup: include/: move ring_buffer.h to sys/ring_buffer.h
move ring_buffer.h to sys/ring_buffer.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 d1b2718687 cleanup: include/: move uart.h to drivers/uart.h
move uart.h to drivers/uart.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 6524925753 cleanup: include/: move ipm.h to drivers/ipm.h
move ipm.h to drivers/ipm.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 f641d099cc cleanup: include/: move disk_access.h to disk/disk_access.h
move disk_access.h to disk/disk_access.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 52e0efac97 cleanup: include/: move stats.h to stats/stats.h
move stats.h to stats/stats.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 f048792888 cleanup: include/: move nvs/nvs.h to fs/nvs.h
move nvs/nvs.h to fs/nvs.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 656f4dfdac cleanup: include/: move fs.h to fs/fs.h
move fs.h to fs/fs.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 169589221d cleanup: include/: move console.h to console/console.h
move console.h to console/console.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
Johann Fischer abaeaed2af usb: sort usb config data by section
USBD_CFG_DATA_DEFINE macro has not consider that a class
could have more than one set of usb_cfg_data struct.
If a class has more than one set of usb_cfg_data
then they should be sorted the same way like by
USBD_DEVICE_DESCR_DEFINE macro.

Fixes: #16240

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-06-27 12:18:05 +02:00
Andrzej Głąbek 036791364c usb: kconfig: nrf52840: Enable REMOTE_WAKEUP option only when needed
This patch removes the "hard" selection of the USB_DEVICE_REMOTE_WAKEUP
Kconfig option for USB devices made on the nRF52840 SoC. Now it's up to
the application to decide if it wants to enable the option. This change
makes it possible to pass the USB3CV Chapter 9 Tests for applications
that don't use the remote wakeup feature, since when a USB device only
reports that it supports this feature, and the mentioned option makes
it to do so, one of the test cases expects the USB device to actually
perform the remote wakeup. And when the feature is not reported as
supported, the test case is skipped.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-06-27 12:17:45 +02:00
Andy Ross 42d8936f4d samples/subsys/usb/dfu: Set sanitycheck test to build_only
This sample has to be operated manually (it's a USB DFU implementation
that needs to be plugged into a host to validate).  Sanitycheck is
failing right now becuase it tries to flash and run it, and doesn't
see a harness declaration.

Set it to build_only when run under sanitycheck.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-06-19 14:37:20 -04:00
Andy Ross 3cea065954 samples/subsys/power/device_pm: Add test harness integration
Right now this fails needlessly under sanitycheck for lack of a
harness declaration.  It's short, just stuff in a simple regex check.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-06-19 14:37:20 -04:00
Ulf Magnusson eba81c6e54 yaml: Remove redundant document separators
YAML document separators are needed e.g. when doing

  $ cat doc1.yaml doc2.yaml | <parser>

For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.

Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).

The replacement was done with

    $ git ls-files '*.yaml' | \
        xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'

First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.

Some redundant blank lines at the end of files were cleared with

    $ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'

This is more about making sure people can understand why every part of a
binding is there than about removing some text.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-19 10:40:10 +02:00
David B. Kinder 6b2cd29223 doc: fix misspellings in documentation
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 15:08:19 -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
Jan Van Winkel 265b195369 samples: fs: Added FS shell sample
Added file system shell sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-06-11 08:31:54 -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
Andrei Emeltchenko df2bb46497 usb: console: Initialize USB console after USB Device stack
It does make sense to initialize USB console after USB Device stack.
Note that the value is selected only if we specify USB_UART_CONSOLE
in prj.conf, not in menuconfig afterwards.

Fixes #16518

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-06-05 11:44:17 +02:00
Luiz Augusto von Dentz b65fe62719 Bluetooth: Add possibility to pass a user_data to conn_tx_cb_t
This allows setting a custom pointer to be passed back to the complete
callback at expense of increasing the buffers in 4 bytes.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Andrei Emeltchenko 3f13079a7c samples: usb: hid: Fix harness configuration
Fix configuration indicating changes in USB device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko 1b64e53aeb samples: usb: webusb: Use Automatic endpoint assignments
Use endpoint index since addresses are automatically assigned.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko 3d58abf68b samples: usb: webusb: Use new descriptor placement API
Simplify code using new descriptor API and remove old composite
initialization.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko 3880a42375 usb: Align legacy and composite interface
Remove duplicated execution path for composite configuration, USB
device stack initialization is done inside stack for both cases.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Aurelien Jarno 819e749ccd usb: move the request handler buffer to the USB device code
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko 9f2ddc9f8e usb: webusb: Trivial syntax fix
Fix supended -> suspended.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-22 11:19:49 +02:00
Andrei Emeltchenko b364b841cc usb: webusb: Fix callback not called
Until PR #15818 is applied we need to use this solution to get
callback called.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-16 07:17:50 -05:00
Karl Zhang d75f3cede8 sample: mhu: IPM MHU dual core on V2M Musca
Sample walk through:
    1. CPU 0 will wake up CPU 1 after initialization
    2. CPU 1 will send to CPU 0 an interrupt over MHU0
    3. CPU 0 return the same to CPU 1 when received MHU0 interrupt
    4. Test done when CPU 1 received MHU0 interrupt

The wake up second core and private core ID are soc specific.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-05-15 15:37:50 -05:00
Marcin Szymczyk a30950c64b usb: cdc: add .inf file
Added .inf driver file for Windows.
CDC examples will now work on Windows.

Note:
This .inf is not signed and may cause problems during installation.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-05-09 08:20:34 -04:00
Marcin Szymczyk e5cbe6a9e7 usb: cdc: Add unique PIDs for each sample
Unique PID is required for each sample in order
to be recognized by host.

When creating a new sample:
- Add USB_PID_<SAMPLE_NAME>_SAMPLE
  in samples/subsys/usb/usb_pid.Kconfig
- Create Kconfig file in your sample's subdirectory, containing:
  config USB_DEVICE_PID
	default USB_PID_<SAMPLE_NAME>_SAMPLE

  source "Kconfig.zephyr"

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-05-09 08:20:34 -04:00
Andrei Emeltchenko 88145db607 samples: usb: cdc_acm_composite: Refactor sample
Use ring buffer and logger.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-07 23:11:44 -04:00
Andrei Emeltchenko 0e57e4fb78 samples: usb: cdc_acm: Update CDC ACM echo sample
Update CDC ACM sample using ring buffer and fifo_fill / fifo_read
functions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-07 23:11:44 -04:00
Andrei Emeltchenko f4ff72bbd3 usb: webusb: Add more log output
Add log prints for special requests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Andrei Emeltchenko b0373fbd07 usb: webusb: Fix payload for vendor requests
Fixes payload and simplifies code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Andrei Emeltchenko 87b3c63114 usb: webusb: Remove unneeded headers
Remove unneeded headers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Andrei Emeltchenko bc05efacbf usb: webusb: Fix logging for webusb
Replace LOG_MODULE_DECLARE with LOG_MODULE_REGISTER and update default
log level.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Andrei Emeltchenko 34a2b4011d usb: webusb: Update license header
Update license header to standard Zephyr.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Andrei Emeltchenko dac83213f4 usb: webusb: Strip 'serial' from names
Since we have remove CDC ACM logic from webusb strip also serial from
function names.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-06 11:18:34 +02:00
Marcin Szymczyk be1ec7822c usb: samples: mass: add configuration and fs for FLASH
Adds required Kconfig options for flash driver.
Adds FatFS filesystem for flash disk.
Fixes #14459.

Note: As USB MSC does not support multiple disks (see #14937),
only one (flash by default, modify CONFIG_MASS_STORAGE_DISK_NAME
to "RAM" for RAM disk) will appear to host.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-05-06 11:05:04 +02:00
Andrei Emeltchenko da701f9d55 samples: hid-cdc: Update USB device names and project conf
Update project configuration and USB HID and CDC ACM device names for
sample hid-cdc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko 995b568b14 samples: cdc_acm: Update CDC ACM Device name
Update device name for USB CDC ACM.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko 1b3227fd99 samples: usb: Correct USB HID device name
Use "HID_0" as a device name since we have only device count now.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko e952033559 samples: usb: mass: Add whitelist mass storage on ram
To support mass storage over USB in RAM we need a board with
sufficient RAM. Fix failing tests for boards with low memory.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko 4f2674f164 samples: usb: Add depends_on gpio
Add gpio dependence, fixing build for native_posix.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko 69726bbccb usb: tests: Enable other boards for test
Enable other boards with USB device supported

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko 35a81562e8 samples: usb: hid: Enable harness for the sample
Enable harness so we can execute smoke tests on the hardware with
command line:
sanitycheck --device-testing --device-serial /dev/ttyACM0 -p <BOARD>
  -T samples/subsys/usb/hid

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Johann Fischer bf71aee8e4 samples: cdc_acm: add config overlay for cdc_acm+dfu
Add config overlay for cdc_acm+dfu composite configuration.
Manual configuration over menuconfig may be error-prone for
the user because then FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE
should also to be set to appropriate values.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-16 08:55:51 -04:00
Johann Fischer c13e201b18 usb: replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS
Replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-11 13:35:24 -04:00
Aaron Tsui 5922be2ed6 samples: subsys: logging Remove repetitive code.
Remove repetitive code

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-04-10 13:51:38 +02:00
Aaron Tsui 1c742a9756 doc: subsys: logging Update documentation
Update documentation.

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-04-10 13:51:38 +02: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
Andrei Emeltchenko 721f3d1cd0 usb: Refactor USB status callback
Merge cb_usb_status_composite and cb_usb_status and use common
forward_status_cb for both composite and normal devices.

Fixes #14882

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02: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 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
Krzysztof Chruscinski fdc1ee59d8 sample: subsys: logging: Ensure that logger RTT backend is tested
Logger RTT backend should be compiled on the boards that have RTT.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Krzysztof Chruscinski 8dd015f49e sample: subsys: shell: Ensure that shell RTT backend is tested
Shell RTT backend should be compiled on the boards that have RTT.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-28 08:41:28 -05:00
Andrei Emeltchenko 972221423c samples: usb: console: Select console device name
Instead of relying on overlays which requires to write overlay for
every board (100+) define console device name.

Fixes #14698

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-03-25 12:03:15 +01:00
Andrei Emeltchenko 7ecd8d2ff3 samples: usb: cdc_acm_composite: Fix missing irq handling
If there are several queued interrupts we can miss some of them. Use
while() loop to catch them all.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-03-25 12:03:15 +01:00
Flavio Ceolin ef0417fa6d samples: ipc: openamp: Avoid dead code
Checking the return of metal_init to avoid having dead code.

Coverity CID: 190932

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-23 09:52:51 -05:00
Johann Fischer 5ed4b6a334 samples: usb_dfu: update application signing in README.rst
Update application signing example in README.rst.

resolves: #14510

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-03-15 05:58:07 +01:00
David B. Kinder 6000a6205a doc: prepare for improving doc API linking
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all".  This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.

This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Ramakrishna Pallala d910aa6029 samples: power: Add test for device Idle PM
Added test for Device Idle Power Management to invoke
device_pm_get/put API's.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2019-03-14 14:26:15 +01:00
Marcin Szymczyk c8dfdb63f9 usb: samples: mass: add warning for no conf and nrf52840 conf
Added a warning that will abort build without disks.
Added a default configuration for nrf52840_pca10056.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-03-13 05:48:35 -05: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
Marcin Szymczyk 6983645552 usb: add hid-cdc example
This example combines 2 HID classes and 2 CDC ACM classes to create
a composite, multi-instance device.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-03-05 09:35:26 +01:00
Anas Nashif 5cf49956e7 logging: add backend for xtensa simulator
Add backend for the xtensa simulator.

Fixes #10164

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 10:35:07 -05:00
Kumar Gala 9fa8674239 samples: fs: Fix possible integer overflow
We are doing math of two 32-bit numbers and assigning into a 64-bit
result.  Add explicit cast of one of the values being multipled to get
explicit promotion.

Fixes: #13883
Coverity CID: 190930

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-02 17:38:23 +01:00
Kumar Gala 11b3dce674 samples: ipc: openamp: Fix missed return error check
The return from ipm_set_enabled wasn't assigned to 'status' so the check
right after the call to ipm_set_enabled() wasn't doing the right thing.

Fixes: #13881
Coverity CID: 190932

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-02 17:38:23 +01:00
Paweł Zadrożniak aa4c30c3e9 samples: usb: hid: remote wakeup in HID mouse example
Added support for remote wakeup in hid_mouse example.
If rempote wakeup support is enabled, wakeup request
is performed on every button click when the bus in suspended state.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2019-02-27 10:37:16 +01:00
Laczen JMS 68ea30c123 fs/nvs: Improve init speed and remove fs->locked
This patch removes the free space calculation from nvs initialization.
The available space can be calculated if required using the routine
nvs_calc_free_space.

This patch also removes the locked state of nvs, it is not possible to
get in a locked state.

This patch adds an extra check on the sector_size configuration and only
allows operation on nvs when nvs has been initialized.

This patch also solves issue #13369, the usage of FLASH_ERASE_BLOCK_SIZE
has been replaced with the flash page api.

Changes:

Removed locked state and free_space from the nvs structure.

nvs_reinit(): has been replaced with by an internal only function
_nvs_startup().

nvs_write(): removed the possibility to place the file system in a
locked state, if to many gc operations are required it will return
-ENOSPC.

ssize_t nvs_calc_free_space(): introduced, calculates the free space
that is available in the nvs file system.

Removed define LOG_LEVEL.

Rebased to current master.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-02-21 09:32:52 -05:00
Andrzej Puzdrowski 662b44e357 sample/subsys/usb/dfu: correction to documentation
Reverted unwanted documentation change on usb dfu sample.
Changes was introduce accidentally within PR #13475

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-02-20 19:43:43 -05:00
Krzysztof Chruscinski a64b0fe1e3 shell: Deprecate macros for subcommands creation
Macros are replaced by C++ friendly versions:
- SHELL_CREATE_STATIC_SUBCMD_SET by SHELL_STATIC_SUBCMD_SET_CREATE
- SHELL_CREATE_DYNAMIC_CMD by SHELL_DYNAMIC_CMD_CREATE

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-20 07:31:35 -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
Erwan Gouriou 1b7b384639 samples/subsys/nvs: Fix typo in samples description.
Typo fix.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Anas Nashif 996c252e51 dfu: mcuboot: rename boot_swap_type> mcuboot_swap_type
This function conflicts with a function of the same name in mcuboot.
This happens when building USB DFU support into mcuboot.

DFU over USB uses image manager and mcuboot internals to manage images
downloaded to the device.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-19 09:32:02 +01:00
Erwan Gouriou 70e223a5b9 samples/subsys/nvs: Add a clean test termination
If nvs sample is run once until max reboot value, the next time it is is
ran on the same board, it will not behave as expected as code will
read reboot counter set to max value and will stop there.
In order to avoid the operation to wipe the flash manually between
2 runs of the test, add a clean termination to the test by resetting
the reboot counter before exiting.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-12 20:16:22 -05:00
Kumar Gala b813ae2b54 samples: subsys: nvs: Convert FLASH_ERASE_BLOCK_SIZE to DT_
Use DT_FLASH_ERASE_BLOCK_SIZE prefixed defined instead of
FLASH_ERASE_BLOCK_SIZE as the non-DT version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala dc0ad52320 samples: nvs: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala 4433041da4 samples: subsys: ipm_mcux: Convert to use DT_ prefixed defines
The code has been using non DT_ prefixed defines for DT generated
defines.  Switch to use DT_ prefixed ones as we want to deprecated
the non DT_ prefixed defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 16:03:17 -06:00
Jakub Rzeszutko 090ef041e8 shell: improved shell_prompt_change function
Shell will store only pointer to the prompt string instead of
copying it to the RAM buffer. It will save RAM memory and
it will simplify implementation of a  new feature: "select"
command. When a command will be selected than shell will
display command syntax as a prompt.

Removed obsolete ASSERT check in a static function.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-02-08 14:51:52 -05:00
Andrei Emeltchenko 1e9235259a samples: cdc_acm_composite: Add README documentation
Add README describing the sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko d1f84ea781 samples: cdc_acm: Add composite CDC ACM sample
Add sample creating 2 serial USB ports and establishing communication
between those 2 ports.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko bf0a4a8cfb samples: usb: Update samples for new port name
Use new multi instance interface and new port names.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko 0ccc28c4a8 samples: hid-mouse: Refactor and use new HID Device interface
Refactor of hid-mouse and using new HID Device interface.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko 6cf619f549 samples: hid: Use HID Device interface for samples
Use new HID Device interface for HID sample

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko 6aefb16964 usb: cdc_acm: Add menuconfig option for multiple instances
Add menuconfig option to select another instance of CDC ACM device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
David B. Kinder c1dce2f799 doc: fix misspellings in docs
Fix misspellings missed in regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-07 22:06:14 -05:00
Tavish Naruka 0f3bd0f43b samples: subsys: Filesystem API sample with SDHC
Added sample to show disk access and FS api with
Fat filesystem and SDHC driver. Tested working with
nrf52840 (blip).

Signed-off-by: Tavish Naruka <docuser@docs.electronut.in>
2019-02-06 21:42:37 -05:00
Andrei Emeltchenko ebc79e429e samples: cdc_acm: Add composite test configuration
Add section for build sanity check configuration with
CONFIG_USB_COMPOSITE_DEVICE enabled.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-05 11:08:24 -05:00
Andrei Emeltchenko 95df9ffdfd sample: cdc_acm: Add overlay configuration for composite device
Add configuration for creating composite USB device with CDC ACM and
Mass Storage functions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-05 11:08:24 -05:00
Andrei Emeltchenko 0f419f3c3f samples: cdc_acm: Remove unneeded config options
Cleanup prj.conf

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-05 11:08:24 -05:00
Jakub Rzeszutko fe497cc4ca shell: update shell_uart backend test condition
New shell does not need either CONFIG_UART_CONSOLE
or interrupts support to be working. Only CONFIG_SERIAL
in combination with CONFIG_UART_SHELL_ON_DEV_NAME are required.
Updated sample yaml file accordingly.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-02-05 16:23:33 +01:00
Jakub Rzeszutko 70a6d7850d shell: add RTT backend to CI tests
Adding shell_rtt.c to sanity check - related to issue #12860.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-02-05 16:23:33 +01:00
Anas Nashif 4d93a9797f doc: changed structure and layout
Move to the new structure with both:

 - API Reference
 - User and Developer Guides

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif 63260bf6cf drivers: gpio: enable gpio_shell in board_shell
Enable the GPIO shell in board_shell rathe the shell sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-04 17:55:40 -05:00
Ole Sæther 634a7d0c54 samples: smp_svr: Surrounding BLE code with #ifdefs
Surrounding BLE code with #ifdefs to make sample build
on devices that don't have BLE.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2019-02-01 19:09:46 -05:00
Piotr Zięcik 1ef5ad1883 samples: power: power_mgr: Remove redundant test
The removed test does the same thing and runs on the same platforms
as already existing samples/boards/nrf52/power_mgr.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-01-31 17:39:27 +01:00
Kumar Gala e2b62b411b samples: openamp: Update sample to OpenAMP v2018.10 release
The v2018.10 release of OpenAMP reworks the API set and splits the
remoteproc vs rpmsg interfaces so one can use rpmsg without remoteproc.

This helps drastically reduce the code footprint utilized by OpenAMP.
The remote see around 4k reduction in code size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-30 15:55:47 -06:00
Jakub Rzeszutko 75ad61f7ef shell: removed foreground command functionality
Removed foreground command functionality from shell source files.
Removed associated example.
Removed enter/exit command functions from the Bluetooth example
Updated project config files.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-30 13:05:56 +01:00
Yannis Damigos a756cdeeb8 samples: cdc_acm: Remove redundant inclusion
Remove redundant inclusion of stdio.h

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-01-29 17:40:50 +01:00
Jakub Rzeszutko fd0b7f7767 shell: removing legacy shell
Legacy shell removed in order to avoid maintaining two shells
systems.

All examples and tests have been migrated to the new shell.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-16 21:35:36 -05:00
Adithya Baglody 25572f3b85 tests: Dont run coverage for select test cases.
Disabled the CONFIG_COVERAGE for benchmarks and other tests.
This is needed because it interferes with normal behavior of the
test case.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-16 06:12:33 -05: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
Marcin Szymczyk c716f9c5aa usb: hid: macro for report descriptor
Added macro that generates simple report descriptor for mouse.
This improves the readability of hid-mouse sample.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-01-10 08:58:31 -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
Savinay Dharmappa f0c5470671 samples: subsys: usb: dfu: Add intel_s1000 to platform_whitelist
add intel_s1000 to platform_whitelist

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-12-30 16:24:33 -05:00
Anas Nashif 74a74bb6b8 power: rename api sys_soc -> sys_
sys_soc is just redundant, just call APIs with sys_*.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-28 16:16:28 -05:00
Anas Nashif 9151fbebf2 power: rename APIs and removing leading _
Remove leading underscore from PM APIs. _ was used for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-28 16:16:28 -05:00
Krzysztof Chruscinski 49bf4300bc samples: subsys: shell: Add foreground command example
Exteneded shell sample with example how to use shell_fprintf from
any context with 'foreground' command.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-28 10:42:06 -05:00
Marcin Szymczyk 801b54edb9 usb: hid: boot protocol
Set_Protocol and Get_Protocol requests are handled now.
Tested with USB3CV.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-19 07:36:18 -06:00
Marcin Szymczyk b0bdc8a4bc samples: usb: hid-mouse: remove get_report_cb
Removed get_report_cb as it was an incorrect implementation
of Get_Report request. Correct response would be returning
current report value, not report descriptor.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-17 11:27:14 +01:00
Marcin Szymczyk 63558efddb samples: usb: hid-mouse: multiple buttons
Added right button, X and Y axis movement to HID mouse example.
Enabled only if board has enough buttons.
Added LED toggling notification when report is sent.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-14 13:17:52 +01:00
Marcin Szymczyk d356977591 samples: usb: hid-mouse: type change
Change def_val, cur_val and status type from int to u32_t, u32_t
and u8_t.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-14 13:17:52 +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 e0be6a10b3 shell: printing command's help by shell engine
Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.

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
Paul Sokolovsky 1ef52f5c30 samples: console: echo: Be sure to print (both) CR LF in messages
As it stands now, the console effectively works in raw mode, so all
messages should end with "\r\n". This was missed previously, because
the sample was run in QEMU, on top of POSIX cooked console. Running
on real hardware showed this issue.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-12-05 08:54:20 -05: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
Marcin Szymczyk d5b79ff42c usb: hid: implement idle rate
Idle rate functionality has been implemented for HID USB class.
Bassed on Device Class Definition for Human Interface Devices 1.11.
Tested with USB3CV and host with idle rate.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-04 15:58:19 -05:00
Marcin Szymczyk 6a4ddffaf9 usb: hid: default request handlers
HID class now defaults to universal request callbacks in case they
are not provided by the application. This applies to following,
class-specific requests: Get_Report, Set_Report, Get_Idle, Set_Idle,
Get_Protocol and Set_Protocol.
Tested with USB3CV.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-12-04 15:58:19 -05:00
Marcin Szymczyk e4c447aac3 usb: add SoF event
Start of Frame events can now be accessed from USB classes.
This will be useful when implementing idle rate functionality.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2018-11-23 09:18:41 -05:00
Piotr Mienkowski 970aef2905 kernel: ensure System Power Managment enables Tickless Idle.
System Power Management is only supported in Tickless Idle mode.
This patch modifies Kconfig dependencies to ensure System Power
Management option selects Tickless Idle one.

Fixes: #11046

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-11-21 23:16:35 -05:00
Andrei Emeltchenko 240b25e5da usb: testusb: Add README to the sample
The readme mostly combined from the PR #7435

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-21 18:04:32 -05:00
Andrei Emeltchenko 971be35528 usb: console: Notify user about incorrect configuration
Since setting USB console port name is moved to DTS users have
problems enabling it. Notify user that the console is not set.

Fixes #10693

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-21 09:38:15 -05:00
Tom Burdick 4619f8f114 samples: usb: Fixes usb/console sample for nrf52840
Adds the virtualcom device to the nrf52840 SoC dts and adds a board
specific nrf52840_overlay.dts file, copied exactly from the
arduino101_overlay.dts file, to set the console device name
appropriately for the subsys/usb/console sample project.

There were no clear alternatives to add a usb_cdc: virtualcom device to
all known SoC devices with USB support as should probably happen.

There was also no clear alternatives to add a non-board specific overlay
to the example.

This fixes a specific problem with the nrf52840-dk board for this sample
project.

Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2018-11-21 06:19:32 -06:00
Diego Sueiro 27a237f66f samples/ipm_imx: Add i.MX7 boards to platform_whitelist
Adds colibri_imx7d_m4 and warp7_m4 to platform_whitelist for the
ipm_imx sample.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-11-21 04:03:59 -06:00
Stanislav Poboril 7ca69b385d sample: Add IMX IPM sample application
Add IMX IPM sample application. It reads the data sent to the
Messaging Unit and sends them back. It has been tested on Udoo Neo Full
board with the Cortex-A9 core running Linux and sending the data
into the Messaging Unit A and the Cortex-M4 running this sample Zephyr
application and reading the data from Messaging Unit B and sending it
back for Linux side to read it from Messaging Unit A.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2018-11-19 08:38:38 -06:00
Paul Sokolovsky 325954de8f samples: console: echo: Test output-only mode too
We have cases with UART drivers where TX interrupt handling is not
bootstrapped properly on enabling them. To make such cases more
obvious, start this sample with console_write(), the output of which
wouldn't appear if that's the case. (Of course, the sample starts
with printk() exlaining what may happpen.)

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-11-16 11:48:06 -06:00
Radoslaw Koppel 9a1e7d06b0 samples: subsys: usb: hid-mouse: Align report descriptor
This commit fix the alignment of the report descriptor
to make it easier to read.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2018-11-14 08:53:55 -05:00
Radoslaw Koppel f9be2c563d samples: subsys: usb: hid-mouse: Activate pull on switch pin
This commit would add the pull-up or pull-down on the switch pin and
makes it functional on the board where there is no external pull-up.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2018-11-14 08:53:55 -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
Krzysztof Chruscinski 6d1a31b3fc logging: Add uart backend dependency to shell uart backend
If shell UART backend was enabled and logger uart backend was
not explicitly disabled then both were used resulting in logs
being printed twice on terminal.

Patch modifies default state of log uart backend to depend on
state of shell uart backend.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-13 09:17:05 -05:00
Krzysztof Chruscinski 5e346812ac logging: Refactor LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros
Changed LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros to take log
level as optional parameter. LOG_MODULE_DECLARE can now also be used
in static inline functions in headers. Added LOG_LEVEL_SET macro
which is used when instance logging API is used to indicate maximal
log level compiled into the file.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-10 12:38:29 -05: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
Andrei Emeltchenko 92c7ab74c0 usb: logs: Rename USB_DBG to LOG_DBG
Since logger is now suitable for our logs use it directly.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-08 08:35:20 -05:00
Jakub Rzeszutko 59c23b11ff shell: wildcard active by default
Wildcard plugin is active by default.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-06 17:12:41 -05:00
Anas Nashif 8d138ede02 boards: dts: define default console only
When using USB CDC, set that via an overlay instead of in the board DTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 12:07:30 -06:00
Aurelien Jarno e8a59728e1 samples: usb: mass: rewrite documentation
The USB mass storage documentation was completely outdated. Rewrite it
using reStructuredText, and mentioning the two possible overlays.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-02 12:08:53 -04:00
Kumar Gala 856decf2f7 samples: Remove board.h include
Remove including board.h from samples that don't need it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-01 13:15:18 +01:00
Aurelien Jarno af2ed46775 samples: usb: hid-mouse: enable CONFIG_GPIO
The HID mouse sample uses the GPIO to read the state of a button, but
does not enable CONFIG_GPIO, causing the example to fail. Fix that.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-01 06:59:03 -05:00
Sebastian Bøe f2b9cc62bb cmake: ipc: Fix ipm_mcux sample
Stop specifying that the 'remote' app should use the same board as the
root app.

Also, add assertions to make sure that the user does not try to
override the board that is specified in the app build scripts.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-29 14:14:00 -04:00
Sebastian Bøe b3d77a0c62 cmake: openamp: Fix OpenAMP sample
Stop specifying that the OpenAMP 'remote' app should use the same
board as the root app.

Also, add assertions to make sure that the user does not try to
override the board's that are specified in the app build scripts.

This fixes #10345

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-29 14:14:00 -04: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 8eff21a8dd drivers: gpio: add shell for controlling GPIO
Provide basic commands for configuring/setting/reading GPIO ports.

> gpio conf ..
> gpio set ..
> gpio get ..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-18 10:15:50 -04:00
Anas Nashif 79f434273e shell: kernel: list configured devices
Very simple command to list configured devices and their priorities.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-18 10:15:50 -04:00
Ajay Kishore 9e7f2940ff samples: USB mass storage sample.yaml cleanup
Add console harness support for USB mass storage test.
Also, using overlay config for DISK_ACCESS configuration
and accessing the different config file with different
method.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 17:32:25 -04: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
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
Anas Nashif 5f74f142a9 samples: usb: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Anas Nashif 7853c32b81 samples: dfu: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04: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
Andrei Emeltchenko 47be332b79 samples: hid: Use new logger
Use new USB logger with function names.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 1eb6a01723 usb: Use const for status_callback parameter
usb_dc_status_callback() parameters are interface or configuration
numbers and should be const.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 24b5775fd1 samples: hid: Use delayed work for report send
Delegate report sending to delayed work.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 245b267f1a samples: hid: Make callbacks static
Make callbacks static according to standards.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 5534a58e66 samples: hid-mouse: Trivial README correct
Correct title marking.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 61349e3157 samples: hid: Add README for the sample
Describe building and testing of the sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04:00
Andrei Emeltchenko 9047e8eec0 samples: hid: Refactor basic HID sample
Refactor USB writes, start transfer only when device
is configured, the change makes it possible to work with native_posix
USB virtual controller.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-10 09:21:55 -04: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
Anas Nashif 12984c6d1f subsys: nvs: move to new logger
Move to new logger and update all related samples and configs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Yannis Damigos d1a655a624 subsys/usb: Move to new logger subsystem
Move to new logger subsystem.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-10-08 12:54:57 -04:00
Yannis Damigos 1674d061b6 drivers: usb: device: Migrate to new logger
Move to new logger subsystem.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-10-08 12:54:57 -04:00
Anas Nashif 4402c4b057 samples: logger: exclude qemu_xtensa [REVERTME]
The way uart console is setup for this is not compatible with the logger
and needs additional changes, excluding until we have this implemented
in a generic way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-05 10:09:08 -04:00
Anas Nashif 771b4defad samples: logger: test sample in CI
Add test stub for this sample to verify it in CI on default platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-05 10:09:08 -04:00
Jakub Rzeszutko bc6da1c34a shell: Enable backends via Kconfig file
Added functionality to enable active shell backends via Kconfig
file. When there will be more backends implemented user will
have an option to select only required ones.

It is no longer needed to select SERIAL in prj.conf.

Fixes #10190

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-05 10:04:44 +02:00
Sebastian Bøe 8c791a999e cmake: openamp: Fixed a bug where the wrong BOARD was set
Fixed a bug in the OpenAMP sample's recursive build scripts, where it
would pass on the wrong board to it's second CMake invocation.

This fixes #10345

Fixed the same bug in ipm_mcux.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-03 08:24:46 -05:00
Jakub Rzeszutko c471614cb6 subsys: shell: fix accept either CR or LF as as line delimiter
1. Shell will accept CR or LF as line delimiter.
2. Macro SHELL_DEFINE simplified - it no longer requires
   new line character.
3. Fixes: #10207.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-02 11:55:47 -07:00
Jakub Rzeszutko 0eea1ef212 subsys: shell: add int ret_val to command handlers
1. Command handler can return command exectution status as int.
2. Existing command handlers rework.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-02 14:44:25 +02:00
Krzysztof Chruscinski a15438e8f5 logging: add mechanism for handling transient strings
Extending logger to support logging transient strings (with %s).
With dedicated call (log_strdup), string is duplicated to a buffer
from internal logger pool. Logger implicitly manages the pool.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-01 15:26:14 -04:00
Alberto Escolar Piedras 3e41ac5f04 subsys: shell: Add missing dependency to SERIAL
The shell subsystem, as it is today, depends on having a UART,
therefore let's add the dependency explicitly in its Kconfig

Fixes #10190

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-09-27 17:24:34 +02:00
Anas Nashif 6d3fb8b4cf shell: kernel: add more thread data to threads command
Show thread and stack data all under one command and reformat output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-27 08:58:55 +05:30
Anas Nashif 46f7cd51dd shell: kernel: print thread name
Use new kernel API to display thread name when listing threads.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-27 08:58:55 +05:30
Anas Nashif b3829adc78 samples: shell: enable kernel shell
Enable kernel shell and adapt test data and remove limited whitelisting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-23 11:43:33 -04: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
Ramakrishna Pallala 7e273b28c8 samples: subsys: power_mgr: Add changes as per PM policy Kconfig
Enable the CPU Residency based PM policy Kconfig option for
the sample application.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-09-20 10:20:23 -04:00
Krzysztof Chruscinski ba808d789e samples: subsys: shell: Port sample to new shell subsystem
Ported shell sample to use new shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-19 09:30:29 -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
Anas Nashif 006ca97006 samples: openamp: build with ninja
Fixed building with ninja adding BUILD_BYPRODUCTS based on suggestion
from @SebastianBoe in issue #7760.

Fixes #7760

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-18 23:14:38 -04:00
Alberto Escolar Piedras 169cab0902 sample: subys: logging: fix for posix arch
In the POSIX arch, time does not pass inside infinite loops.
=> Add a small delay in each iteration of those loops
when compiled for it.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-09-18 14:56:10 +02:00
Aurelien Jarno 8ec537dc40 samples: nvs: improve one output message, fix another one
Fix the Id of the longarray message.

Also change the display of the "Address" entry to use "Id" instead of
"Entry" to be consistent the other displayed entries.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-09-17 07:54:35 -04:00
Flavio Ceolin da49f2e440 coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.

The only directory excluded directory was ext/* since it contains
only imported code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Krzysztof Chruscinski 4add83c5e2 samples: subsys: logging: example of kconfig.log_template usage
Logger sample extended to use template for configuration of
sample module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-14 12:32:56 -04:00
Daniel Leung 7a1ec635d0 doc: convert internal http links to references
This converts the http links within the Zephyr document
into references. This allows the links within the PDF file
to jump to the correct sections instead of going to
the Internet.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Kumar Gala 4fede8dd0b log: make name param explicit
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-11 13:25:55 -05:00
Maureen Helm 7976d2b564 samples: nvs: Use flash erase block size from dts
The nvs sample assumed a 1 KB flash erase block size, which caused the
sample to fail on frdm_k64f because its erase block size is 4 KB. Get
the erase block size from dts instead.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-08-27 12:49:32 -04:00
Maureen Helm 9039d6fd6e samples: nvs: Use depends_on to select platforms
Removes the platform whitelist, leaving just the depends_on/supported
pattern to select which platforms the sample can run on.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-08-25 07:13:56 -07:00