Commit graph

4999 commits

Author SHA1 Message Date
Michael Scott 3e24eb8af1 samples: net: mqtt_publisher: handle EAGAIN from mqtt_live()
Now that mqtt_live() can send an EAGAIN message meaning: no ping
was generated, let's handle that in process_mqtt_and_sleep() by
skipping the call to mqtt_input() since no data will be expected.

Signed-off-by: Michael Scott <mike@foundries.io>
2020-01-28 15:45:08 -05:00
Henrik Brix Andersen c894a6db4d drivers: counter: add counter_get_value(), deprecate counter_read()
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.

Update all drivers and calling code to match the new counter API.

The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).

Fixes #21846.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-28 12:52:46 -05:00
Jukka Rissanen 748eb99646 samples: net: websocket: Verify the received data properly
Make sure that we do not calculate terminating \n when comparing
the received data to sent data because the \n is not part of
the lorem_ipsum buffer.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-28 19:49:16 +02:00
Anas Nashif d55a09ff05 samples: shared_mem: exclude qemu_x86_64
This sample keeps failing in CI due to some SMP issues currently being
addressed. Exclude until we have a fix.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-28 10:38:10 -05:00
Anas Nashif 132fcd0eaa samples: remove extra colon from test identifier
Fix bad yaml syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-28 10:38:10 -05:00
Flavio Ceolin d337f3bab3 tests: tags: Add entropy and random tags
Add these new two tags to tests that exercise these features.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-01-28 09:37:51 -05:00
Patrik Flykt 10fb64f4dc samples: net: Create sample app for GSM modems
Sample app compiled with the GSM modem driver enabling PPP.

This sample was tested with a Reel Board UART_1 connected via the
external board/connector and a FONA 808 modem. Reel board specific
suppor is found in boards/.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2020-01-28 12:44:17 +02:00
Ulf Magnusson cf89ba33ea global: Fix up leading/trailing blank lines in files
To make the updated test in
https://github.com/zephyrproject-rtos/ci-tools/pull/121 clean, though it
only checks modified files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 17:41:55 -06:00
Alexander Wachter 2f44990e9b can: Introduce can-primary alias
This commit introduces the can-primary alias to identify
the primary CAN interface.
This alias is used for all samples and tests, so they don't
need to probe the right interface.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-01-27 10:25:00 -06:00
Peter Bigot 344c109f02 treewide: use full path to wifi/winc1500.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot 02ae343100 treewide: use full path to uart.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot 165fe48229 treewide: use full path to sensor.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot e423639c41 treewide: use full path to ps2.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot b314857099 treewide: use full path to kscan.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot 5e486b98b1 treewide: use full path to ipm.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot 81ca8888db treewide: use full path to hwinfo.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Peter Bigot 44806ba74a samples/drivers/display: remove redundant include
drivers/display.h was being included both as a double-quote direct
include and an angle-quote in the drivers parent directory.  Both
resolve to the same file.  Remove the unqualified reference.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Armando Visconti 8dbe9806ff drivers/i2c: Kconfig.stm32: Enable interrupts usage by default
I2C interrupts usage should be the preferred way. This commit
enables them by default in the STM32 I2C driver itself.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-01-24 21:34:45 -05:00
Jukka Rissanen 16805018bb samples: net: dns: Small refactoring
Moving the code around and enhancing debug prints. No changes in
functionality.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-24 16:22:18 +02:00
Anas Nashif c9171be27e samples: drivers: fix build of spi_fujitsu_fram sample
Use DTS filtering and get binding based on DTS variable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-23 14:18:40 -05:00
Ravi kumar Veeramally 326302eda0 samples: net: echo_server: Do not bail out on Accept errors
Echo-server sample should not bail out on failed
accept() calls. This sample should close socket
in case of any errors and keep listening on socket
for further incoming connections.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-01-23 21:07:18 +02:00
Ravi kumar Veeramally d228dd0c85 samples: net: echo_server: Add signed certs and keys
Current sample certs and keys are not signed. Adding
signed certificates and keys. CA file also added.
This helps users to test with different kind of
configurations.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-01-23 21:07:18 +02:00
Jose Alberto Meza d23c570644 samples: drivers: espi: Showcase eSPI OOB channel APIs
Add sample usage for eSPI OOB driver transactions

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-23 12:17:48 -05:00
Joakim Andersson 751868a806 samples: smp_svr: Handle advertise start in disconnected callback.
With a recent change introduced a connectable advertiser will reserve
a connection object when started. In the disconnected callback the
disconnected connection object is not yet released, so the application
is not able to allocate this connection object for a new connectable
advertiser until after the disconnected callback.

reserve conn commit: 46bf20036a

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-23 14:13:17 +02:00
Andrew Boie 8eecb3717a samples: shared_mem: fix exception printouts
Enable CONFIG_TEST so that we get the necessary defines for
console output when a fatal error happens, as well as assertion
checking.

Remove an unnecessary self-abort in main(), this causes an
assert to fail. Letting main() return does the same thing, more
gracefully.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-22 22:41:50 -05:00
Anas Nashif 91920268e0 net: remove sample implementing NATS
A sample implementing NATS protocol that is not part of the Zephyr
networking subsystem. The implementation is not maintained and only
served as a proof of concept.

Related to #20017

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-22 13:55:52 -05:00
Sebastian Bøe 011da8c1b0 samples: Add sample 'application_development/out_of_tree_driver'
Add a sample that demonstrates (and tests) that custom drivers can be
maintained outside of Zephyr.

The sample is fairly minimal with few dependencies and should
therefore be very portable. It also includes a sample.yaml that should
ensure that it does not regress.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-01-22 09:26:12 -05:00
Andy Ross 86ac7dc10a samples/userspace/shared_mem: Fix SMP race
There was some unlocked initialization code in the "enc" thread that
would race with the "pt" and "ct" threads if another CPU was available
to run them (it was safe on UP because "enc" entered the queue first
and was cooperative, the others wouldn't run until it blocked).

Move it to main() and remove the enc_state guard variable which is no
longer doing anything.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-01-21 14:47:52 -08:00
Andrzej Puzdrowski 5f89145d6b boards: remove NFFS mentions from comments/doc
Replaced NFFS mentions by LittleFS in all <board>.dts comments
to storage partitions.
Replaced NFFS by LittleFS in a few boards documentation.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-21 15:32:47 +01:00
Andrzej Puzdrowski 7331a9ea26 samples/subsys/shell/fs: remove nffs configuration
NFFS configuration was removed.
Added working configuration for nRF boards.
Documentation aligned to fact that littlefs is supported.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-21 15:32:47 +01:00
Andrzej Puzdrowski e104741b7c samples/subsys/mgmt/mcumgr/smp_svr: use LitleFS as FS back-end
This patch addapt the sample to using LittleFS as the FS back-end.
After NFFS will be removed this ensures mcumgr FS command functionality.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>

smp_svr cleanu
2020-01-21 15:32:47 +01:00
Carlo Caione 25769e3fff samples: cmsis_rtos_v1: Grow stack size to the maximum allowed
Some architectures require more space on the stack when running samples
and tests while the philosopher test (cmsis_rtos_v1) is still using a
fixed-size stack size.

Since the test is going to use CMSIS v1 we cannot directly use
CONFIG_TEST_EXTRA_STACKSIZE to grow the stack size because the extra
space allocated can excess the maximum size allowed by CMSIS and defined
by CONFIG_CMSIS_THREAD_MAX_STACK_SIZE, causing the sample to halt on the
assertion (thread_def->stacksize <= CONFIG_CMSIS_THREAD_MAX_STACK_SIZE).

To avoid this problem (and align the test to what has been already done
on the philosopher test using CMSISv2) we set the stack size to the
maximum allowed size of CONFIG_CMSIS_THREAD_MAX_STACK_SIZE.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-01-20 18:33:34 -05:00
Henrik Brix Andersen 5ecc6698b9 samples: canbus: add CANopen sample
Add sample demonstrating the integration of CANopenNode in Zephyr to
support the CANopen protocol.

This fixes #15278.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-20 17:17:23 +01:00
Jan Van Winkel 6ebd0e3f02 samples: display: Added support for BGR565
Added support for BGR565 to display sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-20 09:21:04 -06:00
Ruslan Mstoi aa53024fdc net: tcp2: Double main stack size to fix QEMU crash
QEMU running TCP2 echo crashes upon start. This patch doubles main stack
size to fix the crash.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-01-20 10:01:08 +02:00
Robert Lubos 665d195f3a net: sockets: tls: Add missing symbols for a few options
`TLS_PEER_VERIFY` and `TLS_DTLS_ROLE` options accept specific values,
yet no symbols were defined for them. In result, magic numbers were used
in several places, making the code less readable.

Fix this issue, by adding the missing symbols to the `socket.h` header,
and using them in places where related socket options are set.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-20 09:58:23 +02:00
Peter Bigot 02911c9f3a samples/subsys/fs/fat_fs: increase main stack size
The sample overruns the stack while mounting the disk with a default
1024-byte stack.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-18 13:28:45 -05:00
Gerson Fernando Budke e393a26270 samples: wpan_serial: Update doc with build instructions
This add details how build and flash the application. This diferentiate
between SoC and transceivers to help understand what user need to do to
build and flash successfully.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-18 12:28:24 +02:00
Gerson Fernando Budke 38b5aed2ad samples: wpan_serial: Fix device binding error msg
This drop CC25xx reference on debug messages.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-18 12:28:24 +02:00
Gerson Fernando Budke 0618659a19 samples: wpan_serial: Add rf2xx transceiver overlay
Create overlay-rf2xx.conf overlay file to enable Atmel rf2xx
transceivers on this application.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-18 12:28:24 +02:00
Ulf Magnusson 4e85006ba4 dts: Rename generated_dts_board*.{h,conf} to devicetree*.{h,conf}
generated_dts_board.h is pretty redundant and confusing as a name. Call
it devicetree.h instead.

dts.h would be another option, but DTS stands for "devicetree source"
and is the source code format, so it's a bit confusing too.

The replacement was done by grepping for 'generated_dts_board' and
'GENERATED_DTS_BOARD'.

Two build diagram and input-output SVG files were updated as well, along
with misc. documentation.

hal_ti, mcuboot, and ci-tools updates are included too, in the west.yml
update.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 17:57:59 +01:00
Robert Lubos bb32e9e3fb samples: net: mqtt_publisher: Remove mqtt_input after mqtt_disconnect
This function call is no longer needed for a proper disconnect.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-16 21:02:28 -05:00
Jan Van Winkel b6beec9e68 samples: display: Move LVGL sample
Move LVGL sample from samples/gui/lvgl to samples/display/lvgl to have
a unified location for display related samples.

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

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

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 19:19:45 -05:00
Robert Lubos b3a1ede830 net: openthread: Use settings subsystem
OpenThread settings implementation built on top of Zepyhr settings
submodule.

With this solution, OpenThread settings are identified with keys of
the following format: `ot/id/instance`, where `id` is assigned by
OpenThread stack, and `instance` is a 32-bit random number, both in
hex. The implementation makes use of `settings_load_subtree_direct`
function to iterate over settings instances. This allows the
OpenThread settings layer to be a fully transparent shim layer between
OpenThread/Zephyr APIs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-16 17:12:47 -06:00
Ulf Magnusson ecb20669b3 samples: sht3xd: kconfig: Do not assign promptless SHT3XD_TRIGGER
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

SHT3XD_TRIGGER is already being selected by
SHT3XD_TRIGGER_GLOBAL_THREAD, which is enabled in the same configuration
file.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 07:50:05 -06:00
Gerson Fernando Budke 7e4216a6c9 samples: wpanusb: Add atsamr21_xpro board support
Define CONFIG_NET_CONFIG_IEEE802154_DEV_NAME value necessary to enable
atsamr21_xpro board on wpanusb sample.

The documentation was updated referencing the atsamr21_xpro board.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-16 10:47:10 +02:00
Łukasz Hejnak 09933fbdca samples: drivers: soc_flash_nrf: Tagged sample with nrf9160
Extended the tags section to also match this sample for nrf9160.

Signed-off-by: Łukasz Hejnak <lukasz.hejnak@nordicsemi.no>
2020-01-15 07:39:53 -06:00
Łukasz Hejnak 35fc0bea46 samples: drivers: soc_flash_nrf: add test harness
Added harness config to sample in order for the sanitycheck tool
to run and understand whether the samples output is as expected.

Signed-off-by: Łukasz Hejnak <lukasz.hejnak@nordicsemi.no>
2020-01-15 07:39:53 -06:00
Peter A. Bigot 45f9efe02f samples: sensor: ccs811: update for new capabilities
Use nrf52_pca20020 and nrf51_ble400 to demonstrate the new functionality
of the CCS811 driver.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-14 15:44:09 -06:00
Peter A. Bigot ff7269013e samples: sensor: ccs811: add Linaro copyright statements
Add missing information to existing files in anticipation of whinage
from recently modified CI License checks.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-14 15:44:09 -06:00
Peter A. Bigot 6c15968322 drivers: sensor: ccs811: uncrustify
Run the code formatter over the source files for the CCS811.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-14 15:44:09 -06:00
Ulf Magnusson 56901f3ae3 samples: minimal: kconfig: Do not assign promptless MEMORY_PROTECTION
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is select'ed automatically by the X86_MMU, ARM_MPU, and
ARC_MPU symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 11:06:24 -05:00
Ulf Magnusson 6608beaaaa console: kconfig: Do not assign promptless CONSOLE_HAS_DRIVER
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

These configuration files all enable UART_CONSOLE, which selects
CONSOLE_HAS_DRIVER.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 15:42:33 +01:00
Ulf Magnusson 1b451e0bed bluetooth: kconfig: Do not assign promptless BT_DEBUG
BT_DEBUG is a promptless helper symbol, defined in
subsys/bluetooth/common/Kconfig. It is selected by BT_DEBUG_LOG, which
these configuration files also enable.

Flagged by https://github.com/zephyrproject-rtos/zephyr/pull/20742.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 13:41:29 +01:00
Andrew Boie 777213c0fb samples: drivers: crypto: fix test failure
The regular expressions used by this test to determine
success or failure get confounded if the log subsystem
drops the wrong messages due to buffers being full.

Just use minimal logging which synchronously logs
everything.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-13 16:35:10 -05:00
Jan Van Winkel 7e3f9ebf3f samples: display: Added generic display shield sample
Added a generic display shield sample.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-10 09:18:20 -06:00
Anas Nashif 7c9a87aea2 samples: remove i2c scanner
Now part of the I2C shell and works for all boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-10 08:55:47 -05:00
Henrik Brix Andersen 105dc72dff samples: shields: lmp90100_evb: add rtd sample
Add sample for reading the temperature of a 3-wire PT100 sensor using
the Texas Instruments LMP90100 Sensor Analog Frontend (AFE) Evaluation
Board (EVB) shield.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-09 17:27:52 +01:00
Peter A. Bigot f05cbb421d drivers: sensor: mcp9808: fix various problems and improve test
Correct handling of device encoded temperature values, which combine a
12-bit 2s complement signed value with a separate sign bit.  Rework
conversion between device and sensor temperature representations to
support negative temperatures in both domains.

Use a much simpler trigger configuration where the alert is driven by
comparator output, rather than as an interrupt that requires a pair of
I2C transactions to read and clear the flag.

Refactor the trigger infrastructure to use the setup/handle/process
idiom, which reduces duplicated code and to correctly detect alerts
present when the triggers are set.

Completely replace the sample with something that demonstrates
updating upper and lower threshold values to track moving
temperatures.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-08 20:33:51 -05:00
Peter Bigot 649500aeca samples: sensor: mpu6050: convert to devicetree
Add a sample for the MPU6050 that demonstrates on-demand and triggered
display of all sensor data.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:40:04 +01:00
Peter Bigot ff5cadc52c samples: sensor: adt7420: rework for trigger testing
When a trigger was enabled the original implementation would do
nothing more than print "Waiting for a threshold event", without
describing what such an event would look like.

Rework to maintain a window of +/- 0.5 Cel around the most recent
in-window temperature, and reset that window whenever a trigger occurs
or a non-trigger reading is outside the window.  Time-out and display
the temperature if no event occurs in a reasonable time.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:38:43 +01:00
Peter Bigot 6ecc0c53c0 samples: sensor: adt7420: add nrf52_pca10040 devicetree overlay
Expand the set of hardware this can be tested with.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:38:43 +01:00
Peter Bigot be904bc289 samples: sensor: adt7420: fix frdm_k64f devicetree overlay
The device address can only be 0x48 through 0x1B.  C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.

Move this to a boards subdirectory so we can add other overlays
without cluttering the root.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:38:43 +01:00
Henrik Brix Andersen 3407eaeeca samples: rgb_led: add support for PWM flags
Pass PWM flags set in the device tree, if any, to the
pwm_pin_set_usec() functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Henrik Brix Andersen edd891adfd samples: blink_led: add support for PWM flags
Pass PWM flags set in the device tree, if any, to the
pwm_pin_set_usec() functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Henrik Brix Andersen 3124cf8bff samples: fade_led: add support for PWM flags
Pass PWM flags set in the device tree, if any, to the
pwm_pin_set_usec() function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Henrik Brix Andersen db611e6781 drivers: pwm: add support for inverted PWM signals
Add support for requesting an inverted PWM pulse (active-low) when
setting up the period and pulse width of a PWM pin. This is useful
when driving external, active-low circuitry (e.g. an LED) with a PWM
signal.

All in-tree PWM drivers is updated to match the new API signature, but
no driver support for inverted PWM signals is added yet.

All in-tree PWM consumers are updated to pass a flags value of 0
(0 meaning default, which is normal PWM polarity).

Fixes #21384.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Daniel Leung e78704251b samples: intel_s1000_crb/audio: fix return for non-void function
The usb_transport_init() does not return a value when it fails to
initialize the USB device. So add a return value there.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-01-07 17:09:38 +01:00
Jan Van Winkel 78c6241ee2 samples: display: Build for st7789v_waveshare_240x240
Update sample.yaml file for ST7789v sample to also build with
st7789v_waveshare_240x240 shield.

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

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Ulf Magnusson 7e0af9e0b8 kconfig: Remove redundant $ZEPHYR_BASE from 'source's
The $srctree environment variable is already set to point to the Zephyr
root, so no need to do

    source "$(ZEPHYR_BASE)/Kconfig.zephyr"

in samples. Just

    source "Kconfig.zephyr"

works.

(Things would break if $srctree was set to anything else, because every
'source' in the Kconfig files will be relative to it.)

Also add a 'mainmenu' title to the littlefs sample. It shows up at the
top of menuconfig/guiconfig. Source Kconfig.zephyr instead of Kconfig to
avoid overriding it.

As a sidenote, $(FOO) is better $FOO in Kconfig. $FOO is legacy syntax
that Kconfiglib only supports to be compatible with old Linux kernels.
$(FOO) uses the Kconfig preprocessor.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-06 09:48:53 -05:00
Paul Sokolovsky b3ef46ed63 samples: sockets: big_http_download: Increase stack size.
x86-mmu now crashes with default 1K, bump to 2K, which hopefully might
work even for 64-bit archs.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-01-04 09:19:16 -05:00
Erwan Gouriou 4faf6546b1 boards/shields: ssd1306: Factorize and move to conditional Kconfig
Factorize definitions for ssd1306_128x32 and sd1306_128x64 shields
and move to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(I2C, SSD1306) are removed as they are application responsibility.
Also disabling SSD16XX is removed as SSD16XX should not be enabled
by default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Johann Fischer 04db2dcea7 shields: st7789v_generic: rename shield to TL019FQV01
Rename shield to TL019FQV01.

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

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-02 17:00:06 -05:00
Oleg Zhurakivskyy f4ebf53cfb samples: sockets: echo: Include stdlib.h
Include stdlib.h to suppress a missing declaration
warning for exit() when compiled as a Linux target.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 13:07:19 -08:00
Joakim Andersson 0f717058a0 Bluetooth: samples: peripheral_esp: Use common 24-bit functions
Use the newly introduced byteorder 24 bit variant functions.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-02 19:05:27 +01:00
Ulf Magnusson 9c9eb3452b kconfig: Fix some formatting nits
Same deal as in commit bd6e04411e ("kconfig: Clean up header comments
and make them consistent") and commit 1f38ea77ba ("kconfig: Clean up
'config  FOO' (two spaces) definitions"), for some newly-introduced
stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-21 10:30:02 -05:00
Manivannan Sadhasivam e43fdb0428 samples: drivers: Add LoRa receiver sample
Add sample application for receiving data packets over LoRa.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-12-21 12:20:24 +01:00
Manivannan Sadhasivam 72f5806cec samples: drivers: Add LoRa sender sample
Add sample application for sending data packets over LoRa.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-12-21 12:20:24 +01:00
Andrei Emeltchenko cd7fdd7d58 samples: wpanusb: Allow to build for general boards also
This enables build for boards with usb and ieee802154 like reel_board,
etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko c87384875c samples: wpan_serial: Allow to build for more boards
Allow to build also for general boards with supported ieee802154 and
usb, like reel_board, etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko d78a06428a samples: wpan_serial: Refactor wpan_serial
Refactor code simplifying packet processing, removing unneeded
semaphore, etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 292efefaf3 samples: wpan_serial: Use logger hexdump helper
Remove hexdump() based on printk and use standard logger helper.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 8315420df0 samples: wpan_serial: Take into account bytes written
uart_fifo_fill() returns number of bytes written, use helper to write
all bytes.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko f4f9dc6005 samples: wpan_serial: Update README
Update README and reformat it to rst.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 80e4321a5b samples: wpan_serial: Create cc2520 overlay
Create cc2520 overlay file. Can be used with:

cmake -DBOARD=quark_se_c1000_devboard \
  -DOVERLAY_CONFIG=overlay-cc2520.conf ..

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 095d8070db samples: wpan_serial: Allow to use other 15.4 devices
This allows to select different IEEE802.15.4 chips instead of
hardcoded cc2520.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Nick Ward b5f335b11b mcumgr: BT SMP transport config for authenticated requirement
This commit introduces a new Kconfig symbol MCUMGR_SMP_BT_AUTHEN.
When selected it configures the Bluetooth mcumgr transport to require
an authenticated connection.

If the Bluetooth mcumgr transport is selected then this new symbol is
selected by default.  Bluetooth SMP is also selected to ensure Zephyr
is configured with Bluetooth security features enabled to provide
Bluetooth authentication APIs to the user's app.  Users can choose to
disable this level of security for the Bluetooth mcumgr transport if
they do not require it.

Fixes #16482

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-12-20 20:28:39 -05:00
Peter Bigot c2723054f6 samples: sensor: lps22hh: add standalone sample
Although this sensor is demonstrated by the X-NUCLEO-IKS01A3 sample,
maintenance of the driver is simplified if it can be tested in
isolation.  Provide a sample modeled on hts221.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-20 20:25:11 -05:00
Carlo Caione aec9a8c4be arch: arm: Move ARM code to AArch32 sub-directory
Before introducing the code for ARM64 (AArch64) we need to relocate the
current ARM code to a new AArch32 sub-directory. For now we can assume
that no code is shared between ARM and ARM64.

There are no functional changes. The code is moved to the new location
and the file paths are fixed to reflect this change.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-20 11:40:59 -05:00
Anas Nashif 6b01656c4b samples: sensor: fix test identifier
use sample.sensor.shell instead of test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-20 10:35:13 -05:00
Jukka Rissanen 56101c3c9a samples: bluetooth: ipsp: Mark accepted socket correctly in accept()
The TCP code expects that we know when the socket has called accept()
in order to continue connection attempt.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-20 16:45:06 +02:00
Diego Sueiro e924879ef7 samples/subsys/shell: Introduce Sensor Shell module
Adds the Sensor Shell module sample app.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-19 15:54:04 -05:00
Peter Bigot 816d2c47a4 samples: sensor: dht: add sample
Add a sample to test the Aosong temperature/humidity sensor.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 06:43:37 -06:00
Emil Obalski 2128750138 usb: api: Add user device status callback
By this commit user gets possibility to register USB
device satutus callback. This callback represents device state
and is added so user could know what happend to USB device.

Callback is registered by providing it to usb_enable()
USB api is extended by this callback handler.

Samples using using USB are by default provide no callback
and the usb_enable() is called with NULL parameter.

Status callback registered by hid class is deleted as now
USB device has global callback for all classes within device.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-19 13:08:55 +01:00
Emil Obalski d65027d8c0 usb: samples: Application calling usb_enable by itself
User app is reponsible for issuing usb_enable and
making USB hardware operative.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-19 13:08:55 +01:00
Peter Bigot bc2ecad363 samples: drivers: spi_flash: increase test data length
Some drivers may be unable to write less than 4 bytes.  Increase the
test to use at least 4 bytes and refactor so the logic is no longer
explicitly size-dependent.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 12:37:31 +01:00
Siddharth Chandrasekaran bf45e32fec samples: crypto: Add AES ECB mode sample
Add sample for AES ECB mode with FIPS-197 ECB test vetors

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2019-12-18 22:10:29 +01:00
Siddharth Chandrasekaran e21164cfb0 samples: crypto: Refactor variables for clarity
Rename global variable ciphertext used in cbc_mode() to
cbc_ciphertext and move it closer to cbc_mode(). Also, move
global variable iv into cbc_mode() to be consistent with
other *_mode() methods.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2019-12-18 22:10:29 +01:00
Peter Bigot 50a54f4a4a samples: sensors: isl29035: add sample
Add a sample to demonstrate and test the Renesas/Intersil ISL29035
light sensor driver.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-18 15:07:02 -06:00
Kwon Tae-young 94e419c624 samples: i2c_scanner: support output like i2c_detect
Supports output in the same format as the i2c_detect command.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-12-18 21:54:43 +01:00
Nick Ward 537f3332f0 samples: bluetooth: peripheral_hr: Fix advertising UUID16 service list
CTS UUID was used instead of DIS UUID

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-12-18 21:46:51 +01:00
Ulf Magnusson b292f7643b kconfig: Remove assignments to promptless SOC_FAMILY_NRF symbol
SOC_FAMILY_NRF has no prompt. Assignments in configuration files have no
effect on symbols without prompts. A prompt means the symbol is
user-configurable.

SOC_FAMILY_NRF is instead enabled indirectly through being selected by
other symbols.

Detected through some work-in-progress improved error checking.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 14:42:58 +01:00
Mateusz Holenko 3cd0bf17f2 samples: philosophers: Disable networking
When networking is selected, building the test
fails with:
error: static assertion failed: "Too many traffic classes"

Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-12-18 10:35:15 +02:00
Paul Sokolovsky feac5c1c45 Revert "samples: sockets: Don't open the socket if the test protocol is enabled"
This reverts commit da0f3311ff. It was
clearly intended to be a debugging aid when developing TCP2, not
intended for mainline. This fixes building this sample on POSIX
systems with Makefile.posix.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-12-17 18:09:19 +02:00
Jukka Rissanen 51fc680ba2 samples: net: google_iot_mqtt: Do not compile by sanitycheck
The sample needs key.c file but that cannot be generated by
sanitychecker. So disable compilation by sanitycheck.
Eventually we should make it possible to compile the sample
using some pre-defined values so that the sample will not
bit-rot but that is for later.

Fixes #21450

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-17 15:44:55 +02:00
Andrei Stoica f72d5577f9 Bluetooth: samples: Added dynamic Tx power ctrl sample (#17731)
This commit provides a sample dummy application demonstrating
the usage of the added dynamic Tx power control over the HCI
commands and HCI interfaces.

Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
2019-12-17 12:29:57 +01:00
Ravi kumar Veeramally 523a88ea4f samples: net: cloud: Move cloud based samples
MQTT Azure and Google IoT samples are based on cloud
infrastructure. It would be nice to place all cloud
based samples in one single folder.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-12-17 08:33:52 +02:00
Alberto Escolar Piedras a6f6179cd9 samples/userspace/prod_consumer: Fix main() type
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).

So, correct the different samples and tests that were defined
otherwise.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-12-16 11:27:56 +01:00
Alberto Escolar Piedras 0b8678a2b0 samples & tests: Correct main() type
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).

So, correct the different samples and tests that were defined
otherwise.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-12-16 11:27:56 +01:00
Ravi kumar Veeramally f1a1e5382e samples: net: mqtt: Add a sample to connect to Azure
This samples demonstrates how to connect to Azure Cloud
IoT hub which is based on MQTT protocol. User has to
create an account in Azure Cloud and provide those details
using Kconfig options. This sample first acquires DHCPv4
address and opens a secure connection with Azure cloud.
Then opens a MQTT connection and publish messages randomly.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-12-16 11:42:06 +02:00
Emil Obalski 797d463d82 usb: samples: Do not depend remote wakeup on SoCs
Remote wakeup for Nordic SoCs should always be enabled.
Thus do not depend it for each SoC. Instead depend it on
chosen driver.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-15 10:29:13 -05:00
Andrew Boie a15a47d856 samples: shared_mem: 64-bit fixes
We don't need this cast, just use %p format code.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-12-12 14:48:42 -08:00
Vincent Wan f1c0eb915b samples: http_get: connect without TLS by default on cc3220sf_launchxl
The example should work on the cc3220sf_launchxl by following the same
flow as on other boards, ie. by connecting with plain http by default
and use TLS only when an overlay is specified. We update the
configuration for cc3220_launchxl to not use TLS by default and the
README to point users to the right overlay file to use.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-12-12 10:53:26 -06:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

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

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

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Vikrant More 5af5407570 samples: mesh: nrf52: added some preprocessor directive
Added some preprocessor directive so that code get compile
for some more nRF52 boards which has only one LED & one button.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More b80b359955 samples: mesh: nrf52: minor improvement in MOVE msg handlers
Changes in MOVE message handler are  as per Mesh Model
Specification which says:

"Upon receiving a Generic Move Set message, the Generic Level
Server shall respond with a Generic Level Status message.
The target Generic Level state is the upper limit of the
Generic Level state when the transition speed is positive,
or the lower limit of the Generic Level state
when the transition speed is negative."

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More 102d402fc5 samples: mesh: nrf52: added some more macros support
Added some more macros support.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More c4edc2d78b samples: mesh: nrf52: removed redundant global variable
Removed global variable 'default_tt' & code depend on it
which is redundant as per latest implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More 13a5addffa samples: mesh: nrf52: corrected sequence of get & publish messages
Corrected sequence of execution of get & publish messages.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More f8c03d79f6 samples: mesh: nrf52: added separate update_vnd_led_gpio()
Added sepate function update_vnd_led_gpio().

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More c97e872e7d samples: mesh: nrf52: used constrain functions whereever possible
Added support of constrain_temperature() function.
Used constrain_lightness() & constrain_temperature()
whereever possible.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More ff323ce0e8 samples: mesh: nrf52: separately save default & last target values
Separately saved default & last target values of lightness,
temperature & delta_uv on flash (using settings layer).

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More 5ad88281b0 samples: mesh: nrf52: rename enum attributes
Rename attributes in enum state_binding.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More 89a0986dff samples: mesh: nrf52: implementation based on single pointer
Implement thing based on single struct light_ctl_state pointer
in entire Application.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More b5ebc66889 samples: mesh: removed redundant code, blank lines & comments
Removed redundant code, unnecessary blank lines & comments.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Kumar Gala 9415a114a0 include: Fix use of <json.h> -> <data/json.h>
Fix #include <json.h> as it has been deprecated and
should be #include <data/json.h>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Kumar Gala bb9efbfbd0 include: Fix use of <gpio.h> -> <drivers/gpio.h>
Fix #include <gpio.h> as it has been deprecated and
should be #include <drivers/gpio.h>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Kumar Gala 24ae1b1aa7 include: Fix use of <misc/FOO.h> -> <sys/FOO.h>
Fix #include <misc/FOO.h> as misc/FOO.h has been deprecated and
should be #include <sys/FOO.h>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Vinayak Kariappa Chettimada 0b878020f2 samples: Bluetooth: Increase ISR_STACK_SIZE value
Split Link Layer implementation uses 80 bytes more ISR stack
in comparison to Legacy Link Layer, hence increase the
required ISR_STACK_SIZE for the BBC micro:bit and other
nRF51 QFAA SoC based mesh and mesh_demo samples.

Fixes #20414.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-12-10 15:34:26 +02:00
Marcio Montenegro dd5d2e37f5 Samples: Bluetooth: Add ST BLE Demo sample
This sample demonstrates BLE peripheral for ST BLE Sensor.
You can test button notification and LED service using
ST BLE Sensor Android application

Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
2019-12-10 12:25:06 +02:00
Jukka Rissanen 0297e7ec15 samples: net: zperf: Ignore out of net_buf issue
If we ran out of net_buf's while sending, ignore the issue
and try to finish the test instead. Solving the "running out
of network buffers" case would require careful tuning of
number of network buffers, buffer size, upload speed etc. which
is difficult to solve with generic buffer count options.

The user should tweak mainly the CONFIG_NET_BUF_TX_COUNT option.
Optionally CONFIG_NET_PKT_TX_COUNT can be changed too. Information
about these options is printed to console after the test is finished.

Fixes #20315

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-10 10:00:53 +02:00
Jukka Rissanen 3dcefbb316 samples: net: echo-server: Generate coverage report
Add "sample quit" shell command which can be used to stop the
sample application and allows the generation of coverage report.

Fixes #21099

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-09 16:34:18 -05:00
Peter Bigot e83b079e22 samples: nrf52: replace power_mgr with system_off
The Nordic SOC doesn't support multiple system power states, only one
deep sleep state.  Replace the old example with a simpler one that can
be used to measure CPU active, normal sleep, and system off modes.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-09 16:33:03 -05:00
Anas Nashif 467d24fea1 tests: samples: portability: fix test tags and identifiers
Fix sample tags, use cmsis_rtos for all samples related to CMSIS RTOS
APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif 70758c4374 tests: fix test identifiers
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.

The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Stephanos Ioannidis 6d531a36aa samples: Remove stale 'random' driver sample.
This commit removes the CMakeLists.txt file for the stale 'random'
driver sample.

The 'random' driver sample was previously renamed to 'entropy'.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-12-09 13:19:26 -05:00
Ulf Magnusson 2bd6858db4 samples: syslog_net: Remove ref. to CONFIG_SYS_LOG_BACKEND_NET_SERVER
The definition was removed in commit 7ccc7889fa ("logging: Remove
SYS_LOG implementation").

Adding detection of unused symbols in samples and tests to CI.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 12:55:07 -05:00
Erwan Gouriou e0353db10b samples: lsm6dsl: Add a harness_config
In order to enable sample to be run and evaluated in sanitycheck,
add a harness_config to validate sample output:
- Add "regex" to match on sample output
- Add "timeout" to save some time when debugging
- Add "ordered" instruction. Since sample is running a while loop
test verdict can potentially be computed on previous run output,
issuing a wrong status.

Last, since sanitycheck regex does not play well them, rework
sample to output without parenthesis.

Tested on disco_l475_iot1

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-09 12:52:35 -05:00
Emil Obalski c1f5e11bb6 usb: Cleanup for multiplied defines
Some of defines are present in several header files.
Those defines are the same with value but with different naming.

Common defines are brought to usb_common.h

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-09 12:48:13 -05:00
Robert Lubos 6b2a371272 samples: net: Remove redundant frdm_kw41z configs from echo samples
echo_client and echo_server configuration for 802.15.4 and OpenThread is
covered by overlay files and default board configuration. Board-specific
configuration for frdm_kw41z was redundant in this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Jennifer Williams 6c2d25204c samples: boards: Add readme for gpio counter.
This adds a README.rst for the UP Squared board GPIO counter sample
using details in the application source code and giving context.
This offers overview, requirements, and instructions to build and
flash, in complement to the cited reference.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2019-12-09 12:45:04 -05:00
Aurelien Jarno a5c53ff3ae samples: mesh_badge: fix temperature format
The sensor API returns the temperature in celsisus degree. The Bluetooth
temperature characteristics uses M = 1, d = -2, b = 0, which corresponds
to a resolution of 0.01 degree. This means that the value returned by
sensor_value_to_double has to be multiplied by 100.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-12-09 11:51:46 -05:00
Aurelien Jarno 0e11d1385b samples: mesh_badge: fix property ID
The mesh_badge sample uses a GATT Characteristic instead of a Mesh
Device Property to report the temperature. In addition to that the
status message is filled with with a GATT Unit instead of a the Mesh
Device Property.

Fix that by reporting a Present Device Operating Temperature, ie 0x0054
instead. This has the advantage of keeping the an s16t value to report
the temperature. This however change the marshalled format from B to A.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-12-09 11:51:46 -05:00
Aurelien Jarno 1ac90bf47e samples: mesh_badge: fix unknown sensor status message
When the value of an unknown sensor property ID is requested, the length
field should represent the value of zero, as explain in the comment in
sens_unknown_fill. However the marshalled representation of a zero
length is wrong in the code. The format A uses a 1-based uint4 length
value, so the range 0x0–0xF represents the range 1-16. The zero length
is represented by format B using the 0x7F value.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-12-09 11:51:46 -05:00
Piotr Mienkowski bc6a015235 samples: gpio: remove redundant application
The functionality of samples/drivers/gpio sample application duplicates
already existing code in samples/basic/blinky and samples/basic/button.
This commit removes the gpio sample application.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-12-09 09:43:12 -06:00
Ulf Magnusson 87e917a925 kconfig: Remove redundant 'default n' and 'prompt' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Also replace some

    config
    	prompt "foo"
    	bool/int

with the more common shorthand

    config
    	bool/int "foo"

See the 'Style recommendations and shorthands' section in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:14:50 +01:00
Trond Einar Snekvik 75adf6940e Bluetooth: Mesh: Clean up sample config
Removes redundant and invalid configurations from the bluetooth/mesh
sample. Removes some stale disabled config entries.

Fixes L2CAP related warning in config step of sample.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-12-09 17:13:41 +02:00
Joakim Andersson f49bb10ca5 Bluetooth: Samples: Switch to synchronous bt_init before main loop
Switch to using the synchronous bt_init call before starting the main
loop in the peripheral samples. This is to avoid sending notifications
before bluetooth has been properly initialized.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-12-09 16:11:19 +01:00
Andrzej Głąbek d3ea66d493 samples: boards: Merge nrf91/ with nrf52/ and rename it to nrf/
The following samples:
- boards/nrf91/nrfx
- boards/nrf52/power_mgr
are actually not specific to nRF91 and nRF52 Series SoCs, respectively,
hence the current naming of the above board/ subdirectories may be
misleading. Thus, use nrf/ directory for holding all nRF board specific
samples that apply to several boards.

Paths to the moved samples that are mentioned in their documentation
are also updated accordingly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-12-09 16:10:19 +01:00
Rubin Gerritsen d2825134c4 samples: bluetooth: hci_uart: add config for nrf5340_dk_nrf5340_cpuapp
Sets the baud rate to 1M to align with other nrf boards.

Signed-off-by: Rubin Gerritsen <Rubin.Gerritsen@nordicsemi.no>
2019-12-09 17:01:27 +02:00
Johan Hedberg 39291fbbbe Bluetooth: Remove usage of BT_BUF_USER_DATA_MIN
This define is not of use anymore since there's a global net_buf user
data Kconfig variable and its definition already guarantees a
sufficient minimum for Bluetooth.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-11-28 13:35:11 +02:00
Erwan Gouriou fc65ab137e samples/net: civetweb: Remove SOC_SERIES_SAME70=y in prj.cnf
For some reasons SOC_SERIES_SAME70 was selected in civetweb sample,
which prevents build on other platforms.
This issue was silent since sample yaml file limits sample testing on
sam_e70_xplained.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-27 15:18:31 -05:00
Oleg Zhurakivskyy 516525fcd8 samples: net: echo-server: Increase the stack size for the coverage
echo_server crashes if the coverage is enabled due to the insufficient
stack size.

Use bigger stack size when the coverage is enabled.

Fixes #20797

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-11-27 10:14:20 +01:00
Jan Van Winkel 8a98a67bf1 cpp: Use malloc/free instead of kernel variants in new/delete
Use malloc/free instead of k_malloc/k_free in operator new/delete
implementation or use libstdc++ implementation when available.

Further updated cpp_synchronization sample to enable minimal libc heap
as virtual destructor requires operator delete which depends on free.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-26 12:41:54 -06:00
Ravi kumar Veeramally bb40f9b0cd samples: net: Fix WS client Coverity issue
Close the socket and return the error.

Fixes #20508
Coverity CID :205634

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-11-26 08:22:35 -05:00
Vikrant More 459e05b103 samples: mesh: nrf52: corrected & improved transition implementation
Corrected & improved transition implementation so that
no_transition_work thread will not get triggered twice at the
end of transition.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More c7f83f3865 samples: mesh: nrf52: improved comment
Improved comment content.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More cbd0d6e847 samples: mesh: nrf52: added some Kconfig
Added some Kconfig which could help to improve Mesh
performance or Debugging.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More aab640698b samples: mesh: nrf52: considered delay even in case of inst. transition
User can set transition time as Zero & delay as non-zero value.
In that case, we have to depend upon timer.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Armando Visconti 75d21c1513 board/shields: x-nucleo-iks01a3: (FIX) use INT2 for LSM6DSO DRDY
On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.

This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.

Fixes: #20933

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-11-22 15:40:30 +01:00
David B. Kinder ddf0b574b0 doc: fix LPS22HB doc indentation
Lines with leading spaces aren't rendered well in the generated HTML.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-20 17:47:20 -05:00
Kamil Piszczek 50ebde1c8b samples: bluetooth: adding hci_rpmsg sample
This commit contributes a BLE HCI-over-RPMsg sample.

Co-authored-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Co-authored-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-11-20 19:29:06 +01:00
Carlo Caione 6eb48088ed samples: logger: Fix test on stack hungry platforms
This test is failing on platforms requiring a bigger stack size. This
issue is fixed by adding the missing CONFIG_TEST_EXTRA_STACKSIZE to
tweak the thread stack size.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-11-20 15:59:12 +01:00
Carles Cufi b32931277d samples: bluetooth: central_hr: Fix scanning
Fix scanning so that we always use active scanning in case the UUID we
are looking for is in the scan response, and disable duplicate filtering
to handle devices that modify their advertising data at runtime, such as
smartphones reacting to apps being opened and closed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-11-19 15:25:46 -05:00
Peter Bigot a9d58e8c5c samples: i2c_scanner: provide more complete output
Update the sample to indicate which device it was using, which helps
mitigate the existing problems identifyin Arduino I2C buses.  Also
output a summary of results so cases where no devices are found
provide output after the Starting... line.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-19 15:22:38 -05:00
Armando Visconti 8d32c2ce84 samples/96b_argonkey: Add a note in microphone test README file
It is important to clarify when to launch audio capture command in
order to avoid that initial boot characters enter into the audio
file leading to bad initial data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-11-19 07:29:34 -05:00
Peter Bigot eb2c3307cc samples: sensor: lps22hb: remove trigger-related code
The driver for this sensor does not support asynchronous sampling.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-18 13:53:20 +01:00
David B. Kinder da963d94f9 samples: remove CONFIG_SERIAL from blinky
As noted in the issue #20666 discussion, though the console is not used
by this sample app, it can't really be "disabled" using this Kconfig
option, so remove the CONFIG_SERIAL=n line.

Fixes: #20666

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-18 13:49:42 +01:00
Carlo Caione 6d9af83907 samples: philosophers: Introduce CONFIG_TEST_EXTRA_STACKSIZE
Some architectures require more space on the stack when running samples
and tests. Use the CONFIG_TEST_EXTRA_STACKSIZE also on the philosophers
sample to deal with such cases.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-11-15 08:07:28 -05:00
Loic Poulain 187397ab16 boards: arm: mimxrt1064_evk: Fix display support
Delete wrong LVGL_BITS_PER_PIXEL config and add mimxrt1064_evk
to the lvgl sample platform whitelist.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-11-15 10:06:56 +01:00
Jose Alberto Meza 2f1f2cb147 samples: drivers: espi: Fix #20505 and #20506 coverity issues
Abort execution if any null pointer found during espi/gpio binding.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-11-15 09:34:42 +01:00
Ulf Magnusson 9e87b1191e samples: CAN: kconfig: Fix ref. to CONFIG_CAN_AUTO_BUS_OFF_RECOVERY
A reference to CONFIG_CAN_AUTO_BOFF_RECOVERY was added in commit
1b88658f9f ("samples: driver: Extend CAN sample"), but it's never been
defined as a Kconfig symbol.

Should have been CONFIG_CAN_AUTO_BUS_OFF_RECOVERY according to
alexanderwachter, so change it to that.

Adding detection of unused symbols in samples and tests to CI.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-14 07:53:41 -06:00
Vikrant More d2737d5fac samples: mesh: nrf52: coding style improvements
Corrected spellings in printk messages plus removed
unnecessary blank lines.

In case of Gen. Move client's message to Server, reduced
values of delta & transition time to improve demonstration.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-14 14:24:29 +02:00
Vikrant More 8dabf77f08 samples: mesh: nrf52: increased main stack size
Increased main stack size. This will solve issue mentioned at
https://github.com/zephyrproject-rtos/zephyr/issues/19685 which
is only related to onoff_level_lighting_vnd_app.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-14 14:24:29 +02:00
Peter Bigot 86461ac559 samples: sensor: mcp9808: fix frdm_k64f devicetree overlay
The device address can only be 0x18 through 0x1F.  C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-13 15:16:54 -06:00
Peter Bigot 83b2bb614b drivers: sensor: mcp9808: clean up I2C API usage
The i2c_msg API details do not work correctly with Nordic TWI.  Switch
to the higher-level and simpler API for register read and write.  Also
add a tree configuration on a Nordic-based board.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-13 15:16:54 -06:00
Andrzej Głąbek 6e8132d1ae samples: blink_led: Fix the behavior of the sample
Commit 16d8ce519c introduced changes
that caused this sample to no longer behave according to documentation
and for some hardware to no longer work at all.
On nRF51 SoCs for instance, the reported number of cycles per second
is 16M, what makes the calculated max_period and min_period to be 16
and 0 microseconds, respectively, what effectively makes it impossible
for the sample to return to the initial blinking frequency. Moreover,
with such short PWM periods, the blinking is not even noticeable.

This patch partially reverts the changes mentioned above, and instead
of calculating max_period and min_period basing on the reported clock
rate, it tries to only decrease the max_period if needed, accordingly
to what the used hardware can handle.
Documentation is also updated to mention the possible change in
observed behavior of the sample on some hardware.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-11-13 14:54:45 -06:00
Emil Obalski 11849257c0 boards: Update defconfigs after renaming to USB_NRFX
Name convention for nordic USB driver changed
Kconfig files for custom boards have to be udapted accordingly.
Changes affect only name convention change.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-11-13 10:33:38 -06:00
Emil Obalski 6c82c80a3c drivers: Add support for nRF52833 in several drivers
By adding new SoC to Zephyr drivers has to be updated.
Commit affects:
 - USB driver
	- support for nRF52833 added.
	- support for USB_DEVICE_REMOTE_WAKEUP in hid-mouse added.
 - SPI
 - IEEE 802.15.4
 - CLOCK CONTROL

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-11-13 10:33:38 -06:00
Daniel Leung 7cb9286895 samples: intel_s1000_crb: set CONFIG_NEWLIB_LIBC for math.h
Including math.h requires Newlib so enable it in project
configuration file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-11-13 06:26:10 -06:00
Daniel Leung eca4d69f02 samples: intel_s1000_crb: fix no return on non-void func error
There are compiler error about the entry functions of two threads
not returning anything. So add return statement to fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-11-13 06:26:10 -06:00
Daniel Leung 66aefdbb93 samples: intel_s1000/i2s: fix uninitialized use warning
One of the return variable is declared and used, but never
assigned values. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-11-13 06:26:10 -06:00
Torsten Rasmussen 46b9b15c6d openamp: ensure external openamp is build when target is out-of-date
Fixes: #19918
https://cmake.org/cmake/help/latest/module/ExternalProject.html

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-11-13 04:54:49 -06:00
Vikrant More 235f5654d1 samples: mesh: nrf52: removed unnecessary global vaiable
Removed unnecessary global variable & replaced them with different
variable defined in struct light_ctl_state.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Vikrant More fb439fd98b samples: mesh: nrf52: corrected Gen. move msg handler implementation
Corrected Generic Move (Level) message handler implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Vikrant More 3bc931996d sample: mesh: nrf52: coding style improvement
Adjusted lines which are crssing limit of 80 characters to remove
check Warnings.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Vikrant More 3ed87e46fa samples: mesh: nrf52: removed redundant coding
Removed redundant coding which was related to old implementation.
Now Server will publish the new state information to the model’s Publish
Address only when there is mismatch between target & current values.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Vikrant More 6aaddb9922 sample: mesh: nrf52: complete inst. transition without timer
If transition time (tt) estimated equal to zero then transition
get completed without using timer.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Vikrant More 0bf0eb7f76 samples: mesh: nrf52: Simplified implementation
Create single structure of light_ctl_state & simplified
state binding algorithm.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-13 11:29:14 +02:00
Johann Fischer 0ee2f14948 samples: ipsp: use log_strdup(transient_string)
Use log_strdup(transient_string).

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-11-12 16:43:52 +02:00
Johann Fischer 0df5aa54ec samples: ipsp: fix build reply function
Fix build reply function. The sample uses return value
from net_pkt_read() to determine data length,
but the return value is 0 on success.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-11-12 16:43:52 +02:00
David B. Kinder c68ae690b6 doc: fix misspelling in userspace doc
fix misspelling

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-12 08:47:14 +01:00
Peter A. Bigot 98a344fe21 drivers: spi_nor: support deep-power-down mode
Add internal API to enter and exit deep power-down mode.  Add Kconfig
option to return to DPD whenever device is not active.

When device power management becomes more mature it should be possible
to implement it, which would allow use of DPD without having to enter
and exit DPD between consecutive transactions.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-09 15:26:06 +01:00
Peter Bigot 80faac41bc coccinelle: update int literal to timeout
Re-run the int_literal_to_timeout script to update calls introduced
since the last cleanup.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-08 19:30:42 -05:00
Kevin Townsend 740f6868a5 sensor: hmc5883l: convert to device tree
This commit converts the existing hcm5883l 3-axis magnetometer
driver to use device tree for the I2C and GPIO selection.

It also adds a basic sample application for this sensor, using the
frdm-k64f development board to demonstrate how the interrupt
GPIO pin and I2C bus can be selected.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2019-11-08 12:12:38 -06:00
Alex Porosanu 74248e26d9 samples: bluetooth: peripheral_hr: add VEGABoard sanity testing
Add a special target that's marked build_only so the BLE SW LL
implementation on VEGABoard is built daily. This helps ensuring
that it doesn't get inadvertedly broken by subsequent updates.
The name of the target is peripheral_hr_rv32m1_vega_ri5cy
and it can be run with the following command:

sanitycheck -v --all -p rv32m1_vega_ri5cy \
            -x=CMAKE_REQUIRED_FLAGS=-Wl,-dT=/dev/null \
            --test samples/bluetooth/peripheral_hr/\
              sample.bluetooth.peripheral_hr_rv32m1_vega_ri5cy

Note: The extra CMake flags are required if running with the official
      VEGABoard compiler, due to this linker issue:
      https://github.com/pulp-platform/pulpino/issues/240

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
Alex Porosanu d24213f4e4 samples: bluetooth: add overlays for RV32M1 SoC for BLW SW LL
Add the required specific HW configuration for SW defined
BLE LL on RV32M1 SoC, by means of DTS overlays:
- enable INTMUX0 channels 2 & 3
- route Generic FSK RF0 interrupt to INTMUX channel 3
- route LPTMR1 interrupt to INTMUX channel 2

This change is done for all Bluetooth samples that are intended to
run on RV32M1 using BLE SW LL.

Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
Andrzej Głąbek 76da963107 samples/boards/nrf91/nrfx: Align implementation with nrfx 2.0.0
Complement GPIOTE HAL function calls with the NRF_GPIOTE parameter.
Update nrfx_gpiote_init() function call with the newly introduced
parameter.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-11-08 14:54:12 +01:00
Kumar Gala 36c94ddd36 sensor: bmc150_magn: Convert to DTS
Convert bmc150_magn sensor driver to utilize device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala 62f5ac1ad4 sensor: bmg160: Convert to DTS
Convert bmg160 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala 7b8b5524be sensor: bmm150: Convert to DTS
Convert bmm150 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala ddddbf9f84 sensor: max44009: Convert to DTS
Convert max44009 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala 30ea840eb1 sensor: mcp9808: Convert to DTS
Convert mcp9808 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala 03c7cb4f46 sensor: sx9500: Convert to DTS
Convert sx9500 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala b388b178a0 sensor: tmp112: Convert to DTS
Convert tmp112 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala 0e9e67297e sensor: th02: Convert to DTS
Convert th02 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Andy Ross 8892406c1d kernel/sys_clock.h: Deprecate and convert uses of old conversions
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-08 11:08:58 +01:00
Peter A. Bigot a58d8ebaa6 driver: uart: make deprecation effective
Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings.  Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.

Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-07 12:44:15 -06:00
Trond Einar Snekvik 0151d6dc33 Bluetooth: Mesh: Model extension concept
Adds the model extension concept to the access layer, as described in
the Mesh Profile Specification, Section 2.3.6. Extensions are
implemented as a tree, using two pointers in each model:

The extends pointer points to the first extended model, and the next
pointer points to the next sibling or (if the NEXT_IS_PARENT flag is
set) the parent model in the tree, forming a cyclical "Left-child
right-sibling" (LCRS) tree. The tree root can be obtained by calling
bt_mesh_model_root_get(), and the extended models can be walked by
calling bt_mesh_model_tree_walk().

According to the Mesh Profile Specification Section 4.2.3, all models in
the same extension tree share one subscription list per element. This is
implemented by walking the model's extension tree, and pooling the
subscription lists of all models in the same element into one. If the
config server adds a subscription to a model, it may be stored in any of
the model tree's models' subscription lists. No two models in the same
extension tree and element will have duplicate groups listed. This
allows us to increase extended models' capacity for subscriptions
significantly.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-11-07 18:57:32 +02:00
Kumar Gala f8db0fa2eb watchdog: Remove CONFIG_WDT_0_NAME usage
Replace CONFIG_WDT_0_NAME with DT_ALIAS_WATCHDOG_0_LABEL in samples and
test code.  Now that all drivers are DT aware we don't ever set the
Kconfig option.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 13:51:20 -06:00
Erwan Gouriou 6994dcc30b shields: x_nucleo_iks01a1: Enable IRQ pin for LIS3MDL magn sensor
Update shield description and sample to allow testing of LIS3MDL
sensor IRQ pin.

Update sample yaml file to state dependency on arduino_gpio.
Additionally, fix redundant line in sample yaml

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-06 17:10:49 +01:00
Anas Nashif 7984f6c363 drivers: gpio: remove altera gpio driver
Remove unsupported driver.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-06 10:56:41 -05:00
Alexander Wachter ec721d4bb9 samples: basic: Remove disco sample
This commit removes the disco sample because it is basically
the same as blinky but with two LESs and adds no new value
to the samples.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-11-06 10:55:24 -05:00
Song Qiang 85a0cc8f9a boards: arm: 96b_argonkey: Update dma defconfig for tests
Previous defconfig for dma is DMA_STM32F4X in this board, while the new
generic driver uses DMA_STM32 to enable DMA support, and also dma driver
of stm32 now needs HEAP_MEM_POOL_SIZE to be big enough to hold dma
stream instances.

Additional .conf files are added for also adding HEAP_MEM_POOL_SIZE
configuration to two test cases.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-11-06 14:14:39 +01:00
Armando Visconti 4592be1664 sample/board: sensortile_box: add lis2md support
Add code to test lis2mdl magnetometer sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-11-05 15:42:00 -06:00
Jukka Rissanen c03af056a0 samples: net: zperf: Clarify that only iPerf 2.0.5 is supported
As the iPerf2 protocol is not documented properly, depend on
exact iPerf 2.0.5 version when testing.

Fixes #20313

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-11-05 09:29:15 -05:00
Ulf Magnusson 1f38ea77ba kconfig: Clean up 'config FOO' (two spaces) definitions
Must've been copy-pasted around.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Karsten Koenig 8a6fd43439 boards: riscv: rv32m1_vega: Add onboard SPI flash
Enable the MX25R32 SPI NOR Flash on the VEGAboard and provide board
config file for the spi_flash sample.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Kumar Gala 4cc91fdd00 sample/tests: replace DT_ define filters with dt_ functions
convert sample and test yaml filters that utilize a DT_ define to
instead use a dt_ function.  The intent is to remove the Kconfig
generated DT defines and just make directy queries into the device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-04 09:02:14 -05:00
Marcin Szymczyk d9611be72d samples: boards: nrf91: add nrfx sample
Adds a sample that shows how to use nrfx drivers in Zephyr.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2019-11-03 13:00:37 +01:00
Kumar Gala 00c7ce7942 linker: move where we define _LINKER and _ASMLANGUAGE
Move _LINKER and _ASMLANGUAGE to target.cmake because of how we pick the
linker script that might be used.  This way regardless of how or where a
linker.ld gets included we will always set _LINKER & _ASMLANGUAGE (so
any header that needs check based on those defines they can,
specifically generated_dts_board.h)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-03 12:55:16 +01:00
Alexey Brodkin 7c3498dc43 Samples: Add SMP Pi
This sample showcases efficient utilization of SMP system
with processing of independent resource-hungry workloads.

With no cross-dependencies between workers and no usage of shared
resources (during heavy-lifting itself) we may demonstrate almost
linear scaling of efficiency. I.e. 2 cores do the same amount of
calculations twice faster than only 1 core. 4 cores complete
the same calculations 2 times faster than 2 cores.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-11-03 12:41:29 +01:00
Andrew Boie 6f9280941f samples: add userspace producer/consumer sample
We try to demonstrate some concepts for user mode:

- Multiple logical applications, each with their own memory
  domain
- Creation of a sys_mem_pool and assignment to a memory
  partition
- Use of APIs like k_queue_alloc_append() which require
  thread resource pools to be configured
- Management of permissions for kernel objects and drivers
- Show how application-specific system calls are defined
- Show IPC between ISR and application (using k_msgq) and
  application-to-application IPC (using k_queue)

Fixes: #14683

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-10-31 14:46:08 +01:00
Loic Poulain b718165c32 samples: video: Fix board reference name
Fix board reference name in the documentation.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-30 18:33:18 +01:00
David B. Kinder 241044f178 doc: fix misspellings in Kconfig files
Fix misspellings in Kconfig files missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-30 10:24:30 +01:00
Wentong Wu 78cc4cb6a3 samples: add sample for logging syst format output
add sample for syst format output to prove the output can be
decoded by the existing decoder.

Fixes: #19841.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-10-29 10:18:51 +01:00
David B. Kinder 9b66efc858 doc: fix misspellings in rst docs
Fix some misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 06:01:13 +01:00
Jukka Rissanen 0f30bb23ab samples: net: echo-server: In case of socket error quit the app
Quit the accept loop if there is a socket related error as there
is no point of continuing in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-28 13:58:59 +02:00
Paul Sokolovsky 4e116873f5 samples: posix: gettimeofday: Demo gettimeofday() returning correct time
Achieved using CONFIG_NET_CONFIG_CLOCK_SNTP_INIT option, i.e. querying
time over network using SNTP.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-10-28 13:04:35 +02:00
Torstein Grindvik b422e4a8ea samples: Add PSK support for echo client/server
PSK support is added to echo-client.c and echo-server.c.
If enabled, a header is included which contains the PSK.
If the default dummy PSK header is used, a warning is issued.
The header can be changed via Kconfig.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2019-10-28 13:02:29 +02:00
Anas Nashif 8d22fd9263 updatehub: move header to library
Not a top-level zephyr core API and tied to third party environment, so
move it to where the code is in lib/updatehub.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-25 18:20:20 -04:00
Daniel Leung b7eb04b300 x86: consolidate x86_64 architecture, SoC and boards
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.

() Removes the x86_64:x32 architecture and SoC, and replaces
   them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
   qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-10-25 17:57:55 -04:00
Loic Poulain 40bae2ec8e samples: video: Add TCP server sink sample
This samples captures frames from video capture device (in any format),
and sends them to its TCP client.

Tested with:
 - mimxrt1064 + MT9M114 video sensor.
 - Gstreamer 1.8.3 running on host

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Loic Poulain ac785c0f9e samples: video: Add video capture sample
Simple video sample getting frames from video capture device.
Tested with mimxrt1064_evk and MT9M114 sensor.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Peter Bigot be7a4bf727 samples: sensor: add lis2dh sample
Basic polled and triggered sampling of accelerometer data from
LIS2DH-compatible sensors.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-25 11:02:58 -05:00
Oleg Zhurakivskyy 807662bf52 samples: net: echo-server: Increase the stack size for TCP2
Executing on qemu_x86 leads to stack overflows.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy da0f3311ff samples: sockets: Don't open the socket if the test protocol is enabled
In order to be able to run the sanity check, don't open the socket
if the test protocol is enabled.

Also add a debug print at the recv().

This commit will be dropped:

- As soon as the sanity check site accomodates
- As soon as the integration is complete

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy 2435629f61 net: tcp2: Add an overlay to enable E1000 Ethernet
This overlay is for the validation purpose.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy c08ebf6726 net: tcp2: Add an overlay to set the debug log levels
This overlay is for the validation purpose.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy 3dbbafb1d5 net: tcp2: Add an overlay for TCP2
Add an overlay for TCP.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Alexander Wachter 1b88658f9f samples: driver: Extend CAN sample
This commit adds sample code for bus state checking.
Printing the counter state is moved to own thread because the
ISR was blocking too long (messages were lost)

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-24 12:28:01 +03:00
Johann Fischer f00b272711 boards: reel_board: revise SPI routing
Revise SPI routing. Use slower SPI_1 for EPD and
SPI_3 for expansion connector.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-10-23 20:58:19 -04:00
Johann Fischer 39708536ba samples: mesh_badge: allow to build for any version of the reel board
Allow to build sample for any version of the reel board.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-10-23 20:58:19 -04:00
Johann Fischer 20a118b90c samples: mesh_badge: do not use edge led
Edge LED will be configured as pwm led,
do not use it in the mesh_badge sample.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-10-23 20:58:19 -04:00
Maureen Helm 65d9f541a7 boards: mimxrt1050_evk: Configure default sdhc instance at board level
Configures the default instance of the sdhc driver for the
mimxrt1050_evk board so applications don't have to configure it
explicitly. Similarly, enables the gpio instance required by the sdhc
driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-10-23 09:49:05 -05:00
Maureen Helm f8cfe453fd soc: nxp_imx: Configure default sdhc driver at the soc series level
Configures the default sdhc driver for the imx rt soc series so
applications don't have to configure it explicitly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-10-23 09:49:05 -05:00
Maureen Helm efa099e1f5 disk: Configure default sdhc volume name for fatfs
Configures the default sdhc disk volume name to "SD" when fatfs is
enabled. This prevents applications from having to configure it
explicitly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-10-23 09:49:05 -05:00
Jukka Rissanen 50f30919df samples: net: Add a multithreaded dumb HTTP server
This adds a multithreaded dumb HTTP server sample application similar
to dumb_http_server with following differences

* support both IPv4 and IPv6 simultaneously
* support multiple incoming connections
* support TLS connections
* ignore POSIX compatibility

This app can be used for testing. Note that the app will always
serve a same static HTML page to caller regardless of HTTP request
parameters.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-23 14:43:25 +03:00
Peter Bigot 040b1d676e samples: sensor: lps22hb: add sample
Copy and rename from hts221.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-22 17:56:56 -05:00
Mateusz Holenko 9a54a60def samples: spi_fujitsu_fram: fix dependencies
This sample will not compile for boards
not supporting GPIO.

Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Sergiy Nikolayenko 25164654dd Bluetooth: Keys: add key overwrite feature for key storage.
Key overwrite feature allows to overwrite old pairing key
records when key storage is full and a new pairing request occurs,
or new keys are distributed. If enabled when key storage is full and
a keys storage slot is requested, the oldest keys added will be
removed. So new devices can be paired with no limitations and no need
to determine, which devices should be unpaired to free key storage
space explicitly in application. To enable the feature set
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y.

Oldest keys are determined by minimum value of up-counting aging
counter. If you set CONFIG_BT_KEYS_SAVE_AGING_COUNTER_ON_PAIRING=y
aging counter values will be updated each time the secure connection
is established. This might increase flash wear out if at least two
secure connections are established and shut down periodically. When
the option disabled aging counter is still updated on each new secure
connection, but not stored to flash.

Signed-off-by: Sergiy Nikolayenko <sergiy_nikolayenko@jabil.com>
2019-10-17 22:20:55 +03:00
Peter Bigot ad4b365af8 samples: sensor: lsm6dsl: configure with trigger
This sensor defaults to no trigger, in which case no observations will
be read from the device.  Set to use the work queue (global) trigger.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-17 13:17:02 -05:00
Johan Hedberg 5537181e1a Bluetooth: Fix missing includes for hci.h
With the changes in PR #19836 applications now need to explicitly
include hci.h to use defines from it. Fix two sample/tests apps which
were missing this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-10-17 19:05:33 +03:00
Vikrant More f198258a8b samples: mesh: nrf52: removed redundunt code
Remove redundant code as per latest implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-10-17 12:31:35 +03:00
Vikrant More 4d55fa50c5 samples: mesh: nrf52: amendment in States restoration implementation
For Genric OnPowerUp equal to 0x02 (Restore):
If a transition was in progress when powered down, the element
restores the target state when powered up. Otherwise the element
restores the state it was in when powered down.

This commit implements above mentioned logic.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-10-17 12:31:35 +03:00
Francisco Munoz dda683a1b3 samples: drivers: kscan: Add kscan sample application
This illustrates how a keyboard matrix (laptop keyboard) reports
key events to a user application. In addition, it shows how to
handle the typematic rate and delay from user space.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-10-16 13:29:21 -07:00
Armando Visconti 1c9840c420 samples/96b_argonkey: microphone: (FIX) stop dmic trigger
Stop the trigger (DMIC_TRIGGER_STOP) after acquiring microphone data

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-10-16 13:05:55 -05:00
Jukka Rissanen 25c8f60fc3 samples: net: dumb_http_server: Using code block when needed
The ab command example needs to be inside code-block.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Jukka Rissanen 41202ba928 samples: net: sockets: Do not reference default board in docs
Some of the socket samples had wrong information about what default
board to use. Currently there is no default board and user must
select the board when building the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Joakim Andersson 15f755a910 Bluetooth: samples: peripheral_dis: Failed to save with custom settings
The Peripheral Device Information Service (DIS) sample implements it's
own custom settings backend in order to load runtime settings.
This results in errors when the BT stack tries to save entries through
the custom handler since no save handler exists.
Error messages:
 - bt_settings: Failed to save ID (err -2)
 - bt_gatt: Failed to save Database Hash (err -2)

Since this is not a sample of how to do custom settings backend it is
best simply to remove using the custom backend, as it is not required
in order to load runtime settings.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-16 16:39:47 +03:00
Peter Bigot 336c90f87c Bluetooth: samples: Reduce the bbc_microbit RAM usage
Reduce the RAM usage in hci_uart to fit in the BBC Microbit's RAM.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-16 15:38:12 +03:00
Erwan Gouriou 35eb46cec3 samples/bluetooth: peripheral: Remove nucleo_f429zi from withelist
samples/bluetooth/peripheral couldn't build on nucleo_f429zi
since settings dependency on flash erase bock size.
On this series, flash erase are done per sector with sector
having varying size, so erase block size can't be used directly.
This has to be sorted, but for now nucleo_f429zi is removed from
sample withelist to unlock CI.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-16 11:40:05 +02:00
Erwan Gouriou e1ae80c038 samples/bluetooth: peripheral: Support of x_nucleo_idb05a1 ble shield
Aim is to test x_nucleo_idb05a1 shield


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-15 18:15:55 -05:00
Nick Ward ef7a814179 samples: drivers: CAN: Remove legacy MCP2515 overlay
DFRobot CAN bus or link_board_can shields can now be used.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward 025901df4f samples: drivers: CAN: Update to build cleanly for MCP2515 driver
Add alternate conf file for MCP2515 so it builds without warning.
Update documentation.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Nick Ward cbaa75daff samples: drivers: CAN: Use common Zephyr bus-speed of 125kbit/s
Consistent use of 125000bit/s for Zephyr CAN code

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2019-10-15 15:48:43 +02:00
Jukka Rissanen dc7b307a47 logging: Print hexdumps with 16 bytes in one line
The hexdump was earlier printed using 8 bytes in one line like this

[00:00:00.131,143] <wrn> sample_instance.inst2: Example of hexdump:
01 02 03 04 05 06 07 08 |........
09 0a 0b 0c 0d 0e 0f 10 |........
11 12 13 14 15 16 17 18 |........
19 1a 1b 1c 1d 1e 1f 20 |.......
21 22                   |!"

This is not utilizing the width of the output best way possible.

Better utilization of the output is to print 16 bytes in one line
like this:

[00:00:00.131,136] <wrn> sample_instance.inst2: Example of hexdump:
01 02 03 04 05 06 07 08  09 0a 0b 0c 0d 0e 0f 10 |........ ........
11 12 13 14 15 16 17 18  19 1a 1b 1c 1d 1e 1f 20 |........ .......
21 22                                            |!"

In order to make it easier to find / calculate the bytes in the
output, print the output bytes in 8 byte groups.

This has the benefit that it is easier to map the Zephyr hex output
to Wireshark output which prints the bytes like this.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-11 17:53:50 +02:00
Kamil Piszczek 366cf363b2 samples: migrating to NVS backend with settings
Bluetooth samples now use the NVS backend for Settings.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-10-11 14:55:24 +02:00
Andrei Emeltchenko 3aac8e3e19 samples: usb: webusb: Update sample README
Add Requirements and Building instructions

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-09 17:16:41 -05:00
Andrei Emeltchenko 3fac9c183a samples: usb: wpanusb: Update documentation
Add sample location and fix incorrect goal for the
zephyr-app-commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-09 17:16:41 -05:00
Peter Bigot e28f330a8e coccinelle: standardize k_thread create/define calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments
to k_thread_create and K_THREAD_DEFINE to use the standard timeout
macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
Alexander Wachter 8b214117ec drivers: CAN: MCP2515: Move OSC frequency definition to device-tree
Move the oscillator frequency definition from Kconfig to device-tree.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-09 06:27:53 -05:00
David B. Kinder 82d6347355 doc: fix broken file and zephyr-app refs
found some references to files (via :zephyr_file: and :zephyr-app:) that
were moved, so the links were broken

Fixes: #19660

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-08 15:42:32 -05:00
Marti Bolivar 27e5dd131f doc: s/device tree/devicetree/
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Erwan Gouriou 54a5ae7bbf samples/shields: x_nucleo_iks01a3: Filter on RAM > 16kbytes
This sample requires a little but more than 8kbytes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-07 12:51:14 -05:00
Joakim Andersson d2c6982191 Bluetooth: samples: Add newline when using printk
Improve readability of security_changed printk usage, add missing
newlines.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-10-07 20:50:14 +03:00
Johann Fischer a599fd4e26 sample: lvgl: add test for the panels supported by WAVESHARE e-Paper
Add test for the panels supported by WAVESHARE e-Paper
shield.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-10-04 18:49:04 -07:00
Jukka Rissanen f2af3b66ff samples: net: mqtt_publisher: Use logging macros for output
Instead of printk(), use logging macros so that all the output
from IP stack and sample is nicely interleaved.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Jukka Rissanen 38f1357780 samples: net: mqtt_publisher: Enable net shell
Network shell is useful to have in order to debug things so
enabling it for this sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Jukka Rissanen cc76c75272 samples: net: mqtt_publisher: Add support for Websocket
Add a possibility to run MQTT over Websocket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Ioannis Konstantelias 656792d58f samples: sensor: tmp116: Add sample for TMP116
Added sample demonstrating the TMP116 temperature sensor.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-10-04 15:31:56 -05:00
Peter Bigot 66c8756956 coccinelle: standardize kernel API timeout arguments
Re-run with updated script to detect missed cases.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-04 16:23:57 -04:00
Andrei Emeltchenko 299c9fedd4 samples: net: Clean up netusb overlay configuration
Clean up configs which do not belong to Ethernet over USB.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 21:23:53 +03:00
Andrzej Głąbek 5239bef610 drivers: pwm_nrf5_sw: Remove PWM_NRF5_SW_0_DEV_NAME Kconfig option
This option determines the name under which the device represented by
the `sw_pwm` node is registered in the system. But when the value of
this option does not match the `label` property of the `sw_pwm` node,
a problem arises when the `sw_pwm` node is referenced by a "pwm-leds"
compatible node, since the `*_PWMS_CONTROLLER` macro that is generated
for this referencing node contains a non-existing device name (as it is
the `label` property value, not the Kconfig option value).
This commit solves the issue described above by removing the Kconfig
option and replacing all of its occurrences in sample applications
by the standard macro generated for the `sw_pwm` node, containing
the value of the `label` property of this node.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-10-04 17:21:32 +02:00
Jukka Rissanen b031a5a163 samples: net: websocket: App for doing Websocket client requests
This is BSD sockets based application for connecting to
Websocket server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 16:38:34 +03:00
Jukka Rissanen a07045d8b2 samples: net: http_client: HTTP client sample application
Simple HTTP client sample that connects to HTTP server and does
GET and POST requests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 16:38:34 +03:00
Andrei Emeltchenko 3c08b27ddf samples: net: dumb_http_server: Add zero configuration
Adds zero configuration based on LLMNR. This should be working in
Windows out of the box, zephyr can be accessed with http://zephyr/.
Can be combined with netusb configuration (RNDIS is supported in
Windows).

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 10:24:56 +03:00
Andrei Emeltchenko a080154584 samples: net: dumb_http_server: Add netusb configuration
Add configuration for netusb.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 10:24:56 +03:00
Peter Bigot ab91eef23b coccinelle: standardize kernel API timeout arguments
Use the int_literal_to_timeout Coccinelle script to convert literal
integer arguments for kernel API timeout parameters to the standard
timeout value representations.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-03 11:55:44 -07:00
Jan Van Winkel 391076c73e samples: net: echo-server: Init tcp6_handler_in_use for IPv6
Initialize tcp6_handler_in_use instead of tcp4_handler_in_use for IPv6
in start_tcp.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-10-02 10:07:03 +03:00
Peter Bigot 49d6837bec samples: move board overlay files into boards directory
Application board.overlay files tend to be paired with
boards/board.conf files that extend the functionality of a board.
Move the overlay files to the same location as the config files that
they work with.

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

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-01 20:38:24 -07:00
Andrei Emeltchenko e0fbac01a3 samples: usb: webusb: Update README and sample link
Update instructions and webusb sample link.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-01 18:11:13 -04:00
Anas Nashif 9d70a87f20 drivers: espi: move header to include/drivers
Driver APIs need to go into include/drivers/.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-01 16:18:36 -04:00
Jose Alberto Meza 953952adbd samples: drivers: espi: Remove delay from eSPI handshake
Make sure eSPI handshake is performed with eSPI master
once eSPI master power is up

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-10-01 09:24:42 -04:00
Jukka Rissanen 7e0d8bcf7a samples: net: echo-server: Add support for multiple listeners
By default only one listener is enabled, but if user specifies
CONFIG_NET_SAMPLE_NUM_HANDLERS with value larger than 1, then
multiple threads are created, and each will be able to accept
connections.

Fixes #19374

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-01 14:21:38 +03:00
Anas Nashif 2d4837061a tests: fix identifiers
Fix identifier and rename plain 'test' to something more appropriate.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-30 17:20:22 -04:00
Charles E. Youse dc8b3b1094 samples/board/x86_info: move to tests directory
This application's primary purpose is to provide some useful data to
the author of an x86 board support package for Zephyr-- it's not a
good sample.  It's not a good test either, but as a test it at least
prevents regressions in multiboot/ACPI builds.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-29 12:30:34 -07:00
Charles E. Youse 7637571871 arch/x86: rename CONFIG_X86_ACPI and related to CONFIG_ACPI
ACPI is predominantly x86, and only currently implemented on x86,
but it is employed on other architectures, so rename accordingly.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-29 12:30:34 -07:00
Charles E. Youse 200056df2f arch/x86: rename CONFIG_X86_MULTIBOOT and related to CONFIG_MULTIBOOT
Simple naming change, since MULTIBOOT is clear enough by itself and
"namespacing" it to X86 is unnecessary and/or inappropriate.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-29 12:30:34 -07:00
Charles E. Youse 2cf52476ea arch/x86: add support for non-trivial memory maps
x86 has more complex memory maps than most Zephyr targets. A mechanism
is introduced here to manage such a map, and some methods are provided
to populate it (e.g., Multiboot).

The x86_info tool is extended to display memory map data.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-29 12:30:34 -07:00
Charles E. Youse a414eb99cc samples/boards/x86_info: add platform information tool
This sample demonstrates basic use of the x86 multiboot and ACPI
systems, and also provides some useful information about the board
it's booted on: data handed over by the multiboot loader (which is
either QEMU or GRUB at this point), basic APIC CPU topology, and
timer driver frequency (computed empirically).

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-29 12:30:34 -07:00
Charles E. Youse ce46e0df4d cmake: samples/tests: update cmake_minimum_required() to 3.13.1
Some samples/tests are still referring to 3.8.x versions.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-27 23:09:24 -04:00
Anas Nashif 9be0f1d251 tests: move xtensa_asm2 tests to tests/arch
This is a test, so move it under tests/arch/..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-27 15:23:26 -04:00
Anas Nashif 32a9435ea4 tests: tracing: add tests for tracing features
Mostly build tests now, will be extended to verify CTF output once we
have this feature in sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-27 14:42:22 -04:00
Kamil Piszczek a320010e4a boards: x86: qemu_x86: adding nvs capability
Added the NVS capability to the QEMU x86 board description.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-09-27 10:06:40 -07:00
David B. Kinder fa9d8e09a0 doc: fix doc, boards, and samples misspellings
Regular scan for misspellings in documentation missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-27 11:44:00 +02:00
Andy Ross d1200d2155 tests: Never disable SMP
Disabling SMP mode for certain tests was a one-release thing, done to
avoid having to triage every test independently (MANY are not
SMP-safe), and with the knowledge that it was probably hiding bugs in
the kernel.

Turn it on pervasively.  Tests are treated with a combination of
flagging specific cases as "1cpu" where we have short-running tests
that can be independently run in an otherwise SMP environment, and via
setting CONFIG_MP_NUM_CPUS=1 where that's not possible (which still
runs the full SMP kernel config, but with only one CPU available).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-26 16:54:06 -04:00
Armando Visconti ff733369ec sample/shield: x-nucleo-iks01a3: add trig/temp/cfg support to LIS2MDL
Add support to LIS2MDL trigger, dynamic odr configuration as well as
temperature data reading.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-26 13:42:59 -07:00
Vincent Wan 17d0d8e1b3 modules: Kconfig.simplelink: Remove POSIX_API, use fine-grained opts
PR #18780 introduces a way to decouple pthread support from the general
CONFIG_POSIX_API global switch. This commit modifies the build of
SimpleLink components to take advantage of it, since SimpleLink
libraries only require pthread, sem, clock, and sleep support, not
entire POSIX API.

This fixes the build errors in the http_get sample introduced
by the merge of #18736. As such, this patch also removes
cc3220sf_launchxl exclude from sample.yaml of that sample.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-25 20:56:29 -07:00
Johann Fischer e4cb72e9d3 samples: lvgl: update README.rst
Update README.rst

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer 1609f4af52 samples: ili9340: add adafruit_2_8_tft_touch_v2 to samples test
Add adafruit_2_8_tft_touch_v2 to samples test.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer 65f00159c6 samples: lvgl: remove conflicting nrf52840_pca10056 overlays
Remove nrf52840_pca10056 overlays because of confict
with adafruit_2_8_tft_touch_v2 shield.

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

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Andrei Emeltchenko 549fbae43b drivers: watchdog: Trivial style cleanup
Cleanup coding style.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-09-24 11:40:53 -07:00
Andrzej Głąbek c24c463328 soc: nordic: Include <nrfx.h> instead of <nrf.h> from <soc.h>
This change is done so that there is no need to additionaly include
<nrfx.h> before <soc/nrfx_coredep.h> (what might be a bit surprising)
and so that <nrfx_config.h> doesn't need to be include separately for
nRF SoCs requiring a special mapping of peripheral accessing symbols.

This commit removes also no longer needed inclusions and updates
the hal_nordic module with required minor correction of nrfx_glue.h.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-24 16:20:16 +02:00
Radoslaw Koppel c68ff8b99c settings: Generic function to call set handler
This commit implements generic function to decide
witch functions to call for selected value name with given
loading parameters.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-09-24 14:15:38 +02:00
Radoslaw Koppel 6c2add5445 settings: Direct loading functionality
This commit allows loading data from settings permanent storage
directly to the given callback function.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-09-24 14:15:38 +02:00
Luiz Augusto von Dentz 03b9ce487c Bluetooth: GATT: Add support to setting permission on CCCD
This adds support to set different permissions to CCCD so security can
be checked when enabling notification which conforms to:

BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2360:

  '3.3.3.3 Client Characteristic Configuration

   Authentication and authorization may be required by the server to
   write the configuration descriptor.'

In addition to that also ensure that notification are not re-enabled
until the proper security level is reached to conform to the following
statement:

  '10.3.1.1 Handling of GATT indications and notifications

   A client “requests” a server to send indications and notifications
   by appropriately configuring the server via a Client Characteristic
   Configuration Descriptor. Since the configuration is persistent
   across a disconnection and reconnection, security requirements must
   be checked against the configuration upon a reconnection before
   sending indications or notifications. When a server reconnects to a
   client to send an indication or notification for which security is
   required, the server shall initiate or request encryption with the
   client prior to sending an indication or notification. If the client
   does not have an LTK indicating that the client has lost the bond,
   enabling encryption will fail.'

Fixes #17983

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-09-19 21:12:39 +03:00
Erwin Rol a720d38f29 samples: olimex_stm32_e407: fix coverity warning
Fix a Coverity warning when using %d to print the result
of a sizeof(...)

Since the result of the sizeof() use in the example
will always fit in a int, simply cast the result
to a int so the %d is always correct.

Fixes: #18373

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 11:07:57 -05:00
Armando Visconti af0e2c5df9 sample/board: add SensorTile.box sample for testing
Add sample to test SensorTile.box board.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Christoph Reiter 41f54f39c9 samples: fix signed overflow in blinky example
Overflow for int is undefined in C, change to u32_t where it is defined.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2019-09-19 09:31:41 -05:00
Paul Sokolovsky be1eac6058 samples: sockets: Fix syntax of combined "filter" clauses in sample.yaml
Now that we have support for properly combine conditions from multiple
"filter" clauses in one sample.yaml file (e.g. from "common" and
test-specific sections), use it instead of previous adhoc syntax
relying on string concatenation.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-19 00:29:41 -04:00
Johann Fischer ce1ef72448 boards: reel_board: add support for reel board v2
Add support for reel board v2.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-18 22:30:15 -04:00
Kumar Gala 7847348b8e samples: ipc: openamp: Add testing harness
Add console testing harness for expected output.  This allows us
to validate that the test is running properly on hardware.

We expect output of the form:

Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
    ...
Master core received a message: 95
Master core received a message: 97
Master core received a message: 99
OpenAMP demo ended.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 20:20:07 -04:00
Kumar Gala ae197ed395 samples: ipc: ipm_mcux: Add testing harness
Add console testing harness for expected output.  This allows us
to validate that the test is running properly on hardware.

We expect output of the form:

Hello World from MASTER! ARM
Received: 1
Received: 2
Received: 3
...
Received: 20
Received: 21
Received: 22
...

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 20:20:07 -04:00
Francisco Munoz bf6791ee78 samples: drivers: ps2: Add PS/2 driver sample app
This app illustrates a command sequence to enable PS/2 mouse

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Jose Alberto Meza 493e6c6265 samples: espi: mchp: Add MEC1501 modular board config for eSPI sample test
Add configuration for eSPI test for modular card

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-09-17 20:48:24 +08:00
Watson Zeng fd17b86b94 arc: hsdk: add lvgl support for hsdk board
The ARC HSDK board provides an Arduino shield interface,
we can use it for TFT TOUCH SHIELD.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2019-09-17 20:40:38 +08:00
Robert Lubos 324f99e0ac samples: net: Add mbedTLS tweaks in overlay-ot.conf
Add some mbedTLS tweaks for OpenThread in overlay-ot.conf.
Add sample configuration to enable Commissioner/Joiner, disabled by
default.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-09-17 20:07:58 +08:00
Johann Fischer cc9a96c88b sample: cfb: fix test sample.display.cfb.ssd1306
Fix extra_args for test sample.display.cfb.ssd1306.

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

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:49:37 -05:00
Johann Fischer fd8a27a51b samples: amg88xx: update README.rst
Update README.rst

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:27:21 -05:00
Johann Fischer feef83d864 drivers: amg88xx: rework sensor driver to use DT
Rework sensor driver to use DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:27:21 -05:00
Jan Van Winkel cb56813374 native: removed redundant compiler args MMD & MP
Removed redundant compiler command line arguments MMD and MP as MD is
already specified

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-17 11:27:19 +02:00
Jan Van Winkel 6a6c034749 samples: net: Moved declaration of packet_data
Move declaration of struct packet_data before definition of a variable
of its type.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-17 11:27:19 +02:00
Charles E. Youse 0f98cdd457 arch/x86: tests/cmsis: disable some CMSIS tests in 64-bit mode
The CMSIS layer doesn't like large stacks, and x86 in long mode
requires large stacks, so we disable these tests for now (as was
previously done on the x86_64 port for the same reasons).

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse 65b1f62ee3 arch/x86: disable inapplicable tests for Intel64
In long mode, x86 does not support static IDTs or OpenOCD,
so disable the tests related to these features.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Kumar Gala 29e55d74e8 rtc: Remove old rtc functionality
Remove the old rtc functionality as its been deprecated for 2 releases
now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-14 07:33:38 -05:00
Piotr Mienkowski d8fa80ffd7 boards: update arduino_due to use gpio_sam driver
Update configuration of arduino_due board to use a common gpio_sam
driver rather than sam3x specific gpio_atmel_sam3. The gpio_atmel_sam3
driver is going to be deprecated.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Paul Sokolovsky 1858b31536 samples: sockets: sntp_client: Build for both native Zephyr and POSIX
To make sure sntp API plays well with CONFIG_POSIX_API.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-12 17:30:29 +03:00
Armando Visconti b7944510a4 dts/bindings: sensors: remove '-magn' extension from lis2mdl name
The LIS2MDL is not a combo device, but pure magnotemeter.
Hence, '-magn' extension is not adding information and can
be removed from dts compatible name as well as binding filename.

Instead specify '-i2c' or '-spi' to distinguish between the names.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-12 07:58:34 -05:00
Johann Fischer 75b490efc2 sample: zperf: enable test for the shield link board ETH
Enable test for the shield link board ETH.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Ioannis Konstantelias e8b0f5644f samples: drivers: watchdog: Handle watchdog event
Also modified to timeout to 1000ms in order to support watchdogs like
WWDG with smaller timeouts.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Kumar Gala 702325ddb2 boards: Add arduino_gpio & and arduino_i2c to board supported
Update a number of boards that have arduino_gpio and arduino_i2c
support in their dts files to show that they support that in the
board.yaml file.  This allows coverage on several shield tests that
utilize the tags 'arduino_gpio' and 'arduino_i2c'.

Exlucde stm32mp157c_dk2 from some of the samples right now since the
connector on the board doesn't support A2/A3.  Also remove the duplicate
of exluding disco_l475_iot1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Kumar Gala 2ef86c9e00 samples: shields: x_nucleo_iks01a2: Depend on arduino_gpio
There are build issues with this sample now that it requires that the
board dts have an arduino_header node.  Add depends_on: arduino_gpio
to sample.yaml so we only build this if the board has that header.

Also remove a duplicate line for excluding the disco_l475_iot1 platform.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Kumar Gala e0a2086d9e samples: shields: x_nucleo_iks01a3: rename arduino_header depend
Change arduino_header depend to arduino_gpio as that is more meaningful.
Its easy to mistake arduino_header to mean the board has an arduino
header in general.  What we want to depend on is that we have the gpio
connector in the dts that has 'arduino_header' as the node label.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:51:25 -05:00
Trond Einar Snekvik 056d44f905 Bluetooth: Mesh: Remove special stack config
Removes the special stack config setting in the Bluetooth Mesh sample to
allow it to run with other Bluetooth controllers.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-11 14:04:16 +03:00
Trond Einar Snekvik 827a852acf Bluetooth: Mesh: Same config for all nrf51_qfaa boards in sample
Renames the nrf51_blenano config file to something generic and uses that
same config for the nrf51_ble400 board, which has the same constraints.

Cannot rely on the CONFIG_SOC_NRF51_QFAA variable, as the CONF_FILE
variable must be set before the boilerplate.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-11 14:04:16 +03:00
Kumar Gala 544921cd93 samples: CAN: Tweak GPIO flags in dts for mcp2515
Remove setting GPIO_DIR_OUT in the dts overlay for mcp2515 as a
precursor to new GPIO API work.  The flag isn't used for cs-gpio,
as we hard code GPIO_DIR_OUT in the spi controller code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 05:15:54 -05:00
Gregers Rygg 82c25587a2 doc: Correct gpio sample description
Fix a typo and add a few missing words

Signed-off-by: Gregers Rygg <gregers@telenordigital.com>
2019-09-10 16:13:39 -05:00
Ravi kumar Veeramally e2b1ec8565 samples: net: coap_client: Fix coverity issue
Ignore socket close() return value in this sample.

Fixes #18961

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-09-10 22:17:54 +03:00
Vincent Wan 3142503ecb samples: net: sockets: disable http_get in test build
Build errors were introduced by the merge of #18736. Until PR #18780 is
approved to allow the SimpleLink libraries to build without
CONFIG_POSIX_API, this patch excludes cc3235sf_launchxl from the test
build.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan fb0c846db9 samples: net: Adding board config files for CC3235SF
Config files are added to support cc3235sf_launchxl as a new board.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Johann Fischer 1dace68a69 sample: cfb: enable test for the shield ssd1306_128x64
Enable test for the shield ssd1306_128x64.

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

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-07 17:15:51 +02:00
Ulf Magnusson 2481a12529 samples: intel_s1000: Simplify code and fix pylint warning
Empty sequences in Python are falsy, so

    if len(config_file) != 0:

can be simplified to

    if config_file:

pylint warning:

    C1801: Do not use `len(SEQUENCE)` to determine if a sequence is
    empty (len-as-condition)

Simplify the code a bit with os.path.join(), which indirectly gets rid
of the warning. os.path.join('', 'foo') returns 'foo', so things work
out when os.path.basename() returns '' (no directory) as well.

I'm getting rid of pylint warnings for a CI check.

Also replace a '== None' with 'is None', which is more common.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:13:02 -04:00
David B. Kinder 891e50e088 doc: fix misspellings in documentation
Fix some misspellings found in .rst files missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 16:13:15 +02:00
Ioannis Glaropoulos ee74098450 tests: exclude twr_ke18f platform from several user mode tests
Several user mode tests cannot run on twr_ke18f because
either the platform does not have a sufficient number of
MPU regions required for the tests, or, the tests also
require HW stack protection (which has been, by default,
excluded in user mode tests for twr_ke18f board). We
excluded the board from all those tests.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 16:44:22 +02:00
David B. Kinder 60136f00cb doc: add how to exit from QEMU in samples
While trying out the hello_world sample built for QEMU, I was expecting
the sample app to exit and I'd return to a command prompt.  Nope.  You
need to exit QEMU manually, so add that step to the sample instructions.
Looking around, there are more uses of QEMU like this that could use
this added step after running the sample app.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 12:06:08 -04:00
Paul Sokolovsky 5eb974d8e7 samples: net: sockets: Allow to build and test with POSIX subsys
With CONFIG_POSIX_API enabled, these samples now build under Zephyr
with exactly the same source as e.g. Linux (or in general, other POSIX
systems). However, building without CONFIG_POSIX_API (i.e. with
CONFIG_NET_SOCKETS_POSIX_NAMES aux option) is retained for now.

Add testcase definitions to build these samples with CONFIG_POSIX_API
in CI.

Fixes: #17353

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-30 07:37:18 +02:00
Jukka Rissanen efecc28609 samples: net: dns: Do mDNS query always if mDNS is enabled
If mDNS is enabled, then do the mDNS query always. Earlier we did
the query after we had received response to the normal DNS query.
Also there is no need to print DNS id for mDNS queries as the id
is always 0.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-29 19:47:07 +02:00
Erwan Gouriou e15852cd62 samples: counter: Add err check on set_alarm call
Error checking was missing following call to
counter_set_channel_alarm.
This was reported in coverity report 203523.

Fixes #18374

Additionally remove unneeded err initialization in main function

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-08-28 09:19:23 -05:00
Piotr Zięcik b52a902fdf samples: logging: Add usermode showcase
This commit extends existing logging sample in order to present
logger usage from user mode thread.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-08-27 14:29:21 -04:00
Carles Cufi afcbc9992c doc: Use west everywhere to build and flash
Instead of having a mix of west and CMake/ninja instructions for
building and flashing, document it using only west. This will help
clarify that west is the default build tool in Zephyr and should also
reduce confusion over what tool to use.
Note that the biggest change is changing the default in
doc/extensions/zephyr/application.py for :tool:, from all to west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-27 19:36:24 +02:00
Jukka Rissanen cac26db2bc samples: net: civetweb: Ignore return values
We do not need the return values from various calls to pthread_*()
functions.

Coverity-CID: 203462
Coverity-CID: 203535

Fixes #18376
Fixes #18377

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-27 17:47:27 +02:00
Anas Nashif e844b9c844 samples: add harness to exclude from device testing
Set harness to led as a placeholder to avoid running samples on
platforms that do not have the needed hardware.

Fixes #17439

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-27 10:29:17 -04:00
Kumar Gala 9958757c0f samples: cdc_acm_composite: rework sample logging
Match the logging changes made in samples/.../usb/cdc_acm to the
cdc_acm_composite sample.  This allows any device testing checks to work
properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-27 10:28:24 -04:00
Anas Nashif 45326cff1c samples: arc_secure_services: fix harness
Fix sample on nsim simulator and add console harness to evaluate output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-27 09:56:38 -04:00
Joakim Andersson 3320b51644 Bluetooth: Host: Rename long error codes
Rename AUTHENTICATION, to AUTH, since this is a well established short
form of the word.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-27 15:13:25 +02:00
Joakim Andersson 3e9888105e Bluetooth: Host: Rename API function to initiate bluetooth security.
Rename bt_conn_security to bt_conn_set_security, this makes the API
naming more consistent.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-27 15:13:25 +02:00
Joakim Andersson 1c48757d94 Bluetooth: Host: Rename security level enum
Rename security level enum, using level and number instead of low,
medium, high and fips.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-27 15:13:25 +02:00
Kumar Gala 002c48ecf8 samples: nvs: Add testing harness
Add console testing harness for expected output.  This allows us
to validate that the test is running properly on hardware.

We expect output of the form (the Reboot_counter will increment
overtime).

Id: 1, Address: 192.168.1.1
Id: 2, Key: ff fe fd fc fb fa f9 f8
Id: 3, Reboot_counter: 5
Id: 4, Data: DATA
Id: 5, Longarray: 0 1 2 3 4 5 6 7 8 9 ... 7f

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-26 22:33:14 -04:00
Kumar Gala 41712b71b2 samples: CAN: Add testing harness
Add simple console testing harness for expected output.  This allows us
to validate that the test is running properly on hardware.

We expect the sample to report back somthing like:

Counter received: 1
Counter received: 2
Counter received: 3
Counter received: 4
...

etc.

So have a simple regex check for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-26 22:33:14 -04:00
Joakim Andersson 6d4b842a10 Bluetooth: Host: Add error to security changed callback
Add security error to security_changed callback. Call this callback when
security has failed and provide current security level and error.
Reason for failure can be.
 - Pairing procedure failed, pairing aborted before link encryption.
 - Link encrypt procedure failed
 - Link key refresh procedure failed.

Fix missing bt_conn_unref on encryption key refresh with error status.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-26 13:12:49 +02:00
Joakim Andersson 1fb68828ef Bluetooth: SMP: Add pairing failed reason
Forward the pairing failed SMP status code to the application

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-26 13:12:49 +02:00
Michael Scott 7492555f88 samples: net: lwm2m: bootstrap support changes:
When LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP is enabled:
- Mark the first server as a bootstrap server
- Create second server and security instances (used by bootstrap
  server)

This allows bootstrap support to be tested out of the box with
the following:
- setup Leshan bss-server-demo (bootstrap server) on port 5783
- setup Leshan server-demo (lwm2m server) on port 5683
- add an entry into the bootstrap server:
  LWM2M Server=coap://[2001:db8::2]:5683
- build the sample like so:
  west build -t run -b qemu_x86 \
    -s zephyr/samples/net/lwm2m_client/ -- \
    -DCONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y \
    -DCONFIG_LWM2M_PEER_PORT=5783

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-24 11:04:25 +02:00
Piotr Zierhoffer 0c378149c4 samples: net: civetweb: Remove an unnecessary config option
CONFIG_NET_SOCKETS_POSIX_NAMES is incompatible with POSIX_API, so it's
disabled by the build system. It's no longer required anyway.

It is a leftover from before #16557 was merged.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-08-23 21:14:16 +02:00
Johann Fischer 6de84125d3 samples: cdc_acm: rework sample logging
Use  LOG_LEVEL_INF as defautl log level and use LOG_INF
for important messages. Relax while loop and
give CPU resources to low priority threads like logging.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-08-23 15:47:06 +02:00
Luiz Augusto von Dentz 5f3595e47c Bluetooth: GATT: Fix using variable size storage for CCC
This removes the necessity of registering the storage for CCC and make
it part of the declaration itself.

Fixes #18547

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-08-22 15:14:39 +03:00
Kumar Gala 6f473e9240 samples: usb: webusb: Mark harness as TBD
Mark harness as TBD as we haven't defined how to test/validate this
sample on real hardware.  As such marking it 'harness: TBD' will get it
skipped from being attempted to run on hardware via --device-testing

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-22 07:08:20 -04:00
Paul Sokolovsky e27b0876c3 samples: shell: fs: README: Typo in "pkgconfig" name.
Was "pkconfig", which may confuse users whether some different tool
than the standard pkgconfig is meant.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-20 18:04:21 -04:00
Johann Fischer bd72ea1df9 samples: mesh_badge: fix font size
The order of the fonts in ROM has changed.
Since the sorting is not wrong, correct the
order in the application.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-08-20 16:18:02 +02:00
Peter Bigot 4914d0db3b samples/subsys/logging/logger: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-19 23:36:59 +02:00
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
Ravi kumar Veeramally 85ef00deb4 samples: net: echo_client: Add SOCKS5 support
SOCKS5 support added to echo_client. Details are added
in README file about how to verify this feature using
echo-client with echo-server running on Linux host.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-08-17 23:22:06 +02:00
Tomasz Gorochowik 0409dd1ce8 Samples: net: civetweb: add README
Closes: #18212

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-08-16 11:37:54 +02:00
Jan Van Winkel 440aae75c7 samples: Corrected typos in updatehub sample
Corrected typo in board name in updatehub sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-08-15 23:11:53 +02:00
Carles Cufi 9be6fb0ba2 Bluetooth: samples: Reduce the bbc_microbit RAM usage
Reduce the RAM usage in two of the Bluetooth samples in order for them
to fit in the BBC Microbit's RAM.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-15 15:07:12 +02:00
Wayne Ren 5a0acd5105 samples: add sample to show how ARC TEE works
* this is a simple sample to show how
 secure applicaiton and non-secure application work
 together. More details are in README.rst

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-08-10 17:45:22 +02:00
Jan Van Winkel fa27e583a1 gui: Disable LVGL features by default
Removed 'default y' from LVGL Kconfig files to disable features by
default

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-08-09 07:35:38 -05:00
Ioannis Glaropoulos 8dc83c1d94 tests: several tweaks for passing tests on qemu
This commit includes tweaks in several tests, so
that the tests can be passing on ARM QEMU targets,
mps2_an385 and mps2_an521 with Qemu 4.x release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-08 21:56:45 +02:00
Marc Reilly 40a3e600a9 samples: display: add a simple sample for st7789v display
This adds a basic app which puts some rectangles on the display

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

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2019-08-08 10:11:47 -05:00
Alexander Wachter f8a5b013d7 samples: net: echo_client and echo_server: Add 6LoCAN config
This commit adds a sample configuration for 6LoCAN to the
echo_client and echo_server example.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-08 13:25:01 +03:00
Alexander Wachter 35f01673ac net: l2: 6LoCAN implementation
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-08 13:25:01 +03:00
Loic Poulain 16d8ce519c sample: blink_led: Adjust PWM period
The maximum period a PWM controller can generate depends on its input
clock and its resolution (16-bit, 32-bit...). Setting a 1s max period
generates error with some hardwares (mimxrt1064_evk) because of clock
limitation.

This patch fixes this issue by calculating maximum period of the PWM
device to adjust max and min periods accordingly.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-08-07 07:38:40 -05:00
Jukka Rissanen 303ef27535 samples: usb: hid-cdc: Use proper value in k_busy_wait()
The wait time value should be in microseconds.

Fixes #18059

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-07 12:24:23 +02:00
Jukka Rissanen 1c65789d85 samples: net: zperf: Use proper value in k_busy_wait()
The wait time value should be in microseconds.

Fixes #18059

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-07 12:24:23 +02:00
Peter A. Bigot 167eb53e74 subsys/fs/littlefs: allow customization of file system configuration
There's desire to be able to customize parameters on a per-filesystem
basis, which means we need a way to override the Kconfig defaults which
are global.  This also means the littlefs data structure cannot own the
cache and lookahead buffers.

Switch to using a macro to define the littlefs data structure.  The
default version uses the Kconfig constants.  A custom one takes
arguments providing the most likely partition-specific parameters.
Finally the user is free to bypass the helper macros and set any
parameters desired, though validation is limited and only present when
CONFIG_DEBUG is enabled.

Extend the test suite with a performance module, which confirms that
these settings have an impact proportional to the log of changes to the
cache or IO sizes.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-08-06 19:39:26 +02:00
Peter A. Bigot 5fe2591074 subsys/fs/shell: add littlefs support
Add support for the littlefs file system in the fs shell.  Update
the sample to use the same partition configuration as the littlefs
example for the SPI NOR test platform.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-08-06 19:39:26 +02:00
Peter A. Bigot cfa64bde1c samples/subsys/fs/littlefs: add a basic sample
Uses a littlefs file system to maintain a boot counter.  Also tests some
other functions.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-08-06 19:39:26 +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
Ravi kumar Veeramally fa7a5db12e samples: net: Modify mqtt_publisher to use set proxy
Modify mqtt_publisher sample to use mqtt_client_set_proxy().
Removed CONFIG_MQTT_LIB_SOCKS based setup.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-08-05 13:26:11 +03:00
Joakim Andersson c1a754f665 Bluetooth: Host: Print error codes in hex
Error codes are listed in header files and in the core spec as hex
values. Always print them in hex in debug for easier error code
checking.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-05 12:18:17 +02:00
Michael Scott efa1679806 samples: net: lwm2m_client: support for compiling in new objects
Let's add support for recently added LwM2M objects:
- Connectitiy Monitoring
- Location
- IPSO Accelerometer
- IPSO Buzzer
- IPSO On/Off Switch
- IPSO Push Button

Currently, this is limited to compile enabled and manual creation
of objects via LwM2M server.  Objects will respond to read/write
operations, but not have real HW backing.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 8817d930a8 net: lwm2m: rework resource instance storage / access methods
LwM2M allows for multiple instance resources such the power source
resources in the device object.  These types of resources have
always been very hard to work with, and frankly were poorly
implemented.

This led to other issues where it was very hard to have
non-sequential resource instances, and each resource of this type
needed special getter / setter methods such as:
lwm2m_device_add_pwrsrc()
lwm2m_device_set_pwrsrc_voltage_mv()

Going forward, as more LwM2M objects are implemented this just
doesn't scale well.

To fix this:
- split the resource instance data out from the resource data.
  This includes the data pointer information and resource
  instance id.
- add resource id and resource instance id to the event callback
  functions so user's can see in more detail what resources and
  resource instances are being handled.
- allow generic functions like lwm2m_engine_get_*() and
  lwm2m_engine_set_*() to access resource instance data.
- adjust object resource initialization  macros to map resource
  instances to resources at the time of object instance
  creation.
- fix up the lwm2m_client as a reflection of all of these changes.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 3217129f5d samples: net: lwm2m_client: send temp value back to engine
By sending the temp value back to the LwM2M engine, it allows all of
the min/max values to be updated over time.

Fixes an issue where min/max values were not being updated.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 7ac1cbfe21 samples: net: lwm2m_client: set LWM2M_COAP_BLOCK_SIZE to 512
The native Zephyr LwM2M client enables the JSON formatter which
can use more of the packet buffers than the default 256 with
TLV formatting.  Let's set the default to 512 in order to avoid
cutting off the output of larger READ operations.

In the future, we should establish block transfer buffers to
handler longer READ ops.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 9534bbd991 net: lwm2m: add missing application type to IPSO Light Control
Per IPSO Light Control definition from the OMA LwM2M registry:
http://www.openmobilealliance.org/tech/profiles/lwm2m/3311.xml

There is an optional "Application Type" string resource (5750) in the
Light Control object.  This was missed in the initial implementation.

NOTE: sample will assign reference if needed.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott a33a6f7754 net: lwm2m: remove data storage for IPSO Timer application type
We are pre-allocating a storage variable for the application type
resource in the IPSO Timer object.  This is an optional resource
which won't always be set by samples.

Let's leave out the pre-allocated variable and let the sample set
this reference if needed (it's optional).

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Carles Cufi 26b438042c samples: net: civetweb: Remove strcspn() implementation
Now that strcspn() is implemented in our minimal libc, remove it from
the civetweb sample to avoid the linker complaining about multiple
definitions.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-31 16:30:32 -05:00
Reto Schneider 61733a8fe5 sample: button: Fix format specifier
k_cycle_get_32() returns an unsigned 32-bit integer, while the '%d'
specifier denotes a signed integer.
Using the proper C99 format specifier resolves the problem.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2019-07-31 17:11:19 +02:00
Armando Visconti 48602c4b93 sample/shield: x-nucleo-iks01a3: add support to STTS751
Configure and read data from STTS751 temperature sensor
in standard mode.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-31 10:32:10 -04:00
Karl Zhang dea40b6342 Musca B1: MHU: IPM MHU dual core on V2M Musca B1
Add support for ipm_mhu_dual_core sample on Musca B1.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-07-31 10:31:29 -04:00
Tomasz Gorochowik f2bf9a17c5 samples: net: Add civetweb HTTP sample
This commit adds civetweb as a west module and a sample that uses it.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-07-30 13:17:55 +03:00
Anas Nashif 578ae40761 boards: remove quarl_se_c1000
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
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
Jukka Rissanen a62c6b2b04 samples: net: echo-server: Add PPP overlay config file
A sample overlay config file for PPP added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-29 10:24:46 +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
Robert Lubos 54eb4adff9 samples: net: echo_client: Fix bug in workqueue processing
The `start_udp_and_tcp` funcion is a blocking function, therefore it
should not be called from the system workqueue, as it would stall it.
Because it was called in such a way, the retry mechanism, which
also relied on the system workqueue did not work properly.

This commit fixes the issue, by keeping the main application processing
in the main thread, and using a semaphore to synchronize with the
connection manager.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-07-25 14:26:27 +03:00
Peter A. Bigot bea5e11784 samples/subsys/fs: move existing test into fat_fs
The sample is specific to the SDHC/fat_fs API.  Move it down to make
room for other file systems.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-25 06:39:55 +03: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
Piotr Zięcik ec857d0e4a logging: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
On some SoCs the frequency of the system clock is obtained at run time
as the exact configuration of the hardware is not known at compile time.
On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
directly introduces timing errors.

This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
to inline function sys_clock_hw_cycles_per_sec() which always returns
correct frequency of the system clock.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-24 15:10:02 +02:00
Jan Van Winkel ded4ba091f samples: fs: Corrected flash ctrl name in fs shell
Corrected the flash controller name in the FS shell sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-22 18:44:11 +02:00
Carles Cufi ff0b76ea4a samples: usb: console: Remove overlay file
After the removal of the virtualcom DT node in 5071eee, using the chosen
node is no longer functional. Instead the Kconfig
CONFIG_UART_CONSOLE_ON_DEV_NAME is used to locate the correct UART.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-22 16:20:11 +02:00
Jan Van Winkel 6b8433bd33 samples: fs: Added libfuse req. to fs shell README
Updated fs shell sample readme to state the requirement of a 32-bit
version of libfuse while building for native_posix board

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-22 15:08:36 +02:00
Maksim Masalski 9901d8cf4b samples: sample modified according to the changes in Zephyr macros
main.c file changes
1. Renamed <board.h> to <device.h>
2. <misc/printk.h> now is inserted into <sys/printk.h>
3. <i2c.h> and <gpio.h> now are inserted into
<drivers/i2c.h> and <drivers/gpio.h>
4. Deleted <errno.h> because it is not using
5. Deleted <pwm.h> because it is not using
6. Deleted <display/mb_display.h> because it is not using
in that project (legacy from old project).
7. Now we use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS} ,
so renamed SW0_GPIO_CONTROLLER to DT_ALIAS_SW0_GPIOS_CONTROLLER

prj.conf file changes
1. Deleted CONFIG_SYS_CLOCK_TICKS_PER_SEC=250
because apps shouldn't set tick rate.

Made a line follower robot sample using DFRobot Maqueen chassis
for micro:bit board. Deleted unused files.

Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-07-18 15:16:06 +02:00
Peter A. Bigot 0626c8f1d3 samples: add board customization for native_posix_64
Sample applications for display functions do not work on native_posix_64
due to missing overrides.  Clone the native_posix_64 Kconfig override
for all samples that have a native_posix Kconfig override.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-17 15:29:42 -07:00
Nicolas Pitre 6609c12516 tests: enable native_posix_64 testing
Whenever conditions are applied to native_posix, they should apply to
native_posix_64 too.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-16 10:41:11 -07:00
Marc Herbert c429051380 tests/net/: samples/net/: add a few 'userspace' tags
See commit message 4afcc0f8af for the long story.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-15 09:05:10 -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 587d0ec252 samples: webusb: 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 e99c4d2dda samples: servo_motor: 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 7727972f93 samples: fade_led: 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 decb773c4f samples: blink_led: 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 a9b32e26b9 samples: hci_usb: 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 343d9ccd06 samples: hid-mouse: use DT filtering instead of platform_exclude
Do not platform_exclude, instead use DT filter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif 0277f1afb7 samples: console: 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 d092952c54 samples: mass_storage: 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 84e87a1eb4 samples: net: quark/arduino 101 do not have ethernet support
Remove old configurations of boards that do not support networking
natively and very custom and difficult to test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif 66b081d24a samples: quark_se_c1000_devboard does not have Wifi
Remove custom configuration that does not support Wifi natively.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif 7d309ee733 samples: grove_temperature: cleanup whitelisting
Do not whitelist on boards, rely on features instead. Turns out we do
not need I2C enabled as well.

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
Jukka Rissanen a845c57bd7 samples: net: echo-client: Start service in correct time
Start to monitor Connected and Disconnect events and then start
and stop the echo service according to system connectivity status.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-12 12:33:19 +03:00
Christian Tavares f59af49472 samples: gui: lvgl: fix the nRF52840 pins to run sample
this commit correct the #17460 issue

Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
2019-07-11 20:15:00 -07:00
Nicolas Pitre 0aa796cbaa print format: adjust specifiers to be compatible with a 64-bit build
The size_t type is either compatible with an int on 32-bit target, or
a long on 64-bit targets. It could even be a long even on some 32-bit
targets. Let's use the z qualifier in the printf format to be compatible
with whatever flavor in use.

In case of pointers, let's just use %p with pointers directly and
avoid casts altogether.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-11 20:12:26 -07:00
Joakim Andersson 99e8710a50 Bluetooth: services: Delete unused IPSP sample
Delete IPSP sample file, this source file is not included in any build
files. The service contains no valuable logic other than advertising
with the IPSP service in the advertising data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson 26ca3682bd Bluetooth: services: Move HID over GATT service
Move the HID over GATT service into the sample that demonstrates it.
This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson 88f13ebab6 Bluetooth: services: Move Current Time service sample
Move the Current Time service into the sample that demonstrates it.
This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson eecc58fafd Bluetooth: services: Move health thermometer service
Move the health thermometer service into the sample folder that
demonstrates it. This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson 029a66a195 Bluetooth: services: Move Heart rate service
This commit moves the BLE GATT heart rate service from
samples/bluetooth/gatt to subsys/bluetooth/services and adds a Kconfig
entry to enable and configure the service.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Emanuele Di Santo 30d65809fc Bluetooth: services: battery service enhancements
This commit moves the BLE GATT Battery service
from /samples/bluetooth/gatt to /subsys/bluetooth/services and
adds a Kconfig entry to enable and configure the service;
when enabled, it will register itself automatically.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Michael Scott c69081d775 boards: arm: nrf52840_pca10056/nrf52_pca10040: enable pyocd runner
Mbed OS provides a DAPlink firmware update for nRF52840-DK here:
https://os.mbed.com/platforms/Nordic-nRF52840-DK/
and for nRF52-DK here:
https://os.mbed.com/platforms/Nordic-nRF52-DK/

When using this firmware we need to flash the board with the pyocd
runner.  Let's enable the pyocd runner for this purpose.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-07-10 12:11:46 -05:00
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
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
Maureen Helm 4d5ee282be samples: net: Convert mcr20a samples to use the frdm_cr20a shield
Converts all net samples that enable the mcr20a 802.15.4 driver to use
the frdm_cr20a shield instead of hardcoding configs for the frdm_k64f
base board. This makes it possible to build mcr20a samples for other
base boards with compatible arduino headers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-07-09 18:15:45 -07:00
Michael Scott 13086ccda8 net: lwm2m: dont select MBEDTLS or set MBEDTLS options in subsys
If a sample wants to use the Zephyr implementation of mbedtls, it
enables CONFIG_MBEDTLS and sets any needed Zephyr-specific mbedtls
options.

Currently, the LwM2M subsystem selects MBEDTLS automatically when
LWM2M_DTLS_SUPPORT is enabled.  Let's remove this and let the
LwM2M client sample enable mbedtls and it's options.

This mimics the behavior of several other network-related samples
and removes conflicts when selecting alternate implementations of
MBEDTLS.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/17399

Signed-off-by: Michael Scott <mike@foundries.io>
2019-07-09 21:08:47 +03: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
Armando Visconti 75e1f4ef1a sample/shield: add support to x-nucleo-iks01a3 shield
Provide two basic example samples to test the x-nucleo-iks01a3 shield:

    - Standard (Mode 1)
    - SensorHub (Mode 2)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-08 10:07:23 -05:00
Sathish Kuttan 3d32acf376 samples: intel_s1000: update sample audio app doc
Update to documentation for the sample audio application running
on Sue Creek S1000 board from Intel.
Added section on how to control the audio application on target
from a Linux host and updated the console output section
accordingly.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan a4c3de16f2 samples: intel_s1000: script to control from host
Add python script and associated configuration YAML file
to control audio sample application running on
Intel Sue Creek S1000 from a Linux host.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan 192ca06a9e samples: intel_s1000: add files to cmake build
Add tuning driver, audio block processing threads,
background processing thread and USB transport driver
to the cmake build in audio sample app.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan dff993ba11 samples: intel_s1000: update project configration
Add USB HID configurations to the audio sample app project
configuration.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan c3bf362c28 samples: intel_s1000: tuning commands in audio app
Add processing of sample tuning commands in the audio
sample app.
Add audio processing stubs.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan 47e2e624c8 samples: intel_s1000: track status of audio app
Add a status check to start/stop audio in order to start
audio only if it's not already running and to stop audio
only if it is running.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan 75ff541a01 samples: intel_s1000: add background thread
Add background thread in audio sample app for
Intel® Sue Creek S1000 board

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan a2f1ad41e8 samples: intel_s1000: audio processing threads
Add processing threads for small/large audio blocks
in audio sample app for Intel® Sue Creek S1000 board

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan 881971ad26 samples: intel_s1000: tuning driver for audio app
Add a tuning interface driver to send receive tuning/control
commands over a USB transport.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan 3adf7e034e samples: intel_s1000: USB control for audio sample
Add USB transport driver to control the sample application
from a host connected to Intel® Sue Creek S1000 board
via an USB interface.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Nicolas Pitre d19a5f9119 net: socket: mgmt: use uintptr_t for the nm_pid field
This may contain a pointer so make sure it is sufficiently wide
on 64-bit targets.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-05 10:06:23 -04:00
Johann Fischer fc57ea8d3c drivers: ssd1673: rename driver to ssd16xx
ssd1673 driver supports different controllers,
rename it to more generic ssd16xx.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-07-04 07:27:09 -04:00
Jukka Rissanen 530a1e5415 samples: net: echo_server: Enable SO_TIMESTAMPING if needed
If user has set CONFIG_NET_CONTEXT_TIMESTAMP then enable
network packet throughput collection for UDP packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-03 09:42:45 +03:00
Andy Ross ee4c23cc1f CMSIS v2: Work around time unit confusion
The current CMSIS v2 implementation is clearly assuming that timeout
arguments being passed to e.g. osDelay() are in units of Zephyr ticks,
not milliseconds as specified by ARM or (inconsistently) assumed by
our test code.

Most tests work with the ~100 Hz default tick rate, but they tend to
fail on precision issues at higher tick rates.  Force the CMSIS v2
applications to be 1000 Hz for now as a workaround, and detect the
mismatch as a build failure.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-07-02 22:52:29 -04:00
Andy Ross 669730f030 kernel: Crank up default tick rate
When tickless is available, all existing devices can handle much
higher timing precision than 10ms.  A 10kHz default seems acceptable
without introducing too much range limitation (rollover for a signed
time delta will happen at 2.5 days).  Leave the 100 Hz default in
place for ticked configurations, as those are going to be special
purpose usages where the user probably actually cares about interrupt
rate.

Note that the defaulting logic interacts with an obscure trick:
setting the tick rate to zero would indicate "no clock exists" to the
configuration (some platforms use this to drop code from the build).
But now that becomes a kconfig cycle, so to break it we expose
CONFIG_SYS_CLOCK_EXISTS as an app-defined tunable and not a derived
value from the tick rate.  Only one test actually did this.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-07-02 22:52:29 -04:00
Andy Ross f288d1e4a7 tests: samples: Apps shouldn't set tick rate
Tick rate is becoming a platform tunable in the tickless world.  Some
apps were setting it due to requirements of drivers or subsystems (or
sometimes for reasons that don't make much sense), but the dependency
goes the other way around now: board/soc/arch level code is
responsible for setting tick rates that work with their devices.

A few tests still use hard-configured tick rates, as they have
baked-in assumptions (like e.g. "a tick will be longer than a
millisecond") that need to be addressed first.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-07-02 22:52:29 -04:00
Marc Herbert d8c5c9dcf1 samples/**/external_lib: invoke $(MAKE) instead of make
Recursive make should be invoked as $(MAKE) and not "make" for reasons
documented at
 https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html

$(MAKE) is what CMake puts in all the CMakeFiles/Makefile2 it generates,
it doesn't use "make" either.

Issue found thanks to the following warning:
 build.log:make[4]: warning: jobserver unavailable: using -j1.
                    Add '+' to parent make rule.

If CMake is invoked with -GNinja or other then fall back on "make" as
before and pray that it's available.

Fast reproduction with:
   make -j2 -C build clean mylib_project VERBOSE=1

Build directories have been compared before/after this change and
there's zero difference except the generated
mylib_project.dir/build.make file (and the warning above) when using
make.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-02 10:36:52 -05:00
Aaron Tsui b0e58d62ab samples: bluetooth: peripheral_ht: Health Thermometer sample
Adding Health Thermometer Service sample. Refer to Health Thermometer
Profile Specification for detailed information about the Health
Thermometer Profile.

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-07-02 17:06:07 +03: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
Daniel Egger 08d10e1793 samples: net: lwm2m_client: If hwinfo interface is enabled, use it
Previously we always used the board identifier (via CONFIG_BOARD) as
identifier, however this causes troubles in case of tests with multiple
boards of the same kind on the same server. The device_id addresses that
problem nicely if enabled and supported by the architecture.

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2019-07-02 11:36:26 +03:00
Jukka Rissanen 645d2b204b samples: net: sock: mgmt: Print IP addresses for each event
Print IP address for added or removed IP address. This helps
to understand what IP address is being removed or added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-01 13:50:08 -07:00
Jukka Rissanen c283016f3d samples: net: sock: mgmt: Add network management socket app
A simple application that listens network management events
using BSD socket API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-01 13:50:08 -07:00
Henrik Brix Andersen 917890a544 samples: sensors: fxos8700: add support for twr-ke18f board
Add support for the FXOS8700CQ present on the NXP TWR-KE18F
development board. The FXOS8700CQ IRQ lines are not connected by
default on the TWR-KE18F, so only polling (no trigger) is supported.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-07-01 11:41:25 -05:00
Henrik Brix Andersen 506256c7cc samples: sensors: fxos8700: add polling support
Add support for polling the sensor values of the FXOS8700 device when
no trigger (interrupt) is enabled.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-07-01 11:41:25 -05:00
Johan Hedberg 0d9dab300e Bluetooth: Introduce separate pool for discardable events
Introduce a separate buffer pool for events which the HCI driver
considers discardable. Examples of such events could be e.g.
Advertising Reports. The benefit of having such a pool means that the
if there is a heavy inflow of such events it will not cause the
allocation for other critical events to block and may even eliminate
deadlocks in some cases.

Also update all mesh samples not to specify explicit RX buffer counts
anymore. Instead, create appropriate defaults in Kconfig so that we
only need to override this in the app for cases like the bbc:microbit
with limited memory.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-07-01 16:36:15 +03: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
Kumar Gala 24b2b594dc dts: Rename PWM to PWMS
We use the following commands to rename any _PWM_{CONTROLLER,CHANNEL}
to *_PWMS_{CONTROLLER,CHANNEL}

Used the following commands to make these changes:

git grep -l '[A-Z_0-9]*_PWM_CONTROLLER' | xargs sed -i 's/\([A-Z_0-9]*\)_PWM_CONTROLLER/DT_ALIAS_\1_PWMS_CONTROLLER/g'
git grep -l '[A-Z_0-9]*_PWM_CHANNEL' | xargs sed -i 's/\([A-Z_0-9]*\)_PWM_CHANNEL/DT_ALIAS_\1_PWMS_CHANNEL/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-28 06:53:48 -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 efb8df5366 cleanup: include/: move misc/stack.h to debug/stack.h
move misc/stack.h to debug/stack.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