Commit graph

41120 commits

Author SHA1 Message Date
Vikrant More
5af5407570 samples: mesh: nrf52: added some preprocessor directive
Added some preprocessor directive so that code get compile
for some more nRF52 boards which has only one LED & one button.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
b80b359955 samples: mesh: nrf52: minor improvement in MOVE msg handlers
Changes in MOVE message handler are  as per Mesh Model
Specification which says:

"Upon receiving a Generic Move Set message, the Generic Level
Server shall respond with a Generic Level Status message.
The target Generic Level state is the upper limit of the
Generic Level state when the transition speed is positive,
or the lower limit of the Generic Level state
when the transition speed is negative."

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
102d402fc5 samples: mesh: nrf52: added some more macros support
Added some more macros support.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
c4edc2d78b samples: mesh: nrf52: removed redundant global variable
Removed global variable 'default_tt' & code depend on it
which is redundant as per latest implementation.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
13a5addffa samples: mesh: nrf52: corrected sequence of get & publish messages
Corrected sequence of execution of get & publish messages.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
f8c03d79f6 samples: mesh: nrf52: added separate update_vnd_led_gpio()
Added sepate function update_vnd_led_gpio().

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
c97e872e7d samples: mesh: nrf52: used constrain functions whereever possible
Added support of constrain_temperature() function.
Used constrain_lightness() & constrain_temperature()
whereever possible.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
ff323ce0e8 samples: mesh: nrf52: separately save default & last target values
Separately saved default & last target values of lightness,
temperature & delta_uv on flash (using settings layer).

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
5ad88281b0 samples: mesh: nrf52: rename enum attributes
Rename attributes in enum state_binding.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
89a0986dff samples: mesh: nrf52: implementation based on single pointer
Implement thing based on single struct light_ctl_state pointer
in entire Application.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Vikrant More
b5ebc66889 samples: mesh: removed redundant code, blank lines & comments
Removed redundant code, unnecessary blank lines & comments.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-12-11 12:52:17 +02:00
Joakim Andersson
a1d73acfcd Bluetooth: HCI: Handle invalid ACL flags.
Handle invalid ACL flags in HCI transport.
Only Point to Point is supported over HCI in both directions.
Fix flushable start HCI ACL packets not allowed on LE-U connections
from Host to controller.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-12-11 12:34:34 +02:00
Joakim Andersson
363c4d197c Bluetooth: HCI: Add utility to extract PB and BC flags from data header
Add utility to extract the flags Packet Boundary and Broadcast to the
hci.h together with the rest of the ACL data header definitions.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-12-11 12:34:34 +02:00
Alberto Escolar Piedras
dfed64c2a4 nrf52_bsim: Use HW models from new west module
Fetch HW models from a new west module.
And, remove all pre-west glue which was used to:
 * Fetch them in CI
 * Validate their vesion
 * Modify the include path and link to them

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-12-11 11:33:02 +01:00
Benjamin Valentin
2ffb8dd9f1 usb: sam0: use TRIM registers when available
Newer SoCs like SAME54 provide dedicated registers to store
the USB trim configuration.

Use those registers if they are defined in ASF to access the
calibration data.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-12-11 11:13:24 +01:00
Benjamin Valentin
e0b94e92d5 usb: sam0: Add support for MCLK
On newer sam0 SoCs peripherals are enabled through the MCLK
instead of the PM register.

Use the MCLK register if it's availiable.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-12-11 11:13:24 +01:00
Benjamin Valentin
2ff38cc631 usb: sam0: Support more then one USB IRQ
Newer SoCs like SAME54 have multiple IRQs for the USB peripheral.
Automatically enable all IRQs configured in the DTS.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-12-11 11:13:24 +01:00
Johann Fischer
9a7a1b0132 drivers: usb_dc_nrfx: remove not relevant bashing comments
Remove not relevant bashing comments.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-12-11 11:10:01 +01:00
Johann Fischer
b22035de45 drivers: usb_dc_nrfx: free memory if event is intended to be dropped
Free memory block if event is intended to be dropped.

Resolves: #20953

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-12-11 11:10:01 +01:00
ZhongYao Luo
d1aa80c049 bluetooth: l2cap_br: l2cap channel used wrong cid when removing
In bt_l2cap_br_chan, rx.cid is the local cid and tx.cid is the
remote cid. According to Core-5.0 Vol3.Part A 4.6-4.7,
l2cap_br_remove_tx_cid should be searched using tx.cid

Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
2019-12-11 11:34:43 +02:00
David B. Kinder
a4b134e0db doc: fix indent issues in release process doc
Some incorrect indenting in the doc was causing numbered lists to reset
back to 1 instead of continuing the series.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-10 21:44:09 -05:00
David B. Kinder
f72a50b96d doc: remove extra space after nested list
Remove extra spacing after a nested list.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-10 21:43:54 -05:00
Ulf Magnusson
d748cb6118 tests: net: all: check_net_options.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
0521eaf578 bsim_bt: run_parallel.sh: Remove semicolons at ends of lines
Not needed in sh.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
072188d0e8 bsim_bt: run_parallel.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
9446554969 bt_sim: basic_conn_encrypted_split.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
d779de1f54 bt_sim: basic_conn_encrypted.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
0d8495c756 zephyr_env.sh: Remove semicolons at ends of lines
Not needed in sh.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
0194d04c49 zephyr-env.sh: Use lowercase for internal vars
ci: run_ci: Use lowercase for internal variables

This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
ed4f3cd354 bsim_bt: basic_conn_split.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
c69a501df6 bsim_bt: basic_conn.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
d3d79ef4eb bsim_bt: compile.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
94d1db03af ci: run_ci: Remove semicolons at ends of lines
Not needed in sh.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Ulf Magnusson
85625aa27f ci: run_ci: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-10 14:34:46 -08:00
Anas Nashif
e71293ea44 kernel: kernel.h doxygen cleanup
Cleanup of document APIs and structure, mostly making doxygen aware of
documented members.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-10 17:22:34 -05:00
Vinayak Kariappa Chettimada
5f10154724 Bluetooth: controller: split: Fix HCI LE Add Device to Whitelist
According to BT Spec v5.1 Vol 2 Part E Section 7.8.16, if the
device is already in the White List, the controller should not
add the device to the White List and should return success.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-12-10 22:29:15 +02:00
Vinayak Kariappa Chettimada
09f7364cf8 Bluetooth: controller: legacy: Fix HCI LE Add Device to Whitelist
According to BT Spec v5.1 Vol 2 Part E Section 7.8.16, if the
device is already in the White List, the controller should not
add the device to the White List and should return success.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-12-10 22:29:15 +02:00
Johan Hedberg
fcbfb53525 tests: mesh: Fix build for bbc_microbit
A recent patch changed the default ISR stack size for bbc_microbit
which causes this app to consume more RAM than is available. Fix this
by specifying an explicit stack size.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-12-10 12:56:37 -05:00
Erwan Gouriou
ce14186a07 modules: modules: stm32 hal: Provide help section to HAL/LL symbols
Provide a help section for each STM32Cube API Kconfig symbols


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-10 12:44:10 -05:00
Erwan Gouriou
f5080ce015 modules: stm32 hal: Rename USE_STM32_HAL_CRYPT and _CRYPT_EX
Cf https://github.com/zephyrproject-rtos/hal_stm32/pull/29

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-10 12:44:10 -05:00
Torsten Rasmussen
08eabb83b2 cmake: Zephyr module processing set modules path
This commit introduces the variable:
ZEPHYR_${MODULE}_MODULE_DIR that can be used for modules to obtain
locations of other modules.

As example: a module which requires the knowledge of mcuboot con now
fetch this information using ZEPHYR_MCUBOOT_MODULE_DIR.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-12-10 17:43:55 +01:00
Joakim Andersson
e4136178ed Bluetooth: Host: Fix duplicate whitelist entries issue
If the whitelist already exists in the controller then the controller
should not add the device tot the whitelist and should return success.
In that case the counting of entries in the whitelist in the host will
be wrong.

Remove all whitelist counting in the host, and instead rely on the error
reported by the controller for this.
The controller should return error if the whitelist is full.
The controller should return error if use of whitelist was requested but
the whitelist was empty.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-12-10 17:54:10 +02:00
Anas Nashif
1d25eba4fd tests: obj tracing: fix counting
We break out of the while loop on a 2 count then we assert on 2, this
seems to never fail. Count to the end and then assert.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-10 10:40:16 -05:00
Anas Nashif
5d94b89512 tests: fifo: assert of NULL from k_fifo_get
Fix Null pointer dereferences.

Fixes #20877
Coverity CID: 205823

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-10 10:39:59 -05:00
Andrei Emeltchenko
07bee26f8f ipm: Correct IPM API error codes
Indicates that error codes are negative.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-10 10:26:38 -05:00
Andrei Emeltchenko
e770c8d855 drivers: ipm: Cleanup IPM Kconfig
Make all option be hidden behind IPM menu

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-10 10:26:38 -05:00
Martí Bolívar
0186eade51 scripts: add new west build "build.cmake-args" config option
This option, if set, will add arguments to CMake whenever a new build
system is being generated.

It doesn't affect other invocations of CMake, such as when cmake(1) is
run in build tool mode to actually compile the application.

See the documentation changes for details.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-10 16:19:18 +01:00
Maureen Helm
5a19106396 boards: arm: Add arduino header to all mimxrt boards
Adds a device tree nexus node to define which gpio pins are mapped from
the soc to the arduino header.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:49:31 -06:00
Maureen Helm
851e397d19 boards: arm: Add arduino header to all frdm boards
Adds a device tree nexus node to define which gpio pins are mapped from
the soc to the arduino header.

The frdm_kw41z board excludes the arduino A0 pin because it cannot be
muxed as a gpio on the soc.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:49:31 -06:00
Andrei Gansari
487dc7cb94 soc: enable secure mode for LPC55xxx
Devices that are SECURE enabled may require sometimes to enable secure
bits on CMSE register.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2019-12-10 08:48:56 -06:00