Commit graph

99049 commits

Author SHA1 Message Date
Kumar Gala
1becbfcb8b drivers: display: ssd1673: Fixup dts support
There were several issues in the dts binding for the ssd1673 display:
* binding file mixed description & generation up together
* Use of BASE_LABEL
* orientation-flipped should have been of type boolean

Update the binding file to reflect these changes, and made associated
changes to dts_fixup.h and driver as needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-26 08:13:04 +01:00
Johann Fischer
dd964ad38a boards: reel_board: add link to the board schematic
Add link to the board schematic.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-10-25 23:49:16 +01:00
Vinayak Kariappa Chettimada
a2b26b9811 clock_control: nRF5x: Workaround Errata [192] LFRC frequency offs
Workaround the Errata [192] CLOCK: LFRC frequency offset
after calibration.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-10-25 23:36:53 +01:00
Gil Pitney
40bf45a81d samples: net: wifi: Fix README, to account for new shell regression
This updates documentation to account for the new shell which
does not support 'select' for command context anymore.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-25 20:47:06 +03:00
Gil Pitney
92f4837413 samples: net: wifi: Remove sleep K_FOREVER, which asserts.
The wifi shell sample asserts when trying to do a sleep
forever.

The sleep should not be necessary, so removing it.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-25 20:46:38 +03:00
Gil Pitney
621ec506e2 net: wifi: Update connect cmd to deal with new shell quoted args
Previously, the wifi shell needed to remove the quotes from the
SSID parameter, passed in by the underlying shell.

The new shell is now able to parse quoted strings as arguments,
so this adjustment can be removed.

Otherwise, it results in a failure to connect to an AP, as the first
character of the SSID name is stripped off.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-25 20:46:38 +03:00
Szymon Janc
2abd05e9fc Bluetooth: controller: Compile conn complete due to cancel conditionally
BT_HCI_ERR_UNKNOWN_CONN_ID can only be sent when master role is enabled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-10-25 17:03:59 +01:00
Szymon Janc
b732a9a69b Bluetooth: host: Compile master role conn complete conditionally
Connection complete event with error code can be received only for
central role and can be compiled conditionally.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-10-25 17:03:59 +01:00
Ruslan Mstoi
f1c67615cf net: ipv6: Add Destination Options Header support
This patch adds support for IPv6 Destination Options Header

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-10-25 16:50:15 +03:00
Jukka Rissanen
72a37e59e5 net: log: Max debug level was forced too high
Wrong Kconfig template was used for max debug level which caused
the max level to be the default level (ERROR). This prevented
all debug prints from showing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-25 15:05:19 +03:00
Pawel Dunaj
8d55b03414 subsys: usb: class: hid: Allow control of USB poll interval
This closes issue #10807

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2018-10-25 12:54:24 +01:00
Johannes Hutter
3fb56467bd boards: reel_board: add documentation for udev rules
Flashing the board as described in the docs does not work without having
proper udev rules set. Add documentation for setting those.

Signed-off-by: Johannes Hutter <johannes@proglove.de>
2018-10-25 12:00:24 +01:00
Henrik Brix Andersen
1ee2e69232 boards: reel_board: fix DTS compatible string
Fix the compatible string for the PHYTEC reel_board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-10-25 10:59:44 +01:00
Henrik Brix Andersen
4d77db575e boards: reel_board: add links to the PHYTEC reel board procuct page
Add a link to the reel board product page at PHYTEC to help people in
locating schematics, etc.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-10-25 10:58:44 +01:00
Himanshu Jha
fad97ef32c doc: Fix a typo
Fix spelling of `Signed-of-by` -> `Signed-off-by`.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-25 09:10:44 +01:00
Mariusz Skamra
c04b70469b Bluetooth: shell: Add possibility to reject L2CAP CoC conn request
This adds a possibility to reject incomming LE Connection request
due to insufficient authorization or encryption key size.
This is needed for qualification purposes

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-10-25 08:02:54 +01:00
Mariusz Skamra
e82ebb2c84 Bluetooth: L2CAP: Extend available return codes from accept cb
This adds support for returning various return codes from
the channel accept callback.
This is needed for implementation of incoming connection
authorization for certification purposes.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-10-25 08:02:54 +01:00
Mariusz Skamra
2c6065c2d1 Bluetooth: L2CAP: Rename LE Connection Response Results
Rename connection response results to map those that are defined
for BR.
BR: BT_L2CAP_BR_*
LE: BT_L2CAP_LE_*

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-10-25 08:02:54 +01:00
Erwan Gouriou
94d3b6a211 scripts/dts: extract: fix 'compatbible' property typo
Replace "Compatibles" with "compatibles".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-25 08:02:33 +01:00
Erwan Gouriou
ba79b2f43f scripts/dts: extract: Provide a value to generated compat #define
Compat define is generated without value. This should not harm,
but since generated flag is a "Kconfig like" define, we migth need it
to hold a value.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-25 08:02:33 +01:00
AJ Palmer
94099df5c8 boards: arm: nucleo_f746zg: Added SPI support
Added support for SPI 1 available from the arduino connector (plus an
extra gpio). Tested against samples/sensor/bme280.

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
AJ Palmer
6335f0fa64 boards: arm: nucleo_f746zg: Added PWM support
Added support for PWM 1 on channel 3 (arduino pin D3).

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
AJ Palmer
91065023ca boards: arm: nucleo_f746zg: Added I2C support
Added DT entry, Kconfig.defconfig options, updated .yaml and
documentation, added pinmux for required pins.

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
AJ Palmer
c28fd8a670 boards: arm: nucleo_f746zg: Added USB support
Added Kconfig.defconfig options, updated .yaml and documentation, added
pinmux for required pins.

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
AJ Palmer
36a19b43bc boards: arm: nucleo_f746zg: Added ethernet support
Added Kconfig.defconfig options, updated .yaml and documentation, added
pinmux for required pins.

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
AJ Palmer
2ba13008b6 boards: arm: nucleo_f746zg: Created new board
Basic board with support for UART, 3 user LEDs and 1 user push-button
switch.

Signed-off-by: AJ Palmer <ajpcode@hotmail.com>
2018-10-25 07:33:30 +01:00
Sebastian Bøe
b9c125f64c kconfig: Hide the DesignWare I2C driver on unsupported platforms
When users are configuring nRF applications they are given the option
to enable the DesignWare I2C driver. But they should not be given this
option because nRF SoCs do not have DesignWare I2C HW.

This commit hides the driver by default by introducing the config
option HAS_I2C_DW.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-25 07:32:05 +01:00
Himanshu Jha
dab64724eb drivers: crypto: Fix precedence issue in if statement
The logical NOT operator has a higher precedence than bitwise
AND operator. Therefore to make the test in if statement
correct, add parenthesis around the operands of bitwise
AND operator.

Found using Coccinelle.

Semantic Patch Language (SmPL) used:

<smpl>

@@
expression x;
constant C;
@@

- !x & C
+ !(x & C)

</smpl>

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-25 07:23:49 +01:00
Sebastian Bøe
e8420d91bb doc: Fix pip3 install command
The getting started guide says to run:

pip3 install -r --user zephyr/scripts/requirements.txt

but this is broken. It should be:

pip3 install --user -r zephyr/scripts/requirements.txt

This fixes #10817 and is a regression from:
0d811b9aee

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-25 07:21:35 +01:00
Johan Hedberg
7fd7be0fc6 samples: reel_board: Add Bluetooth Mesh badge demo app
Add a demo app for showcasing badge functionality together with
Bluetooth Mesh.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-24 22:06:46 +01:00
Erwan Gouriou
a6716aef15 scripts/dts: extract_dts_includes: fix alias creation for subnodes
Heuristic for populating an alias string for a subnode
of an alias node was wrong as there was no check if
alias already existed and string created was not in line
with device tree specfication (allowed chars: [0-9],[a-z], '-').

Fix these two points.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-24 18:17:09 +01:00
Kumar Gala
060b8c1512 drivers: ssd1306: fixup dts support
A few issues with the dts support for the SSD1306 display driver:
1. binding file mixed description & generation up together
   - rename most uses of generation to description and add proper
     generation field into yaml
2. Drop use of BASE_LABEL, this shouldn't be used by most bindings
3. dts defines that are being assumed in driver aren't correct.  We
   should be using a dts_fixup.h in the sample to map the generated
   defines to those used in the driver.  We remove the incorrect
   defines that the driver assumes right now.
4. Fixup 'segment-remap' and 'com-invdir' properties that are booleans
   in the binding file and associated code changes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 16:42:35 +01:00
Johann Fischer
ce4be3af86 logging: fix out of bounds write in log_strdup
log_strdup writes out of bounds of a strdup slab.
e.g: CONFIG_LOG_STRDUP_MAX_STRING=46 and
     LOG_STRBUF_STR_SIZE=47 then in the line L:529
sdupl[LOG_STRBUF_STR_SIZE - 1] = '\0';
writes out of bounds because the available buffer space
is only 44 bytes (rounded up to 48 bytes and minus 4 bytes
for the allocated flag).

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-10-24 16:41:21 +01:00
Ioannis Glaropoulos
1cc66cf800 arch: high-level Kconfig symbol structure for Trusted Execution
This commit contributes a Kconfig symbol hierarchy which allows
the user to build Zephyr Secure and Non-Secure images on ARMv8-M
MCUs with support for Trusted Execution. However, the high-level
configuration structure is generic, thus, can be potentially
used for any platform that supports Trusted Execution.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-10-24 16:38:33 +01:00
Alberto Escolar Piedras
d7f6067904 nrf52_bsim: Codestyle fix
This is only a codestyle fix with no functional implications.
A few structures typedefs are removed. The structures are not in
use yet outside of the board code.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-24 15:57:05 +01:00
Jakub Rzeszutko
4c420ff3bf shell: fix history feature
When user was typing a new command and next pressed an up arrow
shell has displayed previously executed command. Next it was not
possible to display back currently edited command using a down arrow.

Fixes #10766.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-24 14:31:25 +01:00
Jukka Rissanen
b82c9d85b4 net: buf: Use proper Kconfig log level template
The net_buf log level Kconfig setting was using template from
networking, which might not be available for Bluetooth code.
This caused the log level to be ignored.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-24 15:10:33 +03:00
Jukka Rissanen
55673d045d tests: net: pkt: Do not print extra errors
Some irrelevant errors were printed even if the tests passed.
Make sure that these obsolete errors at not printed so that
sanitychecker does not get confused about them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-24 15:10:33 +03:00
Jukka Rissanen
7797c01eb5 net: Honor max log level in net
The maximum log level was using wrong template which caused
the max value to be ignored.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-24 15:10:33 +03:00
Jukka Rissanen
d0679d9dd7 tests: net: Fix possible null dereference in net_pkt tests
It might be that the test might access null pointer in some cases.
In practice this is not possible as the test is using pre-defined
data when running the test.

Fixes #10777

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-24 14:25:28 +03:00
Andrei Emeltchenko
e408d9c3a4 doc: usb: Use new USB API for sample code
Replace sample code, making it use newest USB API, reading code
directly from sources, and changing to the simplest sample - loopback.
CDC ACM is quite big and modifying sample would render line change
quite often.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-24 11:18:12 +01:00
Andrei Emeltchenko
a6340c588d usb: loopback: Add documentation markers
Add markers to the code to be included in the USB documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-24 11:18:12 +01:00
Spoorthi K
7fa2ec42ae tests: posix: Check for return values
Check for return value of pthread_attr_destroy().
Fixes: #10754

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-10-24 11:15:30 +01:00
Krzysztof Chruscinski
5d28fcd689 logging: Add optional function name prefix
Extended logger to support optional log message prepending with
function name.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-24 11:14:26 +01:00
Krzysztof Chruscinski
c696e68bb9 logging: Added support for 10 arguments in log message
Extended supported number of arguments in log message. Support for
messages consisting of more than 2 chunks had to be added. So far
messages could consist of one chunk (up to 3 args) or two chunks
(2 args in first chunk and 7 in second chunk). Once 2+ chunks
support is added number of arguments is techinically limited to
15 (4 bit field). log_core and log_output extended to suppor 10
arguments.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-24 11:14:26 +01:00
Henrik Brix Andersen
74ca4f58a6 doc: bluetooth: clarify where to find the btmgmt binary
Prepend the btmgmt call with the tools/ subdirectory to line up with
the other BlueZ tool calls in the examples.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-10-24 11:13:47 +01:00
Alberto Escolar Piedras
3f65164ad1 nrf52_bsim: Fix typo in warning message
Fixed a typo in the warning message printed when the user does not
pass any parameters (and therefore does not connect to a BabbleSim
Phy)

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-10-24 11:12:49 +01:00
Kumar Gala
f6a30ff070 dts/extract_dts_includes.py: refactor get_node_label_string
We can replace the method get_node_label_string in DTDirective with the
global function get_node_label.  This way we have a single place that
labels for defines are being generated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 10:41:25 +01:00
Kumar Gala
193ad8ef9f dts/extract_dts_includes.py: refactor get_node_label
Don't based the compat to get_node_label, we can just figure out based
on the node address we are passed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 10:41:25 +01:00
Kumar Gala
168c2dec95 dts/extract_dts_includes.py: Move label override handling
Refactor the handling of 'use-property-label' into extract_prop since
its the only place its needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 10:41:25 +01:00