Commit graph

463 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

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

Fixes: #19660

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-08 15:42:32 -05:00
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
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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
Anas Nashif 5d001f3e41 cleanup: include/: move misc/byteorder.h to sys/byteorder.h
move misc/byteorder.h to sys/byteorder.h and
create a shim for backward-compatibility.

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

Related to #16539

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

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

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 8c1f89fa99 cleanup: include/: move sensor.h to drivers/sensor.h
move sensor.h to drivers/sensor.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 5843884887 cleanup: include/: move pwm.h to drivers/pwm.h
move pwm.h to drivers/pwm.h and
create a shim for backward-compatibility.

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

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

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

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Andy Ross b56cc058ef samples/boards/nrf52/power_mgr: Correct test integration
The regexes for the power states entered were in the wrong order, and
this tests takes 2 minutes to get to that point, blowing past the
default sanitycheck timeout.

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

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

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

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

The replacement was done with

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

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

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

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

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

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-19 10:40:10 +02:00
Laczen JMS 8ca8708224 subsys/settings: Update client modules
This updates all client modules to const char processing of
setting names.

Update of peripheral_dis sample

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-06-18 17:57:08 +02:00
Carles Cufi b476643695 doc: Cleanup references to cmake
Clean up some stray references to cmake in doc, boards and
samples that don't make explicit use of the zephyr app extension,
as well as other minor doc fixes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-17 10:09:57 -07:00
Kumar Gala d4a0c3a2aa dts: Convert new/missed DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-15 07:14:12 -04:00
Kumar Gala a2693975d7 dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 08:02:15 -05:00
Sathish Kuttan 9d5a63b9c1 samples: intel_s1000: audio buffers in lpsram
Place audio buffers in LPSRAM using linker section attribute
for the 2-way audio sample application

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-06-11 16:36:30 -04:00
Sathish Kuttan 32b89b9841 samples: intel_s1000: audio buffers in lpsram
Place audio buffers in LPSRAM using linker section attribute
for the I2S audio sample application

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-06-11 16:36:30 -04:00
Sathish Kuttan 1cba619e87 samples: intel_s1000: audio buffers in lpsram
Place audio buffers in LPSRAM using linker section attribute
for the digital mic audio sample application

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-06-11 16:36:30 -04:00
Nikos Oikonomou 4a38cae2af sensors: renamed hdc1008 driver into ti_hdc
Hdc1008 driver is renamed into ti_hdc to prepare it to support all
available Texas Instruments HDC sensors (e.g. hdc1080, hdc2080).

Signed-off-by: Nikos Oikonomou <nikoikonomou92@gmail.com>
2019-06-11 10:17:11 -05:00
Benjamin Valentin 3702d1a0d3 samples: nrf52: power_mgr: Fix build with prj_tickless.conf config
prj_tickless.conf lacks the CONFIG_PM_CONTROL_OS=y option which
results in the sample failing to build with this config as it leaves
sys_pm_ctrl_disable_state() and sys_pm_ctrl_enable_state()
undefined.

Add the relevant options from prj.conf to fix the build.

Tested on nrf52840_pca10056.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-05-30 08:45:23 -04:00
Luiz Augusto von Dentz b65fe62719 Bluetooth: Add possibility to pass a user_data to conn_tx_cb_t
This allows setting a custom pointer to be passed back to the complete
callback at expense of increasing the buffers in 4 bytes.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-29 16:31:03 +03:00
Vikrant More f78599fbca samples: mesh: sync the init procedure to initialise the mesh
Synchronising the init procedure to initialise the mesh
state only after the settings have been loaded.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Vikrant More 35f14bc3ae samples: mesh: replaced magic numbers with values defined in stdint.h
Replaced magic numbers with constant defined in stdint.h

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Vikrant More 0cf1991508 samples: mesh: corrected implemenation of gen. move message handlers
After receiving Generic Level Move set/set_unack message, generic
level state should move towards positive or negative extreme end
(which is depend upon sign of delta value) till it not get interruped.
This commit has introduced this feature.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Vikrant More 36a6adafd9 samples: mesh: removed redundant code
Remove redundant code from implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Vikrant More 4835c0f201 samples: mesh: removed bugs in on-off transition
If Node Lightness is in downward transition & received Generic
onoff message to set state equal to 1 then Node transaction get
stopped in between. Ideally it should reach to default lightness
value if it is non-zero. This commit has solved this bug.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Vikrant More 243044361b samples: mesh: single timer to handle all transitions
This commit upgrade the implementation to reduce complexity in
algorithm. Previously there was different timers for lightness
as well as temperature transitions. But at time only single
transition is remain activated & hence there is no need
of multiple timer for each entiity.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-05-10 14:09:36 +03:00
Johan Hedberg e69b4be2af Bluetooth: Fix return type for settings read callback
settings_read_cb is defined to return ssize_t and not size_t. This
also eliminates several Coverity warnings.

Fixes #15765
Fixes #15768
Fixes #15771
Fixes #15774
Fixes #15778

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-05-02 11:18:30 +03:00
Luiz Augusto von Dentz c42707c2d3 Bluetooth: Use BT_GATT_SERVICE_DEFINE whenever possible
This makes use of BT_GATT_SERVICE_DEFINE to statically define services
for services that are not required to be dynamically registered.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-02 08:29:23 +03:00
François Delawarde 94451b22fc subsys/settings: Allow to register custom backends in settings subsystem
Major changes are:
- Expose settings backend API to enable custom backend support.
- Add a new CONFIG_SETTINGS_CUSTOM backend to allow registering a custom
backend.
- Change api of the handlers h_set() routines to allow for
backend-specific read callbacks.
- Provide a customizable settings_backend_init() routine for custom
backends.
- Move runtime settings support to be its own backend.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-04-26 11:24:31 +03:00
Carles Cufi bca3deb1e7 drivers: Bluetooth: Generalize IC-specific setup hook
In order to generalize the currently specialized nRF51 IC setup hook,
make the following changes:

- Generalize the hook to bt_ic_setup()
- Use a weak NOP version by default
- Move the currently existing one to the board folder

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-19 12:21:21 +02:00
Vikrant More 47b7c79e39 samples: mesh: enable SMP service for DFU
This commit enable Bluetooth SMP Service which will help
us to do Device Firmware Upgrade over thr air. By default
it is not enable.

Reference: $zephyr/samples/subsys/mgmt/mcumgr/smp_svr

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-04-17 10:19:16 +03:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

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

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif 6e6f13c18a samples: fix identifiers for samples
Fix identifiers for tests in samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-01 12:23:09 -04:00
Anas Nashif da5f185e06 samples: add test identifier
Add unique identifier instead of just 'test' for samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-29 17:44:11 -04:00
Patrik Flykt 21358baa72 all: Update unsigend 'U' suffix due to multiplication
As the multiplication rule is updated, new unsigned suffixes
are added in the code.

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

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Johan Hedberg 672607c68a samples: reel_board/mesh_badge: Fix IV Index type
The IV Index is always a 32-bit value, so using u16_t for it was
confusing. Create a define for it, similar to other constant values,
to get rid of this confusion.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-03-28 15:29:54 +01:00
Piotr Mienkowski 155e11ca2d power: rename residency policy Kconfig options
Rename power managment subsystem Kconfig options describing minimum
residency to make them easier to identify with respective policy.

Following is a detailed list of string replacements used:
s/SYS_PM_SLEEP_(\d)_MIN_RES/SYS_PM_MIN_RESIDENCY_SLEEP_$1/
s/SYS_PM_DEEP_SLEEP_(\d)_MIN_RES/SYS_PM_MIN_RESIDENCY_DEEP_SLEEP_$1/

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Piotr Mienkowski a3082e49a1 power: modify HAS_STATE_SLEEP_ Kconfig options
Add SYS_POWER_ prefix to HAS_STATE_SLEEP_, HAS_STATE_DEEP_SLEEP_
options to align them with names of power states they control.
Following is a detailed list of string replacements used:
s/HAS_STATE_SLEEP_(\d)/HAS_SYS_POWER_STATE_SLEEP_$1/
s/HAS_STATE_DEEP_SLEEP_(\d)/HAS_SYS_POWER_STATE_DEEP_SLEEP_$1/

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Piotr Mienkowski 17b08ceca5 power: clean up system power managment function names
This commit cleans up names of system power management functions by
assuring that:
- all functions start with 'sys_pm_' prefix
- API functions which should not be exposed to the user start with '_'
- name of the function hints at its purpose

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Piotr Mienkowski 204311d004 power: rename Low Power States to Sleep States
There exists SoCs, e.g. STM32L4, where one of the low power modes
reduces CPU frequency and supply voltage but does not stop the CPU. Such
power modes are currently not supported by Zephyr.

To facilitate adding support for such class of power modes in the future
and to ensure the naming convention makes it clear that the currently
supported power modes stop the CPU this commit renames Low Power States
to Slep States and updates the documentation.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Flavio Ceolin 8945426026 samples: 96_argonkey: sensors: Check function return
Checking the return of sensor_trigger_set and if it fails log the
problem and exits.

Coverity CID: 186196

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-23 09:52:51 -05:00
Johan Hedberg 96a754554e samples: reel_board/mesh_badge: Add protection for fast key presses
It was possible to freeze the application by pressing the user button
too frequently. This was likely due to the stack not keeping up with
the send requests and running out of buffers.

Add rate-limiting to the app, so that at most one message per 500ms
can be sent. Also add a user message if the user presses the button
too many times in rapid succession, and inform the other badges of
this misbehaving user.

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

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

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Carles Cufi 8f05a4c6d5 doc: Bluetooth: Documentation overhaul
Overhaul the Bluetooth documentation to split it into manageable units
and include additional information, such as architecture and tooling.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-13 10:40:05 +01:00
Patrik Flykt 4344e27c26 all: Update reserved function names
Update reserved function names starting with one underscore, replacing
them as follows:
   '_k_' with 'z_'
   '_K_' with 'Z_'
   '_handler_' with 'z_handl_'
   '_Cstart' with 'z_cstart'
   '_Swap' with 'z_swap'

This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.

Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.

Various generator scripts have also been updated as well as perf,
linker and usb files. These are
   drivers/serial/uart_handlers.c
   include/linker/kobject-text.ld
   kernel/include/syscall_handler.h
   scripts/gen_kobject_list.py
   scripts/gen_syscall_header.py

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-11 13:48:42 -04:00
David B. Kinder 505cc2bb0e doc: use :zephyr_file: where appropriate
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub.  Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-09 09:50:27 -05:00
Armando Visconti 16dc36bb61 samples/96b_argonkey: microphone: Fix coverity bug 190958
Fix coverity CID 190958: Logically dead code (DEADCODE)
(bug: #13857)

Condition (ret < 0) was tested, but 'ret' variable was not
assigned.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-27 10:02:49 -06:00
Piotr Mienkowski f04a4c9deb power: rename CPU_LPS_n power states
CPU_LPS_n name used to indicate a low power state is cryptic and
incorrect. The low power states act on the whole SoC and not exclusively
on the CPU. This patch renames CPU_LPS_n states to LOW_POWER_n. Also
HAS_ pattern for Kconfig options is used in favor of a non standard
_SUPPORTED. Naming of deep sleep states was adjusted accordingly.

Following is a detailed list of string replacements used:
s/SYS_POWER_STATE_CPU_LPS_(\d)_SUPPORTED/HAS_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_CPU_LPS_(\d)/SYS_POWER_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_DEEP_SLEEP_(\d)_SUPPORTED/HAS_STATE_DEEP_SLEEP_$1/

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Piotr Mienkowski c75187587b power: simplify SYS_POWER_*_SUPPORTED Kconfig options
This commit removes dependency on SYS_POWER_LOW_POWER_STATES_SUPPORTED,
SYS_POWER_DEEP_SLEEP_STATES_SUPPORTED Kconfig options. Power management
SYS_POWER_LOW_POWER_STATES, SYS_POWER_DEEP_SLEEP_STATES options depend
now directly on specific power states supported by the given SoC. This
simplifies maintenance of SoC Kconfig files.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Henrik Brix Andersen 17cc291d68 samples: nrf52: mesh: onoff-app: add missing CONFIG_GPIO
Add missing CONFIG_GPIO required by the nRF52 board-specific Bluetooth
Mesh On/Off application sample.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-02-24 12:55:54 -05:00
Sathish Kuttan 12c98eceb1 samples: intel_s1000: remove DCACHE_WRITEBACK
Remove DCACHE_WRITEBACK Kconfig variable from DMIC sample app project
Cache configuration is fixed and the cache operation routines
internally take appropriate action based on the cache configuration.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-20 07:33:11 -05:00
Armando Visconti 303c8a7234 samples/96b_argonkey: change log configurations
Enable debug logging for sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-19 12:29:09 -06:00
Piotr Zięcik 4558c5c4f4 power: policy_residency: Update Kconfig options description
This commit adds better description to the Kconfig options
configuring residency-based power policy.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik 63b0df645e power: Clean up power state names
Some of power states used numerical suffix while otthers not.
This commit adds proper suffix to all power state names.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>

f
2019-02-19 13:25:36 -05:00
Piotr Zięcik c45961daae power: Rework OS <-> Application interface
This commit simplifies OS <-> Application interface controlling power
management. In the previous approach application-based PM required
overriding sys_suspend() and sys_resume() functions. As these functions
actually implemented power state change, in such case application
basically had to provide own implementation of all PM-related stuff,
which was not portable and hard to maintain.

This commit changes this scheme: The sys_suspend() and sys_resume()
are now system functions while the application could either use
built-in power management policies or provide its own. All details
of power mode switching are now handled by the OS.

Also, this commit cleans up the Kconfig options related to system-level
power management grouping them under common CONFIG_SYS_PM_ prefix.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Sathish Kuttan 31ab23fce8 doc: intel_s1000: 2-Way audio sample documentation
Documentation for a sample application to demonstrate audio
capture and playback on an Intel S1000 CRB connected to a
host over I2S.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-19 10:43:52 -05:00
Sathish Kuttan acd2ff70dc samples: intel_s1000: 2-Way Audio Sample Application
Sample application to demonstrate 2-way audio capture/playback from a
host connected over I2S to S1000

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-19 10:43:52 -05:00
Sathish Kuttan d079ce05c7 doc: intel_s1000: update I2S sample app doc
Added documentation on loopback of audio to host

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-18 08:23:53 -05:00
Sathish Kuttan 1ef423e2bb samples: intel_s1000: loopback audio to I2S host
Updated I2S sample app for Intel S1000 CRB to loopback
the audio from host in addition to playing audio out to codec

When AUDIO_PLAY_FROM_HOST=Y, audio from host is both looped back
and played out to codec

When AUDIO_PLAY_FROM_HOST=N, audio from host is looped back and
app generated ones are played out to codec.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-18 08:23:53 -05:00
Carlos Stuart 75f77db432 include: misc: util.h: Rename min/max to MIN/MAX
There are issues using lowercase min and max macros when compiling a C++
application with a third-party toolchain such as GNU ARM Embedded when
using some STL headers i.e. <chrono>.

This is because there are actual C++ functions called min and max
defined in some of the STL headers and these macros interfere with them.
By changing the macros to UPPERCASE, which is consistent with almost all
other pre-processor macros this naming conflict is avoided.

All files that use these macros have been updated.

Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
2019-02-14 22:16:03 -05:00
Sathish Kuttan acf0e24c6e doc: intel_s1000: I2S sample app documentation
Documentation for the I2S audio sample application for the
Intel S1000 board.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-12 21:20:17 -05:00
Sathish Kuttan 53dcc07889 samples: intel_s1000: App for I2S audio playback
Added a sample app to play audio over I2S through an onboard
Audio DAC on an Intel S1000 CRB.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-12 21:20:17 -05:00
Piotr Zięcik 9cc63e07e4 power: Fix naming of Kconfig options controlling deep sleep states
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -05:00
Piotr Zięcik 7a49356c77 power: Fix naming of Kconfig options controlling low power states
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -05:00
Piotr Zięcik ff5070472b samples: nrf52: power_mgr: Demonstrate power state forcing
This commit extends the power_mgr sample in order to demonstrate
power state forcing using the sys_pm_force_power_state() API.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-11 07:52:12 -05:00
Kumar Gala 2a14a28d19 boards: reel_board: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
David B. Kinder c1dce2f799 doc: fix misspellings in docs
Fix misspellings missed in regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-07 22:06:14 -05:00
Vikrant More 49aeb1ffe3 samples: mesh: taking care of interrupted transition
With this commit, it is now possible that if (for e.g.) lightness
transition is interrupted by temperature transition (which could
be instantaneous or non-instanstaneous) then as soon as temperature
transition get over, then algorithm would achieve target value
of lightness.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-02-07 21:01:37 +02:00
Piotr Zięcik 461c81dc38 samples: nrf52: power_mgr: Show effect of power state locking
This commit enhances the power_mgr sample by adding code
presenting power state locking API as well as its effect
on the decisions made by the Power Management Policy.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-06 14:24:01 +01:00
Daniel Leung f7a42a70f8 gpio: intel_apl: rework driver for pin_mask callback
To avoid confusion, callbacks using ordinal pin numbers
is going to be reverted. So the driver has to be re-worked
to expose multiple devices so each device has 32 pins.

Also fixes #12765

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-06 07:18:15 -05:00
Piotr Mienkowski dc6066946e drivers: mb_display: remove usage of gpio_port_ functions.
gpio_port_ functions are being deprecated. This commit removes their
usage.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-01 08:57:58 -05:00
Piotr Mienkowski 6e48e1ecb5 samples: convert altera_max10/pio to use gpio_pin functions
gpio_port_* functions are being deprecated. Convert boards/altera_max10
sample to use gpio_pin_* functions instead.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-01 08:57:58 -05:00
Piotr Zięcik b343665064 samples: nrf52: power_mgr: Enable the demo on the nRF51 SoC series
This commit updates the README and sample.yaml in order to signal
that this demo works flawlessly on the nRF51 platform.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-01-31 17:39:27 +01:00
Piotr Zięcik a0f02b6a6d samples: nrf52: power_mgr: Update sample to use Zephyr PM policy
This commit updates the power management sample in order to use
new features introduced by recent changes in the Zehyr Power
Management subsystem. Now, it shows how to use power management
policies as well as how to implement custom power modes.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-01-31 17:39:27 +01:00
Kumar Gala 75d84ffd7a led: lp3943: Remove dts_fixup.h
Since the lp3943 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-31 09:09:36 -06:00
Kumar Gala a3682f67d4 audio: mpxxdtyy: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert mpxxdtyy driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-31 03:46:04 -06:00
Vikrant More 732cfac519 samples: mesh: removed bug which is cause of divide by zero exception
If Client send transition time values as 0x40 or 0x80 or 0xC0 then
this was cause the behind divide by zero exception during calculation
of transition->counter. This PR will solve this bug.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-01-30 21:48:02 +02:00
Kumar Gala d7b7dbd910 sensor: apds9960: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert apds9960 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 16:03:21 -06:00
Kumar Gala 3b42943fe7 display: ssd1673: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert ssd1673 display driver to use new defines so we can remove
the dts_fixup.h code for it.  Also dropped "-spi" from compatible.

Fix up references in reel_board dts and sample.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 14:21:06 -06:00
Armando Visconti 69a3566868 samples/96b_argonkey: divided test into sensor and microphone
We have now two code samples available for ArgonKey board:

    1. sensors sample, fetching data from accel/gyro/mag,
       barometer, humidity and proximity sensors

    2. microphone sample, acquiring 5s audio @16KHz from the
       on-board microphone.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti 5ad0d27bd1 driver/sensor: lsm6dsl: Fix attribute setting for gyroscope fs
The API for setting the gyroscope full scale attruibute requires
the argument in radians/s.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 10:01:19 -06:00
Armando Visconti c81efe25d5 driver/sensor: lsm6dsl: align driver to auto-generated dts macros
Use auto-generated device tree macros in LSM6DSL driver to avoid
usage of dts.fixup code for it.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 10:01:19 -06:00
Johan Hedberg 404d9017eb samples: reel_board/mesh_badge: Disable secure network beacon
The app is already sending period heart beat messages, and since it is
not designed to be used for such long times that would require IVI
Update, keep the secure network beacon sending disabled.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-01-28 14:10:58 +02:00
Johan Hedberg b5a65d8c81 samples: reel_board/mesh_badge: Add simple power saving implementation
Suspend the mesh network after 30 minutes of inactivity. This should
help prolong the battery life of boards used at multi-day events, if
the user forgets to power off the device for the night.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-01-28 14:10:58 +02:00
Johann Fischer 6caf4e9144 boards: reel_board: use appropriate labels for HDC1010 and MMA8652FC
Use appropriate labels for HDC1010 and MMA8652FC.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-01-26 12:08:52 -05:00
Johann Fischer f36fe23e65 sensor: hdc1008: convert to DT_<COMPAT>_<INSTANCE> defines
Convert hdc1008 sensor driver to use new defines.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-01-26 12:08:52 -05:00
Kumar Gala 31dad5b411 sensor: vl53l0x: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert vl53l0x sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:52:14 -06:00
Kumar Gala 7b9bf08dce sensor: lps22hb: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert lps22hb sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 09:38:31 -06:00
Anas Nashif eff81c498b power: remove obsolete power samples
We have a new power management system and those samples have been
written for specific boards and using the application based power
management subsystem. We are getting new tests/samples that are generic
with the new subsystem, so remove those in favor of the new ones.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-18 06:50:04 -05:00
Kumar Gala 5431762769 sensor: fxos8700: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert fxos8700 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-17 13:29:46 -06:00
Kumar Gala a5e8921de9 sensors: hts221: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert hts221 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-17 11:06:38 -06:00