There is a build warning of unused `adc_stm32_oversampling_ratioshift`
function: [-Werror=unused-function]. This makes twister fail, as all
warnings are treated as errors.
Fix that by ifndef'ing adc_stm32_oversampling_ratioshift().
Fixes: c57a41c5d2 ("drivers/adc: stm32: do not disable the ADC if
resolution is unchanged")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This is really useful only for one case i.e. when testing against zero.
Do that test inline where it is needed and make the rest of the code
independent from the actual numerical value being tested to make code
maintenance easier if/when new cases are added.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
As we work to phase out devicetree 'label' properties, convert
driver to just use sx126x instead of DT_INST_LABEL for logging
purposes.
Signed-off-by: Kumar Gala <galak@kernel.org>
Close the flash_area at the end of individual tests to demonstrate
correct usage of the API.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Remove all usage of `device_get_binding` in the subsys by directly
storing the `const struct device*` in the `struct flash_area`.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This is just a stub with bits of information about RISC-V support on
Zephyr, that can and should be improved over time.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Move the `REQUIRES_FULL_LIBC` dependency from `config LORA` to
`config LORAWAN`. The commit that added the `select` (f590d4fa) mentions
that this is required by `loramac-node`, which is only used by LoRaWAN,
not the base LoRa code.
This results in small FLASH savings when compiling the samples, but can
result in larger savings in more complex applications:
```
// With REQUIRES_FULL_LIBC
west build -b 96b_wistrio zephyr/samples/drivers/lora/send/
[162/162] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 37708 B 128 KB 28.77%
SRAM: 8832 B 32 KB 26.95%
IDT_LIST: 0 GB 2 KB 0.00%
// Without REQUIRES_FULL_LIBC
[181/181] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 37444 B 128 KB 28.57%
SRAM: 8832 B 32 KB 26.95%
IDT_LIST: 0 GB 2 KB 0.00%
```
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Change logic in `modem_cmd_handler_setup_cmds` and
`modem_cmd_handler_setup_cmds_nolock` to always sleep
after each sent AT command.
The issue was found using a logic analyzer while debugging 'NO CARRIER'
from a BG95 modem while being in data mode.
The reason 'NO CARRIER' occured was due to crosstalk to DTR which
terminated data mode.
The logic analyzer also revealed that without the delay the next AT
command is sent before the whole 'OK\r\n' is received. This is not
addressed in this commit.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/47082
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add early returns from functions which are not used when
there is only one frontend in the system (no backends). This
allows to significantly reduce logging code size in that
configuration.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
According to mbedTLS' Changelog "Mbed TLS 3.0.0 branch released
2021-07-07" -> "Removals":
MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it
is now determined automatically based on supported curves.
Hence remove MBEDTLS_ECP_MAX_BITS from configuration files to fix build
issues with Zephyr when there is unfortunate order of include
statements.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Some drivers may not support simultaneous input-output
configuration or disconnect.
In such cases, the driver should return `-ENOTSUP` and the
test should be skipped.
Fixes#46917
Signed-off-by: Christopher Friedt <cfriedt@fb.com>
Keep the cavstwist.sh it is still working by specifying an
environment variable when CAVS_OLD_FLASHER is set. Provide
a fallback once the client-server-based tool does not work
well in some conditions.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
The magn_polling sample application now supports the hmc5883l driver, so
we can remove this driver-specific sample.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The magn_polling sample application now supports the bmm150 driver, so
we can remove this driver-specific sample.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Extends the magn_polling sample application to support additional
magnetometer drivers. This is a first step towards reducing the number
of driver-specific sensor sample applications.
Integration platforms were selected to exercise different magnetometer
drivers.
Tested on hardware with the following configurations:
- fxos8700 driver with the on-board sensor on the frdm_k64f board
- lis2mdl driver with a x_nucleo_iks01a3 shield attached to a frdm_k64f
board
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
For all boards that have a magnetometer devicetree alias, configure the
appropriate bus (I2C or SPI) default to be enabled when the sensor
driver class is enabled. This will simplify enabling the magn_polling
sample application for these boards (and using the magnetometer in
general) because it will eliminate the need to add a bunch of
board-specific configuration overlays to the application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
In prepration for configuring I2C/SPI defaults at the board level,
change the DesignWare GPIO driver's clock gate option to depend on clock
control instead of selecting clock control. This breaks a Kconfig
dependency loop when adding the following to a board's
Kconfig.defconfig:
config SPI
default y if SENSOR
There aren't any in-tree users that enable the clock gate option, so
there aren't any places in-tree that now need to enable the clock
control driver. Out-of-tree users that set CONFIG_GPIO_DW_CLOCK_GATE=y
will now also need to set CONFIG_CLOCK_CONTROL=y.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Sets a magnetometer devicetree alias for all boards that contain the
LSM303DLHC sensor to enable the magn_polling sample application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Sets a magnetometer devicetree alias for all boards that contain the
LSM303AGR sensor to enable the magn_polling sample application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Sets a magnetometer devicetree alias for all boards that contain the
LIS2MDL sensor to enable the magn_polling sample application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Sets a magnetometer devicetree alias for all boards that contain the
BMM150 sensor to enable the magn_polling sample application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Sets a magnetometer devicetree alias for all boards that contain the
FXOS8700 sensor to enable the magn_polling sample application.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
In preparation for extending samples/sensor/magn_polling to support
additional magnetometer drivers, enable these drivers by default when
the sensor driver class is enabled (CONFIG_SENSOR=y) and a compatible
devicetree node is enabled.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The fxos8700 device supports 3 modes: accelerometer-only,
magnetometer-only, or hybrid (accelerometer and magnetometer) modes. The
accelerometer-only mode is register compatible with mma8451q, mma8652fc,
and mma8653fc, which allows the fxos8700 driver to be used with these
devices as well.
Most in-tree boards can use hybrid mode because they have the fxos8700
device, therefore we change the driver default to match the common case.
For the handful of boards that have an mma86xx or mma84xx device, we
override the driver default to accelerometer-only mode. As a result, we
can enable the magn_polling sample application for the fxos8700 driver
without having to add a bunch of board-specific configuration overlays
for hybrid mode.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The I2C API recently updated terminology to replace "master" with
"controller", but this instance in the mcux lpi2c driver was missed.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Device power management introduction was mentioning an APIs
that no longer exists and also using a wrong nomenclature for
device runtime pm.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>