Commit graph

42249 commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada
13a3270096 Bluetooth: controller: split: Fix assert in PDU Rx quota increment
Directed advertising timeout released PDU Rx quota which it
should not be.

Relates to assert in #21006.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Vinayak Kariappa Chettimada
ca8b6028c6 Bluetooth: controller: split: Move statements close to related context
Minor refactor, move statements close to related context.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Vinayak Kariappa Chettimada
4f42baa43d Bluetooth: controller: split: Use define instead of magic number
Use HCI Error Code define instead of magic number.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Ulf Magnusson
bd9962d8d9 kconfig: Remove '# hidden' comments on promptless symbols
Same deal as in commit 41713244b3 ("kconfig: Remove '# Hidden' comments
on promptless symbols"). I forgot to do a case-insensitive search.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 11:38:40 +01:00
ZhongYao Luo
a94e81ba3e Bluetooth: RFCOMM: Fix length errors when payload exceeds 127
hdr->length is the length of the payload, it should be
buf->len - sizeof(*hdr) - 1 or buf->len - (sizeof(*hdr) + 1)

Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
2020-01-03 10:14:59 +01:00
Aurelien Jarno
b35d414916 Bluetooth: Mesh: Fix PreviousAddress endianess in Friend Request
The upper transport layer is using big endian ordering. The
PreviousAddress field of a Friend Request message should therefore
be converted to native endianess using sys_cpu_to_be16().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-01-03 10:14:10 +01:00
Andrew Boie
d76ae46c0c lib: os: make snprintk fns generally available
The intention of disabling CONFIG_PRINTK is that all
invocations of it will compile to nothing, saving a lot
of runtime overhead and footprint since all the format
strings are completely dropped; instances of printk()
and related functions are no-ops.

However, some subsystems need snprintk() for string
processing, since the snprintf() implementations in even
minimal C library are too costly in text footprint or
stack usage for some applications. This processing is
required for the application to even function.

This patch continues to have disabling  CONFIG_PRINTK to
cause the non snprintk functions to become no-ops, but
now we always compile the necessary bits for snprintk(),
relying on gc-sections to discard them if unused.

z_vprintk() is now unconditionally defined in the header
since it is not tied to any particular output sink and
is intended for users who know exactly what they are
doing (it's in zephyr private scope).

Relates to: #21564

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 10:13:30 +01:00
David B. Kinder
17299f0734 doc: document python build scripts
We have a collection of python scripts that are part of our build
system.  This PR collects docstring comments added to these scripts into
a summary document.  Previous references to just the script name in
other documentation are updated to point to this build tool
documentation.

Some of the scripts needed an update to be processed (via include
directives) consistently.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-02 17:09:29 -05:00
Erwan Gouriou
9055cfe57e doc/guides: shields: Document shield conditional configuration
Update doc with new Kconfig.shield files.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
dfebba471c boards/shields: adafruit_2_8_tft_touch_v2: Move to Kconfig.defconfig
Move adafruit_2_8_tft_touch_v2 to Kconfig.defconfig format.
As part of this change Kconfig flags SPI and DISPLAY are removed
from the shield configuration as they are part of application
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
ffbfd51a9b boards/shields: dfrobot_can_bus_v2_0: Move to Kconfig.shield format
Move dfrobot_can_bus_v2_0 to Kcondig.shield foramt and as part of
this change introduce nrf52_pca10040 board specific configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
0c3ef63c5f boards/shields: fdrm_cr20a: Move to conditional Kconfig
Move shield to Kconfig.shield format.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
a8a9d34fce boards/shields: frdm_kw41z: Move to conditional Kconfig
Add Kconfig.shield to frdm_kw41z.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
0f63dee3c3 boards/shields: link_board_can: Move to conditional Kconfig
Move link_board_can to conditional Kconfig.
As part of this change, some board specific symbols are moved
to reel_board specific file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
35bbcc968c boards/shields: link_board_eth: Move to conditional Kconfig
Move link_board_eth to conditional Kconfig.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
b8c921c972 boards/shields: sparkfun_sara_r4: Move to conditional Kconfig
Move sparkfun_sara_r4 to conditional Kconfig.
As part of this change, remove disco_l475_iot1 specific configuration
as it is already part of board default configuration.

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

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
980ddb6b98 boards/shields: waveshare_epaper: Move to conditional Kconfig
Move wavehare epaper shields to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(SPI, SSD16XX) are removed as they are application
responsibility. GPIO is removed as well as it should be 'y' by
default on  all boards according to Default board configuration
guidelines.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
f74667bfc7 boards/shields: x_nucleo_iks01ax: move to conditional Kconfig
Add Kconfig.shield file for x_nucleo_iks01ax shields.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
7533a65797 doc/guides: shields: Document possibility to enable several shields
It is actually possible to use several shields in the same project.
Reflect it in the shields documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
1155c526ac boards/shields: Move wnc_m14a2a to conditional Kconfig
Put shield configuration Kconfig flags in new Kconfig.defconfig.
This way shield BLE subsystem can now be selected by application
using NETWORKING symbol, similarly to what is done when modem is
directly present on board.
Additionally, move board Kconfig files to a similar scheme where
shields related Kconfig flags are made available under shield,
board and NETWORKING symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
32e2681fa5 boards/shields: x_nucleo_idb05a1: Move to conditional Kconfig
Put shield configuration Kconfig flags in new Kconfig.defconfig.
This way shield BLE susbystem can now be selected by application
using BT symbol, similarly to what is done when BlueNRG ship is
directly present on board.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
e3bed1f260 boards: Kconfig: Enable use of shield conditional Kconfig files
To make use of shields Kconfig.defconfig, parse these files
and newly created Kconfig.shield files which will define the
SHIELD_XXX Kconfig symbols that will be used for conditional
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
17537c77c8 script/Kconfig: kconfig functions: Add shields_list_contains function
Add shields_list_contains Kconfig function which return bool based on
check of shield presence in cmake SHIELD_AS_LIST.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
6202d9c014 cmake: make shield list available to Kconfig
For application portability, it is required that feature activation
is made conditional in shield configuration. This way features remain
controlled on application side.
To enable this we need that list of user activated shield is made
available to Kconfig.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Henrik Brix Andersen
5640d65775 boards: actinius_icarus: add RGB LED to dts
Add the RGB LED present on the Actinius Icarus board to the device
tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
e9b2fdaeb2 boards: nrf52840_papyr: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52840_papyr board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
ff525c7284 boards: nrf52840_mdk: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52840_mdk board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
d45b279e50 boards: nrf52832_mdk: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52832_mdk board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
56522d285a boards: decawave_dwm1001_dev: add PWM LED
Add PWM LED to the decawave_dwm1001_dev board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Johann Fischer
7d0d845980 shields: st7789v_generic: add support for Waveshare 1.3inch display
Add support for Waveshare 1.3inch IPS LCD display.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
04db2dcea7 shields: st7789v_generic: rename shield to TL019FQV01
Rename shield to TL019FQV01.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
f0ba6656ca shields: st7789v_generic: add TL019FQV01 parameter and settings properties
Add TL019FQV01 parameter and settings properties.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
0fcd421973 drivers: display_st7789v: remove obsolete display_st7789v_tl019fqv01.c
Remove obsolete display_st7789v_tl019fqv01.c

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
0512c3e7d0 drivers: display_st7789v: remove obsolete Kconfig options
Remove obsolete Kconfig options.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
f6807df469 drivers: display_st7789v: obtain panel settings and parameters from DT
Obtain panel settings and parameters from DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
885d80f2f2 drivers: display_st7789v: make functions static, cleanup
Make privat functions static, remove unused st7789v_cmd_read8().

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
b5d43d24d8 drivers: display_st7789v: obtain resolution and offsets from DT
Obtain resolution and offsets from DT.
Fix style.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
9023f3ac34 drivers: display_st7789v: fix style, move init function to the bottom
Fix style, move init function to the bottom.

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

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-02 17:00:06 -05:00
Jan Van Winkel
7a633a5737 shields: display: Added generic shield for ST7789V
Added a generic display shield for boards based on the ST7789V
display controller.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-02 17:00:06 -05:00
Stephanos Ioannidis
cad30e817f arch: arm: Enable CMSIS-Core for Cortex-R by default
This commit enables the CMSIS-Core(R) processor interface driver for
the Cortex-R platforms by default.

The CMSIS-Core component provides a set of standard interface functions
to control the Cortex-R series processor cores and will be required by
the arch port as well as other CMSIS library components (e.g. CMSIS-DSP
and CMSIS-NN).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-02 16:59:04 -05:00
Oleg Zhurakivskyy
fdd29717f5 drivers: eth: e1000: Add a hexdump of the received/sent data
In case ETH_E1000_VERBOSE_DEBUG is enabled, hexdump
the received/sent data.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 16:58:27 -05:00
Oleg Zhurakivskyy
2552400533 drivers: eth: e1000: Sanitize the RX descriptor length
Add an error handling of the invalid RX descriptor length (<= 4).

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 16:58:27 -05:00
Oleg Zhurakivskyy
1453b316cb drivers: eth: e1000: Minor cleanup of the naming in e1000_rx()
Use buf and len for consistency.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 16:58:27 -05:00
Oleg Zhurakivskyy
4b74f69eb3 drivers: eth: e1000: Minor cleanup of the naming in e1000_tx()
Use buf and len for consistency.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 16:58:27 -05:00
Oleg Zhurakivskyy
f4ebf53cfb samples: sockets: echo: Include stdlib.h
Include stdlib.h to suppress a missing declaration
warning for exit() when compiled as a Linux target.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-02 13:07:19 -08:00
Joakim Andersson
63567c90ea Bluetooth: mesh: Add comment explaining use of byte order
Add comment that explains why a different byte order is used for the
3-byte opcode on the CID part of the opcode.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-02 19:05:27 +01:00
Joakim Andersson
f675e14718 Bluetooth: controller: Use 24-bit functions for LL Features
Use 24-bit functions for LL Features copying to make byteorder more
readable.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-02 19:05:27 +01:00
Joakim Andersson
6426cd58fc Bluetooth: mesh: Use 24-bit functions
Use 24-bit functions for byteorder and net_buf in order to make the
byteorder used more readable.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-02 19:05:27 +01:00