IPM drivers are commonly used to send notifications/cause interrupts
without any transfer of data. To add this use case in the ESP32 IPM
driver, the guard statement is appended so that the pointer to the
data buffer is allowed to be zero only if the size of the data to be
transferred is zero. If size is given as 0 and data is equal to NULL,
we are thus only using the IPM as a doorbell, not to transfer data.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
Using the `bap preset` command it is now possible to set all the
codec configuration data and metadata value at runtime. This will
allow to set specific values for each stream in each direction.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of the default presets being pointers, they are changed to
allocated structs so that they can be modified.
This will allow us to modify the config and metadata in a later patch.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename uart and uart_async bsim test to reflect
testing of hci_uart sample using UART driver
variants under bsim simulations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The tests `hci_prop_evt` and `host_long_adv_recv` used `bt_recv_prio`,
and so relied on an extra config option `CONFIG_BT_RECV_BLOCKING`. This
patch replaces the use of `bt_recv_prio` with `bt_recv` and restores the
use of the default option for `BT_RECV_CONTEXT`.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This commit removes extra rescheduling in the extended advertiser after
the last advertising has been finished. This commit also removes the
`ADV_FLAG_SCHEDULED` flag as not needed anymore.
This extra rescheduling and the flag were needed to delay the next
advertisement by 20ms. Now, when the delay is removed the advertiser can
pick the next advertisement from the pool and push to the host right
away.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This patch allows selecting the combination of `CONFIG_BT_RECV_WORKQ_BT`
and `BT_LL_SW_SPLIT`. The implementation of `bt_recv_prio` is copied
from `hci_raw.c`. This ensures the order of packets is the same as when
the controller's `hci_driver.c` is off-chip and sends HCI over UART.
Without this patch, the Zephyr LL driver will duplicate some events on
behalf of `hci_core`. This duplication is not wanted when
`CONFIG_BT_RECV_WORKQ_BT=y`.
The above mentioned duplication is not sound and is evidenced in logged
warnings, e.g. in `tests/bsim/bluetooth/host/l2cap/stress` with
`CONFIG_BT_RECV_WORKQ_BT=y` logging "no transition".
This patch is a step towards the deprecation of
`CONFIG_BT_RECV_BLOCKING`. `CONFIG_BT_RECV_BLOCKING` is complicated and
tightly coupled to `hci_core`. In the future, removing
`CONFIG_BT_RECV_BLOCKING` will give a cleaner separation between
`hci_core` and the drivers and allow `hci_core` to evolve without
changes spilling out into the drivers.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The goal is to not access `buf` in the non-prio `hci_disconn_complete`
so that the buffer does not need to be retained.
This commit moves the copy of `conn->err` to the prio handler.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Fix CONFIG_BT_CTLR_TIFS_HW conditional compile by replacing
DPPI_PRESENT with CONFIG_BT_CTLR_TIFS_HW.
HAL_SW_SWITCH_TIMER_CLEAR_PPI can be same as
HAL_RADIO_END_TIME_CAPTURE_PPI, and this is ok as same
bit will be used to disable PPI/DPPI.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit introduces a driver for ADC keys, a common circuit design where
keys are connected to an ADC input via a resistor ladder.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Always execute tx_notify from a single context. For sanity and ease of
debugging / observability.
The previous behavior was calling from BT_RX thread + system workqueue.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Changes include:
- Improving handling of frames for unconfigured DLCIs.
- Adding logs and outputting error codes in failure cases.
- Adding warnings to not reuse buffers.
- Fixing comments.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
In the function bt_l2cap_chan_set_state, BR
channel is treated as LE Chan.
The BR L2CAP channel state is updated
incorrectly.
Add a function bt_l2cap_br_chan_set_state
for BR L2CAP channel. For BR/EDR channel,
call bt_l2cap_br_chan_set_state directly.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Adds use of CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION and
CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV to the charger
sample application.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Adds the path to the sample application in the charger API
area of the MAINTAINERS file.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Moves the charger API sample app from samples/charger/ to
samples/drivers/chargers/ as mentioned in issue #65032.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Adds a CHARGER_PROP_SYSTEM_VOLTAGE_NOTIFICATION_UV property to
issue a notification to the system when the system voltage falls.
This system voltage is provided by the charger to the system and can
suddenly dip during peak loads.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Adds CHARGER_PROP_DISCHARGE_CURRENT_NOTIFICATION property
to notify the system of a excess battery discharge event.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Corrects expected type mentioned in the documentation of the
CHARGER_PROP_INPUT_CURRENT_NOTIFICATION.
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Verifies that there is no host RX buffer leak due to disconnections.
That is, not actual host buffer objects but rather the number of buffers
that the controller thinks the host has.
If there is a desynchronization between those two, the result would be that
the controller stops forwarding ACL data to the host, leading to an
eventual application timeout.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Optionally record run-id and run-attempt github context variables
as additional test suite environment properties on upload into
ElasticSearch to track re-runs of CI workflows.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
In the scan delegator when adding a source, the state was not
marked as active before calling the PA sync callback, which
would prevent applications from requesting PAST in that callback.
This commit also adds and fixes a few log statements.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement bind() and recvfrom() for UDP sockets. This is achived by
setting remote field in net_pkt which in return makes recvfrom() fill
in *src_addr. This is only implemented for passiv mode and CIPDINFO needs
to be enabled. Also set net_if to non-dormant when enabling AP mode to
make binding to a port and address possible.
Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
The sys_mm_drv_unmap_page function first replaced the tlb entry with
the default one and then read the physical address that was mapped.
However, it was already overwritten, so it always release the default
physical address instead of the truly mapped one.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added sys_mm_drv_update_page_flags function that allows to change access
flags to a already mapped memory region.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add traffic class priority custom option to customize traffic class
priority base for throughput performace.
Wi-Fi traffic performance depends on cooperation between net threads
and Wi-Fi driver threads. So we want traffic class threads priority
to be more flexible to fit more vendors.
Eg: when traffic class tx thread priority is higher than driver tx
thread, it will consume much more cpu time and send packets until driver
queue full.
When traffic class tx thread priority is lower than driver tx thread,
it will become serial transmition, also affecting throughput.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This change reduces the memory footprint by changing the data type of
`valid_5g_chans_20mhz` from `uint16_t` to `uint8_t`.
Additionally, since the maximum channel number for 5GHz Wi-Fi is 177,
it can fit within the `uint8_t` range.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Compare value and DAC resolution in `dac_write_value` and return -EINVAL
if the value is above supported resolution.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Check for BASS and PACS, while scanning for
Broadcast Audio Sinks was wrong in the
Broadcast Audio Assistant sample.
Signed-off-by: Lars Knudsen <LAKD@demant.com>
Add a command `net ipv4 gateway` that allows
setting IPv4 gateway for an interface from net shell.
Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
Add CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH for limiting
the Maximum Fragment Length (MFL) for DTLS with Mbed TLS.
This is needed when MBEDTLS_SSL_OUT_CONTENT_LEN and
MBEDTLS_SSL_IN_CONTENT_LEN are set to larger values than the MTU
of the network and IP fragmentation is not supported.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
In current implementation, the upper is not notified when BR ACL
connection is established.
L2CAP does not know that ACL connection has been established.
All fixed channels will not be notified. Then The SDP server
cannot work properly.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This patch handles multiple interrupt lines for errors. Each of the
4 DW SPI error interrupts (txo_err, rxo_err, rxu_err, mst_err) can
use a different line of the GIC, instead of using a single line of
the GIC for all error interrupts (err_int).
Signed-off-by: Julien Panis <jpanis@baylibre.com>