Instead of guarding the NODE_RX_TYPE_USER cases with
CONFIG_BT_CTLR_USER_EXT we guard them with
CONFIG_BT_CTLR_USER_EVT_RANGE > 0 as that is the actual value that
enables/disables the NODE_RX_TYPE_USER values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of having explicit values for each entry in the enum that
has to be updated for each new entry (thus requiring manual work
which can also be error-prone), the enum will now be
self-incrementing, to make it easier and safer to add new
entries.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Removed the #ifdef's for the node_rx_type enum. Since the
savings, they just make the enum harder to read.
Furthermore it will also ensure that all the enum values
will have the same value once the enum entries are no
longer manually defined.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
lll->conn is only defined valid when BT_CENTRAL is enabled.
Also ull_sched_mfy_after_mstr_offset_get is only used when BT_CENTRAL
is enabled.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Adds check for TTL max in the transport send functions, and moves
setting of default TTL to transport.
Fixes#29855.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Added note about change in the option for advertising directed
towards a privacy enabled peer.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Change the advertising option that controls if the directed advertiser
will use an RPA or the identity address of the peer for the initiator
address.
This option currently has two issues:
- It behaves differently if the privacy feature has been enabled,
which can be confusing for application to use.
- It cannot start a directed advertiser towards a peer that is not
privacy-enabled and has distributed an IRK.
This commit includes the following changes:
- When privacy has been enabled in order to advertise towards a
privacy-enabled peer the BT_LE_ADV_OPT_DIR_ADDR_RPA option must now
be set (same as when privacy has been disabled).
- It is now possible to start a directed advertiser using the identity
address of the peer when privacy-enabled.
- When privacy has been enabled the advertising option combination
of using the local identity address and an RPA as the initiator
address is now disallowed and will return an error code.
This is done because this combination did not actually work and would
have used the identity address of the peer instead.
- If the controller does not support controller-based privacy then
using the option BT_LE_ADV_OPT_DIR_ADDR_RPA will return ENOTSUP
because this behavior cannot be done with host-based privacy.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Host can discard scan response data by setting empty data. We simply
set PDU length to 0 to indicate this, it will make future check easier.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Align the PDU buffer reference in struct node_rx_pdu so that
node rx type specific parameters, like, terminate and sync
lost reason can be accessed without any memory alignment
issues.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The number of capture/compare registers available on a peripheral
should be exposed in devicetree.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
align kconfig option CONFIG_ARC_CUSTOM_INIT to
CONFIG_INIT_ARCH_HW_AT_BOOT. Remove unused CONFIG_ARC_CUSTOM_INIT in
kconfig.
Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
Add definition power management states, these states were inspired by
ACPI specification. This commit is part of the following pr
https://github.com/zephyrproject-rtos/zephyr/pull/27315 from Wentong.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Added test which can be used to verify performance of ring
buffer algorithm.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Removing line exceeding warnings which appeared after u32_t -> uint32_t
converstion.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Previously, ring buffer had capacity of provided buffer size - 1. This
trick was used to distinguish between empty and full states. It had one
drawback: ring buffer could not be used as a pool of equal sized buffers
(using ring_buf_put_claim and ring_buf_get_claim).
Reworked internals to use non wrapping head and tail. Since they are
non wrapping, there is no issue with distinguishing between empty and
full. Since this appraoch would be vulnerable to wrapping on 32 bit
boundary, added a mechanism which periodically reduces all indexes to
avoid 32 bit wrapping.
After this rework, buffer has one byte more capacity. Simple test shows
slight performance improvement.
Updated tests to reflect increased capacity and added test to check if
it is possible to continuesly allocated 2 buffers of half ring buffer
size.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Make this driver multi-instance and use the new API.
Notes for sensorhub mode:
In case of multiples devices it is possible that some of them
has i2c slaves attached to it (sensorhub mode) but not the
others. Since the driver is configured in the same way for
all the instances (CONFIG_SENSORHUB=y), the routine that initialize
the sensorhub part does not fail anymore in case no slaves
are found for a particular instance. Instead, those non-sensorhub
driver instances will set the shub_inited flag to false and
will totally ignore the feature.
Notes for triggers:
In case of multiples devices the device pin the interrupt wire is
attached to can be different (INT1 or INT2 pin). So, this
information has been moved in DTS and then stored in the
specific instance config structure.
Currently the driver is able to handle a sngle interrupt line
at a time attached to either INT1 or INT2.
MOreover, the interrupt initialization for a driver instance proceed
only if the drdy has been configured in its DT, else it returns ok.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
This is documented similarly to how other command
handlers are documented. This documents that shell
management is supported, but relies on the example
project for implementation details.
Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
This configuration is be required to enable the shell management
command handler supported by the core mcumgr library
Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
Fix maximum Advertising Channel PDU payload size calculation
by including the Common Extended Advertising Payload Format
overload alongwith the AD data maximum size supported.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enable the test procedure that requires greater than 31 byte
PDU when AD data and Sync Info structure be present in the
Advertising channel PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added implementation using mfifo to return stale AD data PDU
from LLL to Thread context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add Kconfig option to configure maximum number of buffered
AD data PDUs across enabled advertising sets.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
XCC does not support the compiler flag -Wno-unused-but-set-variable
so check for flag support before setting it in cmake.
Fixes#29707
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add support for the BuyDisplay 3.5" TFT + touch shield based on ILI9488
controller and FT6236 touch.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Make driver generic for multiple ILI displays. The adopted strategy is
to share all driver code except register initialization, which has been
found to have some specific registers/values depending on the
controller.
The driver has been adjusted to support multiple compatibles.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
UART IP is clocked with 50MHz on HAPS by default. So switch
UART clock-frequency from 100MHz to 50MHz for nsim_* boards
so the binaries can be run on HAPS as well.
This property is dummy in case run in simulator (nSIM) so we
don't need to change anything in nSIM configuration files.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Improve the way the nrf_qspi_nor driver configures the SCK frequency,
to properly support QSPI also on nRF53 Series SoCs that use a different
base clock frequency (96 MHz).
Add also a relevant configuration in the spi_flash sample so that it
can run on the nRF5340 DK.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The nRF5340 (P)DK is equipped with the MX25R64 flash memory. Add a dts
node for that chip in the board definition as well as the missing QSPI
node in the nRF5340 SoC definition.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>