Commit graph

41264 commits

Author SHA1 Message Date
Flavio Ceolin
a3cea50ce7 kernel: Add missing break/default in switch statement
Explicitly add default clause and break instruction in every clauses in
switch statement.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-12 10:05:06 -04:00
Carles Cufi
ef7a2318bb samples: shared_mem: Reduce CMake required version to 3.8.2
There is no reason why this sample should have a higher version required
of CMake in order to build.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-12 09:45:19 -04:00
Sebastian Bøe
1d90bcdc75 cmake: Use find_program on CMAKE_CXX_COMPILER
'find_program' should be used instead of 'set' for determining the
paths of host programs. It resolves #9582 and various other issues.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-09-12 09:36:33 -04:00
Tomasz Bursztyka
a7ddb1fb82 net/udp: Removing useless init function
There is nothing to initialize, so it can be removed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-09-12 14:49:23 +03:00
Tomasz Bursztyka
f1e5e17d3b net/udp: Removing useless insert/append _raw functions
These are not used anywhere.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-09-12 14:49:23 +03:00
Alberto Escolar Piedras
877c4d0ca7 Bluetooth: controller: Use nRFx functions for PPI reg access
In the BLE controller, NRF radio HAL, for the PPI registers used
for the SW TIFS.
To allow easier testing, replace direct use of registers
from Nordic's nrfx MDK with accesses via its HAL inlined functions

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-09-12 13:13:48 +02:00
Vikrant More
ccade20ccf samples: mesh: nrf52: corrected Range status response
As per PTS, IUT is expected to return success for the
Range Get messages (Light Lightness Range Get for
MMDL/SR/LLNS/BI-01-C, Light CTL Temperature Range Get
for MMDL/SR/LCTLS/BI-01-C). This commit take care of
this issue.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
09e2cf3db0 samples: mesh: nrf52: corrected state Binding for Delta Level
Now if transition (instantaneous or non-instantaneous) is due
to delta level, then state binding would be as per it.

This is as per 3.3.2.2.3 of Bluetooth Mesh Model
Specification.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
be27afb705 samples: mesh: nrf52: corrected spelling
Corrected spelling mistakes for content of enum defined in
transition.h & renamed some functions. Corrected comments
in main.c

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
864ebaaba6 samples: mesh: nrf52: revised status resp. behaviour & TT calculation
With this it is possible to get proper target value & remaining
time in status response from Servers when transition in progress.
If transition is not in progress then those things would not
get integrate into status response. This is as per Bluetooth
Mesh Model specification.

It is inspired concept from Bluetooth Mesh Developer study
Guide.

Also updated Transition Time (TT) related parameter calculation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
6858cb417d samples: mesh: nrf52: corrected conditional compilation
Corrected conditional compilation directives defined in
publisher.c

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
c805beeaaa samples: mesh: nrf52: initialized dev_uuid to some arbitrary value
Initialized dev_uuid defined in ble_mesh.c to some arbitrary value.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Vikrant More
89f00e6426 samples: mesh: nrf52: upgrade README.rst
Added Generic Default Transition Time Server & Client
Models names in list of Models supported by this App.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-09-12 11:14:58 +03:00
Kumar Gala
0329ec7e6d boards: nucleo_f429zi: Fix typo in the docs
Docs had one case of calling the board nucleo_f249zi instead of
nucleo_f429zi

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-12 00:09:52 -05:00
Bobby Noelte
00603bfa6b dts: bindings: consolidate binding for flash controller
All flash controllers have a mandatory compatible property.

Add it to the generic binding that is included by all.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-09-11 23:56:29 -05:00
Paweł Zadrożniak
7c2197f2d8 boards: nrf: uart: Moved UART pin configuration to DTS (nRF boards)
UART pins (TX, RX, RTS, CTS) are now configured in DTS files.
RTS and CTS definitions are optional. If flow control is enabled
and RTS/CTS pins are not defined, then compiler will issue
an error message.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-09-11 23:29:50 -05:00
Anas Nashif
a06f091bad CODEOWNERS: fix syntax
According to https://help.github.com/articles/about-codeowners/:

The `docs/*` pattern will match files like
`docs/getting-started.md` but not further nested files like
`docs/build-app/troubleshooting.md`.

	docs/*  docs@example.com

In this example, @octocat owns any file in an apps directory
anywhere in your repository.

	apps/ @octocat

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-11 23:21:11 -05:00
Marti Bolivar
5cf80e4e22 scripts: requirements.txt: fix PyYAML for python 3.7
PyYAML 3.13 includes a fix necessary to install on Python 3.7:

    3.13 (2018-07-05)

    Rebuild wheels using latest Cython for Python 3.7 support.

Support it by accepting any PyYAML at least as recent as the current
version in requirements.txt, currently 3.12.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-11 20:58:09 -04:00
Frank Li
70efac6e90 drivers: sensor: dht: Fix fetch fail when config hw cycles=32768
When config hw cycles=32768 max_wait_cycles maybe small than 60us.
The fix change the condition,make sure the wait time exceeds 80us.

Fixed #9816

Signed-off-by: Frank Li <lgl88911@163.com>
2018-09-11 18:42:47 -05:00
Ulf Magnusson
d713033d5c Kconfig: Use new preprocessor syntax for env. variables
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.

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

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

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 19:17:25 -04:00
Ulf Magnusson
d0e8752a52 Kconfig: Rename $ENV_VAR_{ARCH,BOARD_DIR} to $ARCH/$BOARD_DIR
The prefixes might be a leftover from the old 'option env="..."' symbols
(which are no longer needed). Since environment variables can be
referenced directly now, there's no point in having a prefix.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 19:17:25 -04:00
Anas Nashif
ec6b0dfbb8 tests: crypto: rename hmac_prng
Make the test specific to tinycrypt.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-11 17:25:00 -04:00
Anas Nashif
ec18f1d640 tests: tinycrypt: consolidate tests
Put all tinycrypt tests into one project. Having project for every small
feature does not scale and slows down testing and CI operations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-11 17:25:00 -04:00
Daniel Leung
1d88e8684c doc: document build target for PDF
This adds to the documentation how to build PDF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Daniel Leung
7a1ec635d0 doc: convert internal http links to references
This converts the http links within the Zephyr document
into references. This allows the links within the PDF file
to jump to the correct sections instead of going to
the Internet.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Daniel Leung
c164c8ea8b doc: fix using Ninja to generate PDF
The chain of dependencies works for make but not for Ninja.
Make it explicit so Ninja will work to generate PDF.

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

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-11 13:25:55 -05:00
Andrzej Głąbek
61eb2a1c80 drivers: gpio: nrfx: Use GPIOTE HAL for checking allocated channels
Replaces direct accesses to the peripheral registers structure
with the proper GPIOTE HAL function added recently to nrfx.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-11 12:55:07 -04:00
Andrzej Głąbek
1a8ac641d7 ext: hal: nordic: Update nrfx to version 1.2.0
Updates nrfx to the recently released version containing needed
enhancements of GPIOTE and PPI HALs.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.2.0
commit: d19018ed334c26f0d9eb35cf7f5a622df8d54346
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-09-11 12:55:07 -04:00
Andrei Emeltchenko
798cdaec7e doc: Using doxygen comments from the code for USB Core
Instead of documenting in rst, pull the API from USB Device Core Layer
header.

Fixes: #5702

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
Andrei Emeltchenko
ce6de827f3 usb: device: Clean doxygen documentation
Clean USB Device Layer documentation and create _usb_device_core_api
doxygen group.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
Andrei Emeltchenko
1e1b46d101 doc: Using doxygen comments from the code for USB DC
Fixes issue with USB subsystem doc not pulling from header
doxygen comments of USB Device Controller code.

Fixes: #5702

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
Andrei Emeltchenko
4cf0127f15 usb: dc: Clean doxygen documentation
Clean doxygen documentation and add _usb_device_controller_api group
to be added to the API documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
Emanuele Di Santo
ea4f8b7d6c samples: nrf52: power_mgr: use dts-generated defines
This commit updates the power_mgr sample to use the dts-generated
defines instead of the aliases in board.h.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
0a15793830 samples: nrf52: onoff-app: use dts-generated defines
This commit updates the onoff-app sample to use the dts-generated
defines instead of the aliases in board.h.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
7fb051bc72 samples: nrf52: onoff_level_lightning_vnd_app: use dts-generated defines
This commit updates the onoff_level_lightning_vnd_app sample
to use the dts-generated defines instead of the aliases in board.h.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
6ca042d3bd boards: arm: nrf52840_pca10056: use dts for LED and button config
The LEDs, buttons and necessary aliases are now configured via dts.
This commit breaks the samples under boards/nrf52/mesh:
- onoff-app
- onoff_level_lighting_vnd_app

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
50e05a544e boards: arm: nrf52832_pca10040: use dts for LED and button config
The LEDs, buttons and necessary aliases are now configured via dts.
This commit breaks the sample under samples/boards/nrf52/power_mgr.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
7eb26dc236 boards: arm: nrf52840_pca10059: use dts for LED and button config
The LEDs, buttons and necessary aliases are now configured via dts.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
24c6407c3b boards: arm: nrf52810_pca10040: use dts for LED and button config
The LEDs, buttons and necessary aliases are now configured via dts.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
e84709e169 boards: arm: nrf51_pca10028: use dts for LED and button configuration
The LEDs, buttons and necessary aliases are now configured via dts.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo
53cd7c2496 samples: basic: button: use dts-generated defines
This commit updates the button sample to use the dts-generated
define to configure the button pull-up when the custom define
is not present.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Alexander Polleti
dc60f86d89 boards: add usb to stm32f4_disco
This patch adds USB capabilities to the stm32f4 discovery board.
As the board has a MicroUSB port that I would like to use as stdout I
just added USB. The needed entry within pinmux.c is already there but
USB was missing in the dts file and documentation.

I tested it with the upcomming commit.

Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
2018-09-11 11:41:14 -05:00
Yannis Damigos
15d1f20320 dts: stm32f429vX: Fix delete-node syntax
According to Device Tree specification, previously
defined nodes may be deleted with the followin
syntax:

/delete-node/ node-name;

or

/delete-node/ &label;

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-09-11 11:38:39 -05:00
Ioannis Glaropoulos
726bda6a60 arch: arm: correct placement of macro documentation
This commit moves the documentation corresponding to
_ARCH_THREAD_STACK_DEFINE(..) macro to the right place.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-09-11 11:38:06 -05:00
Gil Pitney
844e6f5a2e samples: net: sockets: echo: enable socket offload for cc3220sf_launchxl
Add a prj conf file for the TI cc3220sf_launchxl board
to enable socket offload to the simplelink WiFi driver.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-09-11 18:42:34 +03:00
Gil Pitney
71182cb294 driver: wifi: simplelink: Register socket offload operations.
If the SimpleLink WiFi driver is configured, and socket offload
enabled, this revectors the Zephyr BSD socket APIs to the SimpleLink
WiFi host driver BSD socket APIs, providing a
direct offload of the TCP/IP stack to the CC3220SF network
coprocessor.

Fixes #3706

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-09-11 18:42:34 +03:00
Gil Pitney
c21b0fb357 net: sockets: Add a socket offload module
This patch enables BSD socket offload to a dedicated
TCP/IP offload engine.

This provides a simpler, more direct mechanism than going
through NET_OFFLOAD (zsock -> net_context -> socket conversions)
for those devices which provide complete TCP/IP offload at the
BSD socket level, and whose use cases do not require
IP routing between multiple network interfaces.

To use, configure CONFIG_NET_SOCKETS_OFFLOAD=y, and register
socket_offload_ops with this module.

Fixes #3706

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-09-11 18:42:34 +03:00
Ulf Magnusson
213a88f7ff Kconfig: Support macro expansion within symbol names
Update Kconfiglib to upstream revision 2be02fac78527 to add support for
expanding macros within symbol names, extending the existing Kconfig
preprocessor
(https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt). Some minor optimizations are included as
well.

This makes it possible to add Kconfig templates to avoid code
repetition, e.g. like below:

Kconfig.log_template:

    choice
    	prompt "Max compiled-in log level for $(module-str)"

    config $(module)_LOG_LEVEL_OFF
    	bool "Off"

    config $(module)_LOG_LEVEL_ERR
    	bool "Error"

    config $(module)_LOG_LEVEL_WRN
    	bool "Warning"

    config $(module)_LOG_LEVEL_INF
    	bool "Info"

    config $(module)_LOG_LEVEL_DBG
    	bool "Debug"

    endchoice

    config $(module)_LOG_LEVEL
    	int
    	default 0 if $(module)_LOG_LEVEL_OFF
    	default 1 if $(module)_LOG_LEVEL_ERR
    	default 2 if $(module)_LOG_LEVEL_WRN
    	default 3 if $(module)_LOG_LEVEL_INF
    	default 4 if $(module)_LOG_LEVEL_DBG

Using the template:

    module = FOO
    module-str = foo
    source "Kconfig.log_template"

    ...

    module = BAR
    module-str = bar
    source "Kconfig.log_template"

This feature might create harder-to-read Kconfig files if abused, so it
should probably be used sparingly.

Fixes: #9761

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 16:08:38 +02:00
David Brown
ced1c03c40 tests: posix: Test realtime clock
Create a basic test for the realtime clock.  This sets the clock value
to a particular time, half a second in, and monitors the clock for a few
seconds, making sure that the value returned is reasonable.

Signed-off-by: David Brown <david.brown@linaro.org>
2018-09-11 09:21:52 -04:00