Commit graph

42568 commits

Author SHA1 Message Date
Tobias Svehagen
a5147dc15c net: Make it possible to include net/buf.h even if CONFIG_NET_BUF=n
Since CONFIG_NET_BUF_USER_DATA_SIZE was not defined when
CONFIG_NET_BUF=n, compilation would fail on struct net_buf.user_data.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-06-17 16:17:39 +03:00
Maciej Perkowski
8b07ec1143 samples: posix: eventfd: Add harness in sample.yaml verifing the output
The sample does not provide a way to verify its operation
and causes fails on nrf platforms. Added regex checks in sample.yaml
so the sample can be verified.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2020-06-17 07:51:46 -04:00
Johann Fischer
3f19918041 drivers: ssd16xx: add temperature sensor support
Appropriate WS can be loaded automatically if
the display controller has integrated temperature
sensor or an external sensor is connected.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
Johann Fischer
ac19e0f263 drivers: ssd16xx: support to load default WS from OTP
Add support to load default WS from OTP.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
Johann Fischer
9f863a396d shields: add support for GDEH0154D67 display
Add support for GDEH0154D67 display.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
the BASTION
3f5a32a7d4 boards: arm: add ruuvi_ruuvitag
Adds ARM based Ruuvtag baord. This board is based on the nRF52832.

Signed-off-by: the BASTION <thebasti0ncode@gmail.com>
2020-06-17 12:29:41 +02:00
Paul Sokolovsky
28af4bfb58 samples: posix: eventfd: Use full, not nano, Newlib.
printf() in this sample uses formatting codes not supported by
Newlib Nano.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-06-17 12:23:00 +02:00
Alexey Markevich
bf9aaa4b34 samples: net: google_iot_mqtt: fix subscription qos initialization
Callback used mqtt_publish_qos1_ack but mqtt_subscribe called with
default 0 value (MQTT_QOS_0_AT_MOST_ONCE)

Signed-off-by: Alexey Markevich <buhhunyx@gmail.com>
2020-06-17 13:03:51 +03:00
Maksim Masalski
6a805dff9f tests: fix text output in timing_info test
After reviewing that test I found output looks too messy.
1. Remove words starting from capital letter in the middle of the
sentence.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-06-17 11:17:27 +02:00
Håkon Øye Amundsen
13cf241ee6 cmake: docs: Fix 'test_relocation' -> 'code_relocation'
Incorrect name used for sample in two places.
This commit fixes these issues.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-06-17 09:40:47 +02:00
Maureen Helm
4475959285 drivers: sensor: Check i2c device pointer is non-null in bq274xx
Fixes the bq274xx sensor driver to check the i2c device pointer is
non-null, rather than the bq274xx sensor device pointer. This appears to
be the originally intended check based on the LOG_ERR message.

Coverity CID: 210035

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-06-17 09:31:16 +02:00
Karsten Koenig
189ae8c890 drivers: spi: rv32m1_lpspi: Fix null tx
Initialize the dummy data transfer so spi transfer is defined even for
an undefined tx data buffer. This aligns the rv32m1 spi driver with the
mcux spi driver.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2020-06-17 09:30:12 +02:00
Andrew Boie
4855eaa735 kernel: document arch_printk_char_out()
Used by very early console drivers.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-06-17 09:20:55 +02:00
Markus Becker
df38b0911c net: openthread: Add config for NRF52840 DK OpenThread NCP
New config file to build an OpenThread NCP for the NRF52840-DK
via CDC-ACM USB on the connector J3 (labelled 'nRF USB').

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-17 08:57:55 +03:00
Jukka Rissanen
6cec40e8cf samples: net: mqtt: Add userspace support to mqtt_publisher
Allow mqtt_publisher sample application to be run in user mode.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-06-17 08:56:27 +03:00
Markus Becker
f08045f077 settings: Fix uninitialised variables
When compiling the settings subsystems, I was getting the following
compiler warning:

```
/home/markus/src/wrp-n4m/zephyr/subsys/settings/src/settings_line.c: In function 'settings_line_cmp':
/home/markus/src/wrp-n4m/zephyr/subsys/settings/src/settings_line.c:477:6: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
  477 |  int rc;
      |      ^~
/home/markus/src/wrp-n4m/zephyr/subsys/settings/src/settings_line.c: In function 'settings_line_entry_copy':
/home/markus/src/wrp-n4m/zephyr/subsys/settings/src/settings_line.c:453:9: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
  453 |  return rc;
```

This patch fixes the warning.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-17 08:55:59 +03:00
Markus Becker
81d5425210 net: l2: Remove unnecessary()
When compiling network subsystem, I was getting the following compiler
warning:

```
In file included from /home/markus/src/wrp-n4m/zephyr/include/net/net_if.h:29,
                 from /home/markus/src/wrp-n4m/app/src/main/node/main.cpp:20:
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:80:32: warning: unnecessary parentheses in declaration of '__net_l2_OPENTHREAD' [-Wparentheses]
   80 | #define NET_L2_GET_NAME(_name) (__net_l2_##_name)
      |                                ^
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:82:29: note: in
expansion of macro 'NET_L2_GET_NAME'
   82 |  extern const struct net_l2 NET_L2_GET_NAME(_name)
      |                             ^~~~~~~~~~~~~~~
/home/markus/src/wrp-n4m/zephyr/include/net/net_l2.h:114:1: note: in
expansion of macro 'NET_L2_DECLARE_PUBLIC'
  114 | NET_L2_DECLARE_PUBLIC(OPENTHREAD_L2);
      | ^~~~~~~~~~~~~~~~~~~~~
```

This patch fixes the warning.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-17 08:55:59 +03:00
Adam Porter
f09b8681f6 net: sockets: remove POSIX_NAMES dependency on SOCKETS_OFFLOAD
This is no longer required since drivers implementing the sockets
offload interface were migrated to use pure zsock_ instead of
raw POSIX types and functions.

Signed-off-by: Adam Porter <porter.adam@gmail.com>
2020-06-17 08:55:17 +03:00
Andrei Gansari
3722c643c9 drivers: eth: enc28j60: Misc fixes
Aligns MAC registers to the latest reference manual.
Replaces NULL buffers as some SPI drivers will fail.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-06-17 08:52:42 +03:00
Andrei Gansari
44d32acc43 boards: lpcxpresso55s69 use GPIO as SPI CS
Enable GPIO as a workaround to enable some SPI slaves are not correctly
controlled using the Flexcomm SPI device.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-06-17 08:52:42 +03:00
Francois Ramu
540ed95786 boards: arm: new b_l4s5i_iot01a discovery kit
This patch introduces the new b_l4s5i_iot01a discovery kit
from STMicroelectronics.
This is a IOT node based on the stm32l4s5vi
including MEMS, Bluetooth BLE, WiFi and NFC modules

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-06-16 17:48:31 -05:00
Francois Ramu
4a04a5b597 dts: arm: stm32l4s5 new supported device
This patch introduces the stm32L4S5xx soc
from STMicroelectronics : based on the stm32l4r5

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-06-16 17:48:31 -05:00
Francois Ramu
c0d939ef0a soc: arm: stm32l4s5 new supported device
this patch introduces the stm32L4S5xx soc
from STMicroelectronics (based on the stm32l4r5)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-06-16 17:48:31 -05:00
Léonard Bise
14ced754f5 net: tcp: Do not send FIN when closing listening sockets
A net context in LISTENING mode waits for incoming connections, once
a new connection is established a new net context is spawned which
is responsible for handling the new connection.
Therefore when closing a LISTENING context it is not useful to send FIN
as it is never connected. Actually closing the connection would be done
by calling close on the spawned net context which is returned by the
accept call.

Signed-off-by: Léonard Bise <leonard.bise@gmail.com>
2020-06-16 23:47:40 +03:00
Thomas Stenersen
7a8ac5e2e6 Bluetooth: hci: Depend on SOC not BOARD
The CONFIG_BT_RPMSG_NRF53 should depend on the SOC, not the BOARD
definition. Otherwise this will break for custom boards.

Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
2020-06-16 22:12:00 +02:00
Lukasz Maciejonczyk
8acebb5cd0 tests: net: Add tests for IPv6 mesh addresses
This tests make sure that the right source address is chosen during
the mesh multicasting.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2020-06-16 19:14:52 +02:00
Lukasz Maciejonczyk
b0de2ee15b net: IPv6: Fix source address for mesh multicast destination
Currently there is chosen the link local address as a source address
for each multicast destination address. It is a bug for OpenThread
network where the mesh-local EID addres should be picked in this case.
This commit fixes it by distinquish the mesh local multicast among any
others.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2020-06-16 19:14:52 +02:00
Piotr Mienkowski
4b194eb4fc gpio: remove deprecated API functions/macros
This commit removes API functions and macros which were deprecated in
2.2 release. GPIO drivers are updated accordingly.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-06-16 19:13:05 +02:00
Piotr Mienkowski
c48206d5ee boards: remove usage of deprecated GPIO flags from .dts
Replace usage of deprecated GPIO_INT_ACTIVE_LOW, GPIO_INT_ACTIVE_HIGH,
GPIO_PUD_PULL_UP flags with a new equivalent in a few boards that were
added after 2.2 release.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-06-16 19:13:05 +02:00
Johan Hedberg
2f835332eb doc: releases: Add release notes for Zephyr 2.2.1
Add the release notes for Zephyr 2.2.1.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-06-16 19:12:09 +02:00
Krzysztof Chruscinski
8592d43191 drivers: uart: sam0: Reorder events on rx_disable
Modified order of reported events on rx disable to match API
description: first RX_RDY and then RX_BUF_RELEASED.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
34baec32ce tests: drivers: uart: Update uart_async read_abort test
Updated test to reflect API change.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
6cb9199dfc drivers: uart: nrf_uart: Generate RX_RDY after rx_disable
So far, when rx_disable was called then received data was discarded.
This is currently not according to the API but it is needed if
rx_disabled is called due to out of band information about end of
packet.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
62087be265 drivers: uart: nrf_uarte: Generate RX_RDY after rx_disable
So far, when rx_disable was called then received data was discarded.
This is currently not according to the API but it is needed if
rx_disabled is called due to out of band information about end of
packet.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
3a25c75ad9 doc: Add CONFIG_UART_ASYNC_API to the doxygen defines
Added CONFIG_UART_ASYNC_API to enable documentation generation for
asynchronous API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
47ebae40d3 drivers: uart: RX_RDY after rx_disable
Updated rx_disable() description so that RX_RDY event is generated
after calling rx_disable. It contains data received prior to abort.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Markus Becker
51d84c9eb4 drivers: pinmux: stm32: add PWM pinmux on PA3 for F4 series
Add PWM2 CH4 functionality on PA3 pin.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-16 19:11:35 +02:00
Markus Becker
dc4ce4edbe net: config: fix timeout 0 blocking start-up
With timeout==0 count is set to 0 as well and then it is decremented to
-1. It is later checked == 0 and continues to decrement and loop.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-16 19:10:25 +02:00
Joakim Andersson
f756b79124 Bluetooth: controller: Use NRF RNG entropy device
Use the NRF RNG entropy device as the entropy device for bt_rand and
controller internal functions when LLL is Nordic.
Using an entropy source with a significant increase in stack usage
will invalidate all stack size configurations in the system and lead
to stack overflow issues.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-06-16 19:09:55 +02:00
Marcin Niestroj
406a33682a soc: stm32: stm32l0: add stm32l011x4 support
Those MCUs have 2KB RAM and 16KB FLASH memory, but they are still
powerful enough to run small configuration of Zephyr RTOS.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-16 19:09:23 +02:00
Bilal Wasim
a2c4d82778 boards: arm: nucleo_f767zi: Add support for Hardware RNG
Added / Tested support for RNG on the STM32F767ZI nucleo board.
Updated the SoC defconfig to auto-enable the driver when
ENTROPY_GENERATOR is enabled, and updated the board README.

Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
2020-06-16 19:09:10 +02:00
Krzysztof Chruscinski
29cab30d46 logging: Clarify that hexdump messages have no function prefix
It was not clear that hexdump messages does not support prepending
with function name. Added clarification.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:05:51 +02:00
Jun Li
486dab02ec dma: stm32: implement get_status api
get_status api is not implemented in stm32 dma driver
but it will be used by others like async uart driver.

Signed-off-by: Jun Li <jun.r.li@intel.com>
2020-06-16 10:55:19 -05:00
Daniel Leung
afc1b9de13 timer: hpet: enable level triggering
The HPET timer was hard-coded to support only edge triggering
interrupts. This adds the necessary bits to enable level
triggering for the timer.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-06-16 10:52:43 -05:00
Ioannis Glaropoulos
8ada29e06c kernel: userspace: fix variable initialization
Need to initialize tidx before using it, to
supress compiler warning.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-06-16 10:50:27 -05:00
Vinayak Kariappa Chettimada
69ef82f22f Bluetooth: controller: Fix missing RADIO_TXP_DEFAULT define
Fix compile error due to missing include file that defined
RADIO_TXP_DEFAULT.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-16 17:48:59 +02:00
Vinayak Kariappa Chettimada
a20ecb6722 Bluetooth: controller: Fix compilation regression
Fix compilation regression due to addition of const
qualifier to tx_pwr_lvl parameter of ll_tx_pwr_lvl_set
function. Support for BT_CTLR_TX_PWR_DYNAMIC_CONTROL
needs the tx_pwr_lvl to be updated and returned.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-16 17:48:59 +02:00
Peter Bigot
ccc53f9872 docs: drivers: remove suggestion to assign driver_api in init function
The driver API should be assigned at the time the device is defined.
Assigning in the init function is redundant and prevents moving the
pointer to a immutable driver structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-16 10:46:39 -05:00
Peter Bigot
78f14aa91d drivers: i2c_dw: remove inappropriate assignment of API pointer
This is set when the device is defined, and should not be modified.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-16 10:46:39 -05:00
Peter Bigot
3cb335d0df drivers: gpio_intel_apl: remove inappropriate assignment of API pointer
This is set when the device is defined, and should not be modified.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-16 10:46:39 -05:00