scripts/checkpatch.pl was written originally for the Linux kernel, and
its code reflects the kernel's coding style. In particular, it has
checks for unneeded braces around single-statement if/else/for/while
conditions. In Zephyr however, braces are always required, and so the
checks needed modifying to verify the opposite condition.
In order to enable the now-compatible checks, we also remove the
--ignore BRACES statement in .checkpatch.conf.
Limitations: the current code works well if there are not conditional
statements (e.g. #if, #ifdef or #endif) next to the if/else/for/while
conditions. This is rarely the case, but triggers with the Bluetooth
controller in code like this:
```
#if defined(CONFIG_BT_PERIPHERAL)
if (!lll->is_hdcd)
#endif /* CONFIG_BT_PERIPHERAL */
{
```
```
} else
#endif /* CONFIG_BT_CTLR_PRIVACY */
{
```
```
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
if (lll->cte_started) {
radio_switch_complete(phy_s, 0, phy_s, 0);
} else
#endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
{
```
```
#ifdef DUAL_BANK
while ((FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW) ||
(FLASH_STM32_REGS(dev)->SR2 & FLASH_SR_QW))
#else
while (FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW)
#endif
{
```
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.
Signed-off-by: Martin Jäger <martin@libre.solar>
Pull the register variable into the private scope that ARCH_EXCEPT
creates so that the macro can be used multiple times in the same caller
scope. This can happen via k_panic(), e.g. in subsys/fs/ext2/ext2_impl.c.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
J-Link firmware images for silabs boards are not distributed by
SEGGER, fw update should be done with Simplicity Studio instead.
Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
Based on board files for DK2601B. The EFR32xG24 Explorer Kit
(xG24-EK2703A) is similar to the DK2601B but does not have any
sensors onboard.
Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
The EFR32MG24B210F1536IM48 has 4 more GPIOs than the
EFR32MG24B310F1536IM48, and does not support the high accuracy
mode for the IADC.
Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
Add support for .cold and .coldrodata sections, used to implement
a cold module. Assigning code and read-only data to those sections
makes them suitable for use in a cold module, stored and executed in
slow memory.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a manifest for a "cold" module, that will be executed in DRAM
without copying it to SRAM for the whole duration of the firmware
life-time.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Before copying modules to SRAM, check whether they're built for it,
skip modules, that aren't.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Due to adding subgroup count and streams per subgroup
arguments to the broadcast_source test, fix the sink
test that was not ported due to being merged for change
in a different PR.
Relates to commit 01e8d0e3e0 ("tests: Bluetooth: BAP:
Add subgroup and stream args to broadcast_source").
Fixes commit 303d0b786f ("tests: Bluetooth: BAP: Add
test to test invalid bcode").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Adds the counter property to the tmc2209 node to ensure counter dependant
step-dir code is build by CI.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Enables use of the counter dts property which allows to configure a counter
device as the timing source for the stepping.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Adds a timing source api which is used by the step-dir stepper common code.
This allows the reusable common code to configure different timing sources,
since the initial delayable work implementation was inacurate for higher
maximum velocities.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Use the shell_device_filter utils method and leverage the new api classing
to only suggest stepper devices via tab-complete within the shell.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
The LIS2DUXS12 is a smart, digital, 3-axis linear accelerometer whose
MEMS and ASIC have been expressly designed to combine the lowest current
consumption possible with features such as always-on antialiasing
filtering, a finite state machine (FSM) and machine learning core (MLC)
with adaptive self-configuration (ASC), and an analog hub / Qvar sensing
channel.
(https://www.st.com/en/mems-and-sensors/lis2duxs12.html)
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Prepare the driver to be able to handle other DUX software compatible
devices. Currently the driver handles the st_lis2dux12 compatible only.
Do following major changes:
1. Introduce the lis2dux12_chip_api structure filled with device specific
APIs. At the moment define following callback:
- api_lis2dux12_set_odr_raw()
- api_lis2dux12_set_range()
- api_lis2dux12_sample_fetch_accel()
- api_lis2dux12_sample_fetch_temp()
- api_lis2dux12_handle_interrupt()
- api_lis2dux12_init_interrupt()
2. Prepare specific APIs for st_lis2dux12 device.
3. Make DT instantiation on inst + name basis, and not only by inst. This
commit only use "name = DT_DRV_COMPAT = st_lis2dux12".
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The cdc-acm workqueue thread name is set before initializing it right
now, which results in an empty thread name as apparently it gets cleared
by k_work_queue_init. Fix it by moving the thread name setting after the
workqueu is initialized and started.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add additional data to the logs and only send the event once we have
receive a successful SDU.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The functions did not verify the provided parameters before
sending it as a control point operation.
This also fixes a bug where BT_BAP_BIS_SYNC_NO_PREF was not
allowed when pa_sync=0.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add 4 new tests for BAP broadcast:
1) One subgroup with one stream per subgroup
2) One subgroup with two streams per subgroup
3) Two subgroups with one stream per subgroup
4) Two subgroup with two streams per subgroup
To support these, the number of broadcast streams and data paths
was updated to be up to 4.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.
Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add subgroup count and streams per subgroup arguments to the
broadcast_source test. This will allow us to run multiple
test setups using the same build and test case.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Prevents sysbuild from being used as this adds a local snippet root
which should only be used (and tested) by application
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds support for sysbuild loading snippets, these can be included
by using e.g.: cmake ... -DSB_SNIPPET=blah for sysbuild
directly or can be used with an application and sysbuild using
-DSNIPPET. Snippets for sysbuild can use SB_EXTRA_CONF_FILE in the
snippet file to specify an extra Kconfig fragment for sysbuild
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Regardless of the argument specified, it always references the
property of the 0th, so it was corrected to reference the instance
specified by the argument.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>