Add support for a eeprom simulator. The PR limits the addition to
qemu_x86 but it can easily be added to other devices by defining the
eeprom simulator in the dts and setting 'CONFIG_EEPROM_SIMULATOR=y'
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If bt_gatt_subscirbe fails value_handle must be reset since otherwise it
will not possible to subscribe again as the parameters will be consider
in use.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This further reduce the overhead on each subscription at expense of
having a dedicated array to store subscriptions, the code now maintain
a separate list for each peer which should also scale better with large
number of subscriptions to different peers.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This should reduce the footprint on applications that do a lot of
requests i.e have a lot of subscriptions.
Fixes#21103
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In STM32 flash driver, don't use semaphore if multithreading
isn't defined.
If multithreading isn't defined, a call to sem_give function
generates a hardware fault exception.
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
The _thread_idx_map bitfield which has '1' set for free
thread indexes really needs to live in the
data section reserved for kernel object metadata, as this
is a part of memory that is allowed to shift addresses
between zephyr_prebuilt.elf and zephyr.elf.
However, if an application defines enough static threads
that there are no free indexes, the entire bitfield will
be zeroed and the bitfield will end up in the main BSS
section.
Force this data to always be in the .kobject_data.data
section regardless of its contents.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add sample for reading the temperature of a 3-wire PT100 sensor using
the Texas Instruments LMP90100 Sensor Analog Frontend (AFE) Evaluation
Board (EVB) shield.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add shield definition for the Texas Instruments LMP90100 Sensor Analog
Frontend (AFE) Evaluation Board (EVB).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add driver for the Texas Instruments LMP90xxx series of multi-channel,
low-power 16-/24-bit sensor analog frontends (AFEs).
The functionality is split into two drivers; an ADC driver and a GPIO
driver.
Tested with LMP90080 and LMP90100.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Improve positioning of tracing calls. Avoid multiple calls and missing
events because of complex logix. Trace the event where things happen
really.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If the working directory for a command was missing (usually due to
forgetting to run 'west update'), you'd get a FileNotFoundError
exception along with a cryptic error like
'git' not found
Only catch OSError instead (which is a base class of FileNotFoundError),
and always show the exception message. It makes it clear that it's the
working directory that's missing.
Add some other misc. improvements too:
- Turn stderr output from external commands into a warning instead of
an error
- Add err() and warn() helpers
- Include the command name in messages
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fix controllers address check in cases of controller-based privacy.
When controller has been instructed by the host to use privacy
the controller should look up the peer identity address and generate
an address based on the local IRK. In the case where no match
is found or the local IRK is all zeroes the controller shall use
the fallback address. If the fallback address is not valid the
controller shall return invalid params.
This commit fixes these issues:
- Starting a private advertiser without valid random address set
but a valid local IRK exists. In this case the advertiser should
be able to advertise using the RPA regardless of a valid random
or public address.
- Starting a private advertiser with a fallback to the public
address type or an adveriser using public address does not
check if a valid public address exists. The host cannot
advertise with an all-zero public address.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Turn the CONFIG_* identifiers in the /chosen table into links to the
Kconfig reference.
Also explain why devicetree information doesn't show up in the Kconfig
reference.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
It's cryptic that some identifiers for devicetree-related stuff start
with DT_*, while others start with CONFIG_*. Explain what's going on,
and link to the Kconfig preprocessor documentation.
Also remove an early mention of bindings that might be confusing.
Bindings are much more about checking devicetree conformance than about
controlling output, though they do some of that too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Not all /chosen properties were documented. Add the missing ones along
with the macros generated for them.
Found with some grepping for '\<zephyr,.*='.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The *_ON_DEV_NAME macros generated from /chosen properties changed
prefix from DT_* to CONFIG_* in commit 8ce0cf0126 ("kconfig: Convert
device tree chosen properties to new kconfigfunctions"), but the
devicetree documentation still lists the old names. Update the
documentation with the correct anmes.
Also remove an outdated reference to
DT_SRAM_SIZE/DT_SRAM_BASE_REFERENCE, and give a complete list of
generated macros.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Before establishing the ppp connection, windows sends the string CLIENT
and expects the reply CLIENTSERVER from the modem.
This functionality is implemented in the new function
ppp_handle_client().
This feature must be enabled via Kconfig.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
Correct handling of device encoded temperature values, which combine a
12-bit 2s complement signed value with a separate sign bit. Rework
conversion between device and sensor temperature representations to
support negative temperatures in both domains.
Use a much simpler trigger configuration where the alert is driven by
comparator output, rather than as an interrupt that requires a pair of
I2C transactions to read and clear the flag.
Refactor the trigger infrastructure to use the setup/handle/process
idiom, which reduces duplicated code and to correctly detect alerts
present when the triggers are set.
Completely replace the sample with something that demonstrates
updating upper and lower threshold values to track moving
temperatures.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add a simple documentation section for the Zero-Latency
IRQs feature supported by the kernel.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The atomic_cas function was using incorrect register when determining
whether value was swapped. The swapping instruction s32c1i in
atomic_cas stores the value at memory location in register a4
regardless of whether swapping is done. In this case, the register a4
should be used to determine whether a swap is done. However, register
a3 (containing the oldValue as function argument) is used instead.
Since register a5 contains the old value at address loaded before
the swapping instruction, a3 and a5 contain the same value.
Since a3 == a5 is always true in this case, the function will always
return 1 even though values are not swapped. So fix it by using
the correct register.
Also, in case the value is not swapped, it jumps to where it returns
zero instead of loading from memory and comparing again.
The function was simply looping until swapping was done, which did not
align with the API where it would return 0 when swapping is not done
(regardless whether the memory location contains the old value or not).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add some scripts to automatically run a set of BT conformance tests.
Each script has an associated file which selects which subset of tests
are run by that script.
The LL scripts are divided in 2 subsets so as to allow parallelizing
a bit the run (the LL tests take the longest).
Except these, all other sets are just divided by category.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added application for testing the bluetooth stack
from the EDTTool
Signed-off-by: Henrik Eriksen <heri@oticon.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
We add a test-suite for the newly introduced feature of
ARM Dynamic Direct Interrupts.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Move the zero-latency IRQ test into the new
arm_irq_advanced_features' test suite. Skip
running the test for non Mainline Cortex-M.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Document that the Dynamic Direct interrupts feature is
implemented and supported as an ARM-only API.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commits implements the support for dynamic direct
interrupts for the ARM Cortex-M architecture, and exposes
the support to the user as an ARM-only API.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
With this commit we add support for Dynamic Direct interrupts
for the ARM Cortex-M architecture. For that we introduce a new,
user-enabled, Kconfig symbol, DYNAMIC_DIRECT_INTERRUPTS.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Added autocompletion to 'sensor get' command. After this change
device and channels are autocompleted. It is possible to provide
multiple channels for reading.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When asserts were disabled then sensor accepted any channel in
hts221_channel_get(). Changed to return -ENOTSUP when invalid
channel is provided.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add documentation for the whitelist initiator behaviour, describing the
one-shot behaviour.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
MPU6050 no longer using Kconfig to specify I2C addresses. Reference
to the removed symbol causes QA diagnostics. Remove the reference;
when AK8975 is converted to devicetree it may be possible to restore
the link between the sensors.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a sample for the MPU6050 that demonstrates on-demand and triggered
display of all sensor data.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a binding for the sensor and replace all Kconfig selection of
hardware parameters with devicetree property values.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When a trigger was enabled the original implementation would do
nothing more than print "Waiting for a threshold event", without
describing what such an event would look like.
Rework to maintain a window of +/- 0.5 Cel around the most recent
in-window temperature, and reset that window whenever a trigger occurs
or a non-trigger reading is outside the window. Time-out and display
the temperature if no event occurs in a reasonable time.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The device address can only be 0x48 through 0x1B. C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.
Move this to a boards subdirectory so we can add other overlays
without cluttering the root.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The system power management handling code in the '_isr_wrapper' enables
interrupts by executing the 'cpsie i' instruction, which causes a
system crash on the Cortex-R devices because the Cortex-R arch port
does not support nested interrupts at this time.
This commit restricts the interrupt state manipulations in the system
power management code to the Cortex-M arch, in order to prevent
interrupt nesting on other AArch32 family archs (only Cortex-R for
now).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Add binding support for a 'path' property type, for properties that are
assigned node paths. Usually, paths are assigned with path references
like 'foo = &label' (common in /chosen), but plain strings are accepted
as well as long as they're valid paths.
The 'path' type is mostly for completeness at this point, but might be
useful for https://github.com/zephyrproject-rtos/zephyr/issues/21623.
The support is there already in dtlib.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>