Add API for creating and starting advertising sets. This allows to start
and advertising set for a specific timeout or number of events.
The advertising set can be configured to advertise extended data on
secondary advertising channels or advertise on LE Coded PHY to give the
advertiser longer range.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate bt_create_conn_le and rename it to in order to add return
code, new arguments and to follow the established naming convention.
Add API for the application to control the scan parameters of the
initiator role. This allows the application more scheduling control
of the initiator in multi-role scenarios. Also provides options to
configure the initiator for LE Coded PHY for long range support.
We deprecate the old way of creating connection to make the name more
consistent with the rest of the API.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add GAP definitions for advertising PDU types and properties LE PHY
types and values that signifies either invalid or disabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Convert DT_INST_0_SIFIVE_GPIO0_IRQ_##n to use the new DT macros:
DT_INST_IRQ_BY_IDX(0, n, irq). Also tweak a use of
DT_INST_IRQ_HAS_CELL(0, irq) to DT_INST_IRQ_HAS_IDX(0, 0) to match
style.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Trivial cleanup: sort the devicetree/foo.h includes and the relevant
sections for them in the documentation.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
We have a number of cases that now look like:
#if DT_HAS_COMPAT(ti_lmp90077)
LMP90XXX_DEVICE(90077, 0, 16, 4);
#endif /* DT_INST_0_TI_LMP90077 */
The DT_INST_0_TI_LMP90077 comment is stale, and doesn't add much since
the #if associated with the #endif is just 2 lines up. Removing the old
comments seems the best cleanup.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add checks to prevent SPI transactions from being run in ISR
context. This affects both the LMP90xxx ADC and GPIO drivers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Move calibration setup SPI transaction to acquisition thread to allow
adc_read_async() to be called from ISR context.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Introduce a dedicated function for performing an entire LMP90xxx ADC
channel read and sample all channels in one go in the ADC acquisition
thread.
This removes the SPI transactions from adc_context_start_sampling()
which can be called in k_timer ISR context for consecutive ADC reads.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This adds utility functions to irq.h in accordance with zephyr's
multi-level irq numbering schema. Functions that are added will
get the zephyr IRQs level and provide function to return the
interrupt number at a particular level.
Fixes issue #20338
Signed-off-by: Jaron Kelleher <jkelleher@fb.com>
Identify when received PUBLISH message is malformed and overall packet
length received is smaller than parsed variable header lenght.
Add unit test to cover this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify more strictly that data read from the transport fits into RX
buffer. Switch to unsigned integers, where possible, to prevent
unnecessary signed/unsigned operations.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The standard allows up to 4 bytes of packet length data, while current
implementation parsed up to 5 bytes.
Add additional unit test, which verifies that error is reported in case
of invalid packet length.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
We can build the openamp library configured with VirtIO master
support, VirtIO slave support, or both. By default both master
and slave code is enabled. We can reduce code footprint by only
build master or slave as needed.
Expose Kconfig options for Master & Slave and set them accordingly in
the sample.
Here's the code reduction we see:
For the total image we see as 1260 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 30308 B 256 KB 11.56%
FLASH [Master only] : 29048 B 256 KB 11.08%
On the remote side we see a 828 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 11564 B 64 KB 17.65%
FLASH [Slave only] : 10736 B 64 KB 16.38%
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added properties to support the core interrupt controller on the NIOS2
cpu cores and enable that support for the NS16550 UART.
We rename some compatibles so that the cpu core compatibles is unique.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove DT_ defines in board_soc.h now that we have a device tree. We
remove all devices from the device tree that aren't known to be part
of the NRF52 BSIM simulation.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The following commit:
commit 407b49b35c (refs/bisect/bad)
Author: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Date: Wed Feb 12 15:00:46 2020 +0100
cmake: use find_package to locate Zephyr
breaks as we don't find the ZephyrUnittest package. For now revert to
the old means until a proper fix can be made.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit disables the nested interrupt test for the RISC-V platform,
as interrupt nesting is not supported on the current RISV-C
architecture port.
Furthermore, the current `trigger_irq` implementation for RISC-V is
mostly incorrect and cannot be used, so there is no point in leaving
that in the codebase (see #23593).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The current nested interrupt test implementation is both buggy and
fundamentally flawed because it does not trigger a higher priority
interrupt from a lower priority interrupt context and relies on the
system timer interrupt, which is not fully governed by the test;
moreover, the current implementation does not properly validate the
test results and can report success if no interrupt is triggered and
serviced at all.
This commit reworks this test to have the following well-defined
and logical procedure:
1. [thread] Trigger IRQ 0 (lower priority)
2. [isr0] Set ISR 0 result token and trigger IRQ 1 (higher priority)
3. [isr1] Set ISR 1 result token and return
4. [isr0] Validate ISR 1 result token and return
5. [thread] Validate ISR 0 result token
The reworked test scenario ensures that the interrupt nesting works
properly and any abnormal conditions are detected (e.g. interrupts not
triggering at all, or ISR 1 not being nested under ISR 0).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit re-organises the kernel interrupt tests for consistency.
In addition, it removes any references to the `irq_offload` feature,
which is no longer used by this test.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Since idc_read/idc_write are used outside of the driver we can't use the
DT_INST_... form (that utilize DT_DRV_COMPAT) of the macro's in
ipm_cavs_idc_priv.h. Use DT_INST(0, intel_cavs_idc) explicitly in the
header to fix the build issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Indicate that the NXP Kinetis KE1xF SoC contains a Low Power Timer
(LPTMR) and default to enabling the corresponding driver if
CONFIG_COUNTER is enabled.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add counter driver for the NXP Kinetis Low Power Timer (LPTMR). The
driver can be configured either as 16 bit counter or 16 bit pulse
counter.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add device tree binding for the NXP Kinetis Low Power Timer (LPTMR)
module. This module can either act as a 16 bit counter or a 16 bit
pulse counter.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>