The LPS28DFW is an ultracompact, piezoresistive, absolute pressure sensor.
Compared to the LPS22DF, the LPS28DFW is waterproof and has a Dual FS
capability and does not have SPI. This commit extends the LPS22DF driver to
be compatible with the LPS28DFW device.
Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
Interupts should be enabled after int line configuration in bmi.
When the device goes to a suspended state interrupts must be disabled.
Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
Since lsm6dsv16x may be multi-instantiated, triggers must be enabled
and configured on DT basis and not only thru CONFIG_LSM6DSV16X_TRIGGER
macro; if either int1-gpios of int2-gpios (or both) are configured
in DT, the flag trig_enable is set to 'true' for that instance.
The previous implentation was lacking the check of those two Device
Tree properties, so trig_enabled was always true for all instances.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
These are not needed and are now causing build errors since the
pm_device calls are always there and need the header to become a no-op.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The pm_policy_state_lock_put and pm_policy_state_lock_put functions
already become a no-op if CONFIG_PM is not enabled. Drop the guards
around it in few different drivers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Do not enable subsystem/driver shell modules by default and stop abusing
CONFIG_SHELL_MINIMAL, which is internal to the shell subsystem, to decide
when to enable a driver shell.
The list of shell modules has grown considerably through the
years. Enabling CONFIG_SHELL for doing e.g. an interactive debug session
leads to a large number of shell modules also being enabled unless
explicitly disabled, which again leads to non-negligible increases in
RAM/ROM usage.
This commit attempts to establish a policy of subsystem/driver shell
modules being disabled by default, requiring the user/application to
explicitly enable only those needed.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The wait times in the self test procedure, according to the datasheet
are 4 / ODR (current set value).
Update the self test procedure by using the delay corresponding to the
current ODR value that is set, instead of default ODR.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
The LPS22DF is an ultracompact, piezoresistive, absolute pressure sensor
that functions as a digital output barometer. The LPS22DF provides lower
power consumption, achieving lower pressure noise than its predecessor.
This driver is based on stmemsc HAL i/f v2.3
https://www.st.com/en/datasheet/lps22df.pdf
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Replace unrelated part name with the actual driver name in the
adxl372.h header file.
Fixes: a3e7cea ("adxl372: Add driver for ADXL372 high-g accelerometer")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Having a % FIFO watermark isn't very useful as it doesn't convey how long
the SoC can sleep (or do other work) while batching sensor data. Convert
the attribute to a batch duration using ticks. Currently the ticks are
in system ticks, but eventually when an external clock is attached to
the sensor it will be in the external clock's ticks.
Signed-off-by: Yuval Peress <peress@google.com>
Add streaming implementation for icm42688 using both threshold and
full FIFO triggers.
Signed-off-by: Yuval Peress <peress@google.com>
topic#sensor_stream
Introduce a streaming API that uses the same data path as the async API.
This includes features to the decoder:
* Checking if triggers are present
Adding streaming features built ontop of existing triggers:
* Adding 3 operations to be done on a trigger
* include - include the data with the trigger information
* nop - do nothing
* drop - drop the data (flush)
* Add a new sensor_stream() API to mirror sensor_read() but add an
optional handler to be able to cancel the stream.
Signed-off-by: Yuval Peress <peress@google.com>
topic#sensor_stream
Add basic support for ams TSL2561 light sensor. Triggers, attributes
and manual integration time are currently not supported.
Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
Both the BQ27421 and BQ27427 have a few preset Chemistry profiles.
For the BQ27421 there exists three variants of the IC, and for the BQ27427,
it can be configured. The chemistry profile among other things includes the
taper voltage, which is used to detect charge termination.
This adds an optional `chemistry-id` config option to the driver. On the
BQ27421, it will confirm that the correct variant of the IC is mounted,
and on the BQ27427, it will configure it with the correct value.
Side note: The reference manual for the BQ27427
(https://www.ti.com/lit/ug/sluucd5/sluucd5.pdf) currently contains some
errors and inconsistencies regarding these registers. The table on page 7
appears to be correct.
Signed-off-by: Tobias Pisani <topisani@hamsterpoison.com>
This commit names a couple of choices to allow the default
value to be overridden by Kconfig files out of tree
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
Since the accelerometer's HM (high-performance mode) bit is forced to 1,
the 1.6Hz frequency is available by setting the ODR to 11.
1.6Hz is a low-power mode that conserves energy and is suitable for
some applications, such as determining the orientation (portrait or
landscape) of a device.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Add in DT the possibility to configure both INT1 and INT2
pin. The driver will then assign one of the two (either 1
or 2, according to what value drdy_pin is set) to a gpio
for receiving drdy interrupts.
The other pin may be used in the future to receive event
interrupts.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add driver support for adxl367 accelerometer.
The ADXL367 is an ultralow power, 3-axis microelectromechanical
systems (MEMS) accelerometer that consumes only 0.89 μA at
a 100 Hz output data rate and 180 nA when in motion-triggered
wake-up mode. Unlike accelerometers that use power duty cycling
to achieve low power consumption, the ADXL367 does not alias
input signals by undersampling, but samples the full bandwidth of
the sensor at all data rates.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Underlying nrfx driver was modified so now it forwards the event
to the user callback only if it was enabled.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
The scaling factor for current measurement was incorrect.
Full range scaling during charge is 1.25 * charge current
limit, and there is no additional scaling factor applied
in different charge modes.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
add basic sensor support for 3-axis accelerometer, currently
this driver support data acquisition and motion detection
features.
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
This CL uses BUILD_ASSERT macro to check whether `thr-sel` is out of
range instead of using NPCX series definitions.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Add wakeup_duration support. (WAKE_DUR in WAKE_UP_DUR)
Value is configurable through DT per instance.
Signed-off-by: Adrian Wojak <adrian.wojak@outlook.com>
This driver uses the math library, so it cannot use the minimal C
library. However, it should be fine with any complete C library, not just
newlib.
Signed-off-by: Keith Packard <keithp@keithp.com>
The macro K_THREAD_STACK_MEMBER has actually been deprecated
since v2.4.0 in the macro doxygen description, but it was
never marked with __DEPRECATED_MACRO. Since this was being
used in various drivers, make it follow the deprecation
process.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix a build warning on 64 bit architectures:
zephyr/drivers/sensor/default_rtio_sensor.c:238:17: error: format '%zu'
expects argument of type 'size_t', but argument 2 has type 'uint32_t'
{aka 'unsigned int'}
num_channels type changed to uint32_t in 96175fcc47.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add padding to the header and remove unnecessary memset in order to fix
alignment faults in cores such as M0 or ones that support
CONFIG_TRAP_UNALIGNED_ACCESS
Signed-off-by: Yuval Peress <peress@google.com>
Changes the interpreted unit of the threshold temperatures to match the
description (millidegrees).
Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
Values are specified in the datasheet(page 30, table 18).
Values match with values defined in lsm6dso-common.yaml
Signed-off-by: Jeroen Reeskamp <jeroen.reeskamp@vention.nl>
Fix wrong debug message when port B of tachometer is captured.
Signed-off-by: Evan Chang <MCCHANG1@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
While recent browsers seem to transparently try to use https for
http://www.st.com/... URLs, they are effectively not working anymore, so use
https://www.st.com/... URLs instead.
curl http://www.st.com/en/evaluation-tools/nucleo-g070rb.html -m 5 -v
* Trying 104.89.117.48:80...
* Connected to www.st.com (104.89.117.48) port 80 (#0)
> GET /en/evaluation-tools/nucleo-g070rb.html HTTP/1.1
> Host: www.st.com
> User-Agent: curl/8.1.2
> Accept: */*
>
* Operation timed out after 5002 milliseconds with 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 5002 milliseconds with 0 bytes
received
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit does not introduce any functional change to the
codebase. Just removes certain redundant checks from
various CMakeLists.txt files in order to bring more coherence
in the codebase.
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Introduce support for Texas Instruments TMAG5170
high-precision linear 3D Hall-effect SPI sensor.
This driver allows to configure measurements on
magnetic and temperature channels. It is also
possible to read rotation of the magnet.
Signed-off-by: Michal Morsisko <morsisko@gmail.com>
Adds initial support for hm330x dust sensor series. Allows to read PM1,
PM2.5 and PM10 concentrations in atmospheric environment. A further
update to the driver may add support for also reading "standard" CF1
concentrations by exposing of a custom sensor attribute or a Kconfig
option. Tested with Grove - Laser PM2.5 Sensor (HM3301) attached to a
Wio Terminal.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Implement the RTIO/Sensors V2/Async API for the AKM09918C. Add a decoder
API implementation as well.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Update the decoder APIs to vertically decode the raw sensor data. This
means that instead of getting each channel on a frame by frame basis,
the API takes a channel specifier and returns as many frames of that
given channel as there's room.
The goal of this is to make the end decoded result the most useful and
usable for the Zephyr application. See #60944 for details.
Signed-off-by: Yuval Peress <peress@google.com>
On some STM32 families (such as F4), temperature and Vbat sensor share the
same ADC channel, which can lead to conflict when reading them, and wrong
measurement can follow.
To alleviate this problem, this commit moves the setting of the common
path internal channel to the sensor drivers themselves instead of doing
it in the ADC driver.
The teardown is still done in the ADC driver, systematically, instead of
channel by channel (which has the same result).
By moving this logic in the sensor drivers, the properties temp-channel,
vbat-channel and vref-channel becomes useless and are thus removed.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Added ability to read contents of TMP116 configuration register by adding
an attribute get function that supports the SENSOR_ATTR_CONFIGURATION
option. Followed the same approach as the TMP108 driver. Interpretation of
the returned value is left up to the caller.
Tested using Nucleo-F401RE and Temp-Log 2 (TMP116) click board and
confirmed a read of the configuration register returned the expected
value.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Drivers for nRF SoCs using pinctrl did not select PINCTRL. This means
boards are forced to enable PINCTRL.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
bsearch() tries to find the exact match for the key, otherwise it
returns NULL. However, here we want to find two elements our key lies
in-between. This requires some rather complicated logic that pretends
it found the exact match even if it didn't. Replace this with a simple
implementation of binary search.
Signed-off-by: Paweł Anikiel <pan@semihalf.com>
The value of n_comp is wrong for ntc-thermistor-generic. Introduce a
helper macro to compute n_comp correctly for both thermistor types.
Signed-off-by: Paweł Anikiel <pan@semihalf.com>
The pullup resistance was assumed to be the maximum ADC value. This is
incorrect when the reference ADC voltage and the thermistor pullup
voltage differ. Use the pullup_uv property from DT instead.
The equations for the thermistor resistance are also wrong. The correct
equations are (see https://en.wikipedia.org/wiki/Voltage_divider):
R1 = R2 * (Vin / Vout - 1)
for the positive-connected resistor, and
R2 = R1 * (Vin / Vout - 1)^-1
for the negative-connected resistor. These were transformed so that
they can be computed using integer math.
Signed-off-by: Paweł Anikiel <pan@semihalf.com>
This commit adds Kconfig variables to configure ADLTC2990. This commit adds
basic driver code for analog devices ltc2990 sensor.
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Update single phase bit in register when changing data->qdec_config.
Otherwise the changed settings has no effect.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add `thr-sel` prop. to select the relevant threshold register for adc
comparator since there're two adc modules in npcx4 series.
Signed-off-by: Kate Yen <htyen@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Add multi-device support in npcx adc driver since there is more than one
adc module in npcx4 series. And each adc's reference voltage might be
different, this CL introduces the `vref-mv` prop. to select its own
reference voltage.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Kate Yen <htyen@nuvoton.com>
Fix the whole v_empty setting code, this was using a wrong scaling
factor, but also incorrectly clearing the recovery voltage part of the
register.
Change the code to read the previous value and mask out the bits not
used by VE.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit changes the parameter of i2c_dump_msgs function from
string name to pointer to the device structure.
It allows for comparison of device pointers and allow to use
the printed device name in i2c shell commands.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Add support for device power management. When the sensor
is not powered, the fetch function will fail. When the
sensor is not connected to a power domain, it will behave
as usual.
Signed-off-by: Albert Jakieła <aja@semihalf.com>
LOG_INF() inside of a sample_fetch create noise in the logs and is
inconsistent with other sensor driver implementations.
Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
The Calibration value of the VRef on stm32U5 is acquired on 14Bit by ADC1
and should be adjusted on 12bit becasue the resolution is 12bit
in this stm32_vref driver.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
On my end, the ISM330DHCX was stopping working after a few seconds.
After investigation, it seems that the function used to set the device
in pulse mode only works for special modes like tap and embedded functions
and not for data-ready as intended.
The data-ready was then in the default latched mode which does not work
sustainably with the rest of the driver logic. In this mode, the driver
can miss an interrupt and be forever waiting on a new data-ready pulse
which will never happen as the interrupt line is already active.
This calls the correct function to enable pulsed data-ready mode as
described in the datasheet section 9.7 COUNTER_BDR_REG1 (0Bh).
Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
Change few data units that are currently reported three order of
magnitude off from what the sensors API specifies.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The various BQ27xxx datasheet seems to indicate a typical power-up or
shutdown to communication time of 250ms typical.
Adjust the driver to include:
- a check to ensure that the MCU has been powered for at least 300ms
before any communicaton
- the same delay when exiting shutdown state
Link: https://www.ti.com/lit/gpn/BQ27427
Suggested-by: Nick Ward <nix.ward@gmail.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The BQ27427 appears to work incorrectly with the ROM configuration
value, it battery power and current are the inverse of what they should
be, and SoC is decresing when charging and increasing when discharging
as a consequence.
At this time this only appears documented in the TI E2E forums, and the
workaround seems to be to invert the sign of the CC Sense register of
the device.
This register is not documented on the BQ27427 device technical
reference manual, as the device has an internal shut and the sense value
should not have to be tweaked, so the CC Sense details are taken from
the BQ27426 one instead, which is supposedly the same silicon with an
external shunt.
Also the CC Sense value, which is just documented as "F4" (as in 4 bytes
float) is actually in a proprietary floating point format, so instead of
trying to decode, just swap the known sign bit as documented in the E2E
forum post.
Link: https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1215460/bq27427evm-misbehaving-stateofcharge
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Rework the device configuration code. The current code has a bunch of
leftover functions that read data and compute checksums that are never
used, but that break the initialization sequence if removed because
there are also some missing delays in their place.
Redo the initialization code from scratch, this is mainly inspired from
the Linux driver and taking some part from the (somewhat confusing and
incomplete) datasheet.
This drops the dead code and adds the necessary sleeps to guarantee
correct operation.
The device configuration is also now changing the local copy of the data
block, and soft reset is also issued only if the device configuration
has changed, which should only happens if the battery is replaced or
went completely flat. This should also result in a consistent battery
measurement operation across resets.
Link: https://elixir.bootlin.com/linux/latest/source/drivers/power/supply/bq27xxx_battery.c
Link: https://www.ti.com/lit/ug/sluucd5/sluucd5.pdf
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Use sys_put_le16 in bq274xx_ctrl_reg_write to convert the two bytes
value. This is coherent with the rest of the file.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add ability to retrieve the shunt voltage if the end user wants to do
the power calculation manually to handle negative power values.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The current-shunt calibration requires a factor of 4x if high-precision
mode is selected.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Fix current sign extension logic and consolidate sensor scaling code
into a single block.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Fix few instances of delayable work handlers using the k_work pointer
directly in a CONTAINER_OF pointing to a k_work_delayable.
This is harmless since the k_work is the first element in
k_work_delayable, but using k_work_delayable_from_work is the right way
of handling it.
Change a couple of explicit CONTAINER_OF doing the same work as the
macro in the process.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The full scale prop was incorrectly using the enum idx which was then
to be used with a look up table which used the actual range number.
This changes it to use the int directly from the dts.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Added configuration of termination current and trickle voltage
Added option to bypass low voltage charge inhibit
Added option to disable automatic recharge
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Some log messages could be too noisy, especially if the sensor shell was
used which would call all attr and samples even though just a few are
supported.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
It mirrors the functionality of the vl53l0x driver.
Also removes an assert not needed, as the channel is checked.
Signed-off-by: Daniel Stuart <daniel.stuart14@gmail.com>
channel_get was doing using floating point constants with it's calculation.
The result is changed to be a float as this was generating a double
promotion warning.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.3
Requires https://github.com/zephyrproject-rtos/hal_st/pull/16
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The default decoder would take the micro-unit value of the old sensor
value and multiply it by INT32_MAX. This would, at times, cause an
overflow for the int64_t which is the cause of some bugs like when
-7952 was used (-7952000000 * INT32_MAX < INT64_MIN). Instead the new
math converts:
- `value_u * INT32_MAX / ((1 << header->shift) * 1000000)`
to a bitmap:
- `sample.val1` consumes the upper `N` bits
- `sample.val2 * BIT(32 - N) / 1000000` consumes the lower `32-N`
bits
This both improves the accuracy, and avoids the overflow since
`shift` is guaranteed to be between 0 and 31.
Signed-off-by: Yuval Peress <peress@google.com>
Implement the backend emul API for the ICM42688 motion sensor so it can
be automatically tested by the generic sensor test (see #60394).
Supports all channels (temp, accel XYZ, and gyro XYZ) at each of the
programmable full-scale accel and gyro ranges.
Also fixes an arithmetic bug in the driver that was causing a minor
error in the returned readings.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Add support for fetching individual channels rather than forcing the
application to always fetch them all. Potentially saves few i2c
transactions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Convert a few floating point operation to fixed point. May save some
stack and some flash as well on soft-fp systems.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The register space for the device is on 8 bit, use uint8_t for register
address to the low level read and write functions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
sensor_value_from_double was used, but sensor_value_from_float
should be used as the parameter is a float
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The LIS3MDL driver misunderstands the MD[1:0] bits in CTRL_REG3.
Correct this so that all ODR settings are functional.
Currently, single-conversion mode is enabled when fast ODR is set,
resulting in only one measurement being taken before the device
immediately returns to power-down mode. The result is that all fast-ODR
rates (155 and higher) are not usable when assigned to CONFIG_LIS3MDL_ODR.
Continuous mode is the only mode truly supported by this driver and should
always be used.
Signed-off-by: Aedan Cullen <aedan@aedancullen.com>
Since the sensor shell command was converted to use qt31_t, all the
integer values started to show up as rounded up by a fractional unit
when displayed, due to the conversion always rounding down.
Fix that by using the recently introduced DIV_ROUND_CLOSEST and handling
rounding up to next integer explicitly.
Before:
channel idx=44 gauge_state_of_charge value=83.999999
after:
channel idx=44 gauge_state_of_charge value=84.000000
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Format the file `drivers/sensor/max17262/max17262.c` but exclude the
regsiter lookup table in `max17262_sample_fetch()`
Signed-off-by: Tristan Honscheid <honscheid@google.com>
The init function of the MAX17262 sensor doesn't check the return value
of its I2C read and write functions. In case a read operation fails, the
output variable is not updated but the driver proceeds anyways. This can
cause unintended operation due to the potentially un-initialized memory,
such as getting stuck in the polling loop on line max17262.c:245. Update
the init function to abort and pass along the error code when I2C
transactions fail.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Fixes sensor drivers to consistently return -ENOTSUP when an unsupported
channel argument is passed to the sensor_channel_get function.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
The driver would return the temperature for all channels requested
except relative humidity. Instead, ENOTSUP should be returned for
unsupported channels.
Signed-off-by: Josep Puigdemont <josep.puigdemont@gmail.com>
This PR introduces a backend API to be implemented by sensor emulators
that creates a standardized mechanism for setting expected sensor
readings in tests. This unlocks the ability to create a generic sensor
test that can automatically set expected values in supported sensor
emulators and verify them through the existing sensor API. An
implementation of this API is provided for the AKM09918C magnetometer.
A generic sensor test is also created to exercise this implementation.
Observe that this test knows nothing about the AKM09918C; info about
supported channels and sample ranges is discovered through the backend
API. The test iterates over all devices attached to the virtual I2C and
SPI buses in the test binary's device tree, which (theoretically) covers
all sensors. Sensors whose emulator does not exist yet or does not
support the backend API are skipped.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
The sensor driver uses the value 500 to convert bit counts to microgauss
values, but it should actually be 1500. Edit the driver unit test to use
the macro instead of a magic number.
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Return ENOTSUP when getting the humidity channel if the driver is used
with a BMP280, since this device does not provide humidity readings.
Signed-off-by: Josep Puigdemont <josep.puigdemont@gmail.com>
Add a mutex to protect shared data-structures, since shell can have
multiple backends.
Signed-off-by: Marco Argiolas <marco.argiolas@ftpsolutions.com.au>
Added a driver for the DFRobot A01NYUB distance sensor. This sensor
sends its readings via UART at 9600 baud. This driver uses interrupts
to read the data from the sensor.
Signed-off-by: Oliver King <oliver.king@steadconnect.com>
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:
- changing the CONFIG_SOC_ESP32* to refer to
the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
provide a SOC model config
- introducing the 'common' folder to hide all
commonly used configs and files.
- updating west.yml to reflect previous changes in hal
Signed-off-by: Marek Matej <marek.matej@espressif.com>
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
and enabled proper nrfx driver instance; instead, use one option per
peripheral type and include the corresponding shim driver flavor into
compilation basing on that option (not the one that enables the nrfx
driver as it was incorrectly done so far in some cases)
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>