Commit graph

53552 commits

Author SHA1 Message Date
Martí Bolívar
bd8afe9365 drivers: sensor: clean up zephyr_library calls
In drivers/sensor/CMakeLists.txt, we have various lines like this:

    add_subdirectory_ifdef(CONFIG_FOO foo)

Then drivers/sensor/foo/CMakeLists.txt says:

    zephyr_library()
    zephyr_library_sources_ifdef(CONFIG_FOO foo.c)

This is redundant; the foo/CMakeLists.txt won't be added to the build
system unless CONFIG_FOO=y in the first place, so there's no need for
extra boilerplate testing it again.

Remove all these unnecessary instances in each sensor driver's
CMakeLists.txt using this pattern:

    zephyr_library()
    zephyr_library_sources(foo.c)

In a couple of places, the '.c' extension is missing. Add them in for
consistency when that happens.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-30 09:36:33 -04:00
Gerard Marull-Paretas
a9b1c42f40 doc: extensions: remove eager_only
The eager_only is currently breaking the usage of the `.. only``
directive, so remove it. Documentation seems to build fine without it,
so it has been removed for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-30 08:29:01 -04:00
Lingao Meng
cc0abee3db Bluetooth: Mesh: Check the CID field before opcode compare
Bluetooth Mesh Vendor model hava company id field.

Accordin MeshPRFV1.0.1 3.7.3.1 Operation codes.

The 3-octet opcodes are used for manufacturer-specific opcodes.
The company identifiers are 16-bit values defined by the
Bluetooth SIG and are coded into the second and third octets of
the 3-octet opcodes.

Therefore, we can speed up the search process by checking whether
CID fields match, rather than comparing opcodes one by one.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-06-29 17:08:02 -04:00
Piotr Pryga
9fd079bb0d samples: Bluetooth: df_rx: Add config for support the nRF52820
Add required configuration and DTS overlay for support the nRF52820 SOC.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-06-29 17:07:20 -04:00
Vinayak Kariappa Chettimada
d3c27aeb8f Bluetooth: Controller: Fix Data Length Update node Rx reservations
Reserve a minimum node rx of 2 that can happen when local
central initiated PHY Update reserves 2 node rx, one for PHY
Update complete and another for Data Length Update complete
notification. Otherwise, a peripheral only needs 1
additional node rx to generate Data Length Update complete
when PHY Update completes.

Relates to #36381.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00
Vinayak Kariappa Chettimada
6810facffa Bluetooth: Controller: Fix free rx buffer MFIFO enqueue
Replace the post decrement in loop's conditional into
explicit decrement inside the loop so as to avoid
decrementing the maximum count without enqueueing free rx
buffers into the free rx buffer MFIFO.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00
Vinayak Kariappa Chettimada
ecf7106177 Bluetooth: Controller: Minor change to use IS_ENABLED
Minor changes to use IS_ENABLED and updates to comments in
code.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-06-29 17:05:20 -04:00
Krivorot Oleg
1d55d929db drivers: display: ili9xxx: add support for ILI9341 controller
Add support for the ILI9341 display controller.

Signed-off-by: Krivorot Oleg <krivorot.oleg@gmail.com>
2021-06-29 16:02:44 -04:00
Vlad Tuhut
7580623a36 net: mqtt: Add custom transport type
Add new custom transport type.
This allows user defined transport for MQTT communication.
The user must implement the transport procedure.

Fixes **#27015**

Signed-off-by: Vlad Tuhut <vlad.tuhut@raptor-technologies.ro>
2021-06-29 11:34:57 -04:00
Yong Cong Sin
a1945867b3 dts/arm: stm32g0: Add lptim1
Add lptim1 node for the G0 series.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-06-29 11:33:41 -04:00
Radoslaw Koppel
c888ceea32 sys: printk: Fix LOG2 printk support in cpp code
This commit fixes the issue with a compilation of the sample that
uses printk function from cpp code when LOG2 is used and printk
is handled by logging subsystem.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2021-06-29 11:33:21 -04:00
Glauber Maroto Ferreira
ee6b33feeb esp32: cache: test: add Flash/SPIRAM cache test
Add SPI Flash/SPI RAM coexistence test.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-06-29 11:32:32 -04:00
Alexandre Bourdiol
40618a2e90 boards: shield: x_nucleo_idb05a1: add nucleo_l476rg spi overlay
Standard Arduino CLK signal is on D13,
nucleo_l476rg board has been modified accordingly.
Need an overlay to use default x_nucleo_idb05a1 spin D3 (PB3)

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
7897909654 boards: arm: stm32f746g_disco: full Arduino SPI support
Full Arduino SPI support for stm32f746g_disco

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
38a106c5b5 boards: arm: nucleo_l4r5zi: full Arduino SPI support
Full Arduino SPI support for nucleo_l4r5zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
bf006d09ed boards: arm: nucleo_l496zg: full Arduino SPI support
Full Arduino SPI support for nucleo_l496zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
c08abca079 boards: arm: nucleo_l452re: full Arduino SPI support
Full Arduino SPI support for nucleo_l452re

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
d13f4f4fa2 boards: arm: nucleo_l412rb_p: full Arduino SPI support
Full Arduino SPI support for nucleo_l412rb_p

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
35d650543a boards: arm: nucleo_h753zi: full Arduino SPI support
Full Arduino SPI support for nucleo_h753zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
092ffa5d1e boards: arm: nucleo_h743zi: full Arduino SPI support
Full Arduino SPI support for nucleo_h743zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
d6f093d3e2 boards: arm: nucleo_f767zi: full Arduino SPI support
Full Arduino SPI support for nucleo_f767zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
c7dc28f32d boards: arm: nucleo_f756zg: full Arduino SPI support
Full Arduino SPI support for nucleo_f756zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
18f3ac7308 boards: arm: nucleo_f746zg: full Arduino SPI support
Full Arduino SPI support for nucleo_f746zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
d7ebb7ec3e boards: arm: nucleo_f429zi: full Arduino SPI support
Full Arduino SPI support for nucleo_f429zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
fe898569c0 boards: arm: nucleo_f413zh: full Arduino SPI support
Full Arduino SPI support for nucleo_f413zh

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
5682612470 boards: arm: nucleo_f412zg: full Arduino SPI support
Full Arduino SPI support for nucleo_f412zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
1ff3d0e878 boards: arm: stm32l496g_disco: full Arduino SPI support
Full Arduino SPI support for stm32l496g_disco

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
38ccb43793 boards: arm: nucleo_f401re: full Arduino SPI support
Full Arduino SPI support for nucleo_f401re

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
0369fcaf4a boards: arm: nucleo_f334r8: full Arduino SPI support
Full Arduino SPI support for nucleo_f334r8

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
fd9476ba6a boards: arm: nucleo_f302r8: full Arduino SPI support
Full Arduino SPI support for nucleo_f302r8

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
bba34064ee boards: arm: nucleo_f207zg: full Arduino SPI support
Full Arduino SPI support for nucleo_f207zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
c1e82faeae boards: arm: nucleo_f103rb: full Arduino SPI support
Full Arduino SPI support for nucleo_f103rb

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
518f6a1f59 boards: arm: nucleo_f070rb: full Arduino SPI support
Full Arduino SPI support for nucleo_f070rb

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
35d674829c boards: arm: nucleo_f030r8: full Arduino SPI support
Full Arduino SPI support for nucleo_f030r8

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
75adf12258 boards: arm: disco_l475_iot1: full Arduino SPI support
Full Arduino SPI support for disco_l475_iot1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
16ada70a7a boards: arm: b_l4s5i_iot01a: full Arduino SPI support
Full Arduino SPI support for b_l4s5i_iot01a

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
cab576fb82 boards: arm: nucleo_g474re: fix Arduino SPI support
Fix Arduino SPI support for nucleo_g474re.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
7f7cf98887 boards: arm: nucleo_g431rb: fix Arduino SPI support
Fix Arduino SPI support for nucleo_g431rb.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
aaed982030 boards: arm: nucleo_l433rc_p: add Arduino SPI support
Add Arduino SPI support for nucleo_l433rc_p.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
1c1106db1e boards: arm: nucleo_l476rg: add Arduino SPI support
Add Arduino SPI support for nucleo_l476rg.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
b56ae7b2a3 boards: arm: stm32f469i_disco: add Arduino SPI support
Add Arduino SPI support for stm32f469i_disco.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
9401d10c2b boards: arm: stm32f723e_disco: add Arduino SPI support
Add Arduino SPI support for stm32f723e_disco.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
1ee797bd52 boards: arm: stm32f769i_disco: add Arduino SPI support
Add Arduino SPI support for stm32f769i_disco.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
3d3a3007fa boards: arm: stm32h747i_disco: rework uart split between CM4 and CM7
Move uart/usart pinctrl to common file.
Set status in dedicated m7 or m4 file.
But only one core can control a peripheral instance.
Arbitrary default choice:
usart1 --> m7
uart8 --> m4

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Alexandre Bourdiol
b11ec57445 boards: arm: stm32h747i_disco: add Arduino SPI support
Add Arduino SPI support for stm32h747i_disco.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Krzysztof Chruscinski
520ba93f5d drivers: serial: nrfx_uarte: Fix race condition in async isr
RXTO event is generated always after ENDRX and driver relies
on assumption that ENDRX event is handled before RXTO. However,
when interrupt is preempted after ENDRX check returned false
and RXTO event is already set handling order would be swapped.

Added addtional check to handle RXTO event only if ENDRX is not
set. If ENDRX is set, it means that it is not yet handled. RXTO
event is not cleared and interrupt will be triggered again and
ENDRX event will be handled first.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-06-29 11:31:31 -04:00
Armando Visconti
fa423d30a2 drivers/sensor: lis2dw12: Preserve APIs error code
Return the same error code returned by HAL i/f APIs.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
40f843ae54 drivers/sensor: lis2dw12: Set tap triggers only if detection is on
Set single/double tap triggers only if tap detection is enabled.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
de0ff0c354 drivers/sensor: lis2dw12: Fix the logic to set TAP interrupt
The lis2dw12 sensor can generate the TAP interrupt only on INT1,
while DRDY can be generated on both. The int-pin DT property
specifiy on which pin the DRDY (and not the TAP) can be generated.

This commit fix the way the trigger is set: first the driver checks
the trigger type (DRDY or TAP), then it uses the int-pin information
only in DRDY case but allows setting TAP regardless of int-pin (it
always routes it on INT1).

The previous code was first checking int-pin: if it was INT2 then
the driver refused setting TAP triggers.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
9217e37901 drivers/sensor: lis2dw12: Add multi-instance support
This commit aligns lis2dw12 sensor driver to latest multi
instance sensor driver model.

In particular it makes use of the stmemsc common routines
and move ctx handler inside struct config, so that the
bus_init routines can be totally avoided.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00