Use namespaced network symbols in order to avoid circular dependency
between Posix and network subsystems.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Rename network symbols i.e., add net_, NET_ or ZSOCK_ prefixes
to those network symbols that can be found in Posix or libc.
This way we can avoid circular dependency issues.
Add also a compatibility header file that allows user to continue
use various network APIs without adding either net_, NET_ or ZSOCK_
prefixes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
A change was introduced in how stm32 timers clocks are defined
to have multiple clock definitions.
This change was not handled in the stm32u3 series driver
(which had no timers defined in the dts at all).
This fix ports the required code to the stm32u3 mcu.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
In current implementation, the AG with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` should
not be sent.
And if the AG is no newer than version 1.5, the `Codec Negotiation`
should be unsupported.
Compatible old version with the following changes,
Discover the AG SDP record to get the profile version and AG
features. If the SDP discovery is failed, break the RFCOMM DLC
connection.
If the AG version is v0.96, do not send AT command `AT+BRSF`.
Create SCO connection directly if the codec negotiation feature is
unsupported on both side in the function `bt_hfp_hf_audio_connect()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add Kconfig `BT_AVRCP_TG_COVER_ART` to enable the target cover art
feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE_PROPERTIES` to enable
the controller cover art get image properties feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE` to enable the
controller cover art get image feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_LINKED_THUMBNAIL` to enable
the controller cover art get linked thumbnail feature.
Add functions `bt_avrcp_cover_art_ct_cb_register()` and
`bt_avrcp_cover_art_tg_cb_register()` to register the callback.
Add function `bt_avrcp_cover_art_ct_l2cap_connect()` to create the
L2CAP connection for OBEX transport.
Add functions `bt_avrcp_cover_art_ct_l2cap_disconnect()` and
`bt_avrcp_cover_art_tg_l2cap_disconnect()` to disconnect the L2CAP
connection.
Add functions to send OBEX request/response, including connect,
disconnect, abort, get_image_properties, get_image, and
get_linked_thumbnail.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Introduce `CONFIG_PMP_KERNEL_MODE_DYNAMIC` to enable dynamic
configuration and activation of Machine mode PMP entries. This allows
PMP settings to be managed efficiently during transitions between
kernel and thread contexts.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Add option to enable NMI delivery on boot for SMRNMI hardware.
Changes:
- Add CONFIG_RISCV_SMRNMI_ENABLE_NMI_DELIVERY Kconfig option
- Define SMRNMI CSRs in arch/riscv/include/csr.h
- Set NMIE bit during boot to enable NMI delivery
SMRNMI hardware generates but doesn't deliver NMIs when NMIE=0 (default).
This causes twister test failures and prevents handling of critical
hardware events like watchdog NMIs and ECC errors.
Setting NMIE=1 enables NMI delivery, but note that this implementation
only sets the enable bit - it does not provide full SMRNMI support
(no mnret instruction handling, no RNMI handlers). Users must implement
proper RNMI handlers in SoC-specific code to avoid undefined behavior.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
DTR signal on UART extends the power saving by allowing host
to indicate the remote end that the UART is not in active state.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This header was deprecated in d881e794ba
for the 4.2 release
in favour of posix_arch_console.h
Let's remove it now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In current implementation, the default indicator value cannot be set
when building the SLC. And it causes the incorrect indicator value is
notified by AG.
Add a callback `get_indicator_value` to get the default indicator
value from the application.
Add shell command `indicator_value` to set the default indicator
value. The set indicator value will be passed to HFP AG when callback
`get_indicator_value` is notified.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Header for Xen event channel API (events.h) previously contain
incorrect Doxygen-style annotations. Also, some functions had not
it at all.
Add proper description for all functions and fix style to make
documentation consistent.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Previously clear_event_channel() function, that is a part of Xen event
channel API was missing in events.h header.
Add function declaration and documentation description for to let users
add it to external drivers.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Xen event channel notification may fail during hypervisor handling,
so it will be good for user to have a possibility to check results.
Previous implementation ignored hypervisor return code, now it will be
passed to caller.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
The functions of timestamp callback were implemented under
CONFIG_NET_PKT_TIMESTAMP_THREAD, but were clarified under
CONFIG_NET_PKT_TIMESTAMP.
The clarification in header file may misunderstand users,
because enabling CONFIG_NET_PKT_TIMESTAMP is not enough
to use these functions.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add helper macros to get clock information from the devicetree:
STM32_DT_INST_CLOCK_INFO_BY_INDEX(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME().
Using these macros or the existing STM32_CLOCK_INFO(), STM32_DT_CLOCKS()
and STM32_DT_INST_CLOCKS() macros ensure clock consumer gets all the
required STM32 clock information that are abstracted by the
STM32 clock drivers resources.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add a bit of documentation for the existing STM32_CLOCK_INFO()
STM32_DT_CLOCKS().
While at it, fix indentation of STM32_CLOCK_INFO() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This patch is to fix the following building issue:
include/zephyr/rtio/rtio.h:1773:51: error: 'rtio' undeclared
(first use in this function)
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
The dsp/utils.h header itself only uses dsp/types.h and doesn't need the
entire dsp/dsp.h.
This also facilitates using the dsp/utils.h in builds that don't enable a
dsp backend at all which can be convenient for sensor drivers where the
q31_t dsp type is used.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
For the uncompleted BIP request, the following BIP request function
should be same with the previous.
Keep the first request function type, and check it with the following
request function type.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add function `bt_bip_set_supported_capabilities()` to set the
supported caps of responder.
Add function `bt_bip_set_supported_features()` to set the supported
features of responder.
Add function `bt_bip_set_supported_functions()` to set the supported
functions of responder.
Check the supported features of responder when sending OBEX connect
request on initiator side.
Check the supported functions of responder when sending OBEX get/put
request on initiator side.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add functions to manage BIP transport connect and disconnect both for
l2cap and rfcomm.
Add functions to register and unregister primary and secondary OBEX
servers.
Add functions to send OBEX connect/disconnect request and response.
Add functions to send OBEX get/put request and response with different
type defined by BT_BIP_HDR_TYPE_*.
Add functions to send abort request and response.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The OBEX packet cannot be parsed properly if the action ID header is
included in the packet.
It is caused by the value type issue of the action ID. The action ID
type should be `uint8_t` instead of `uint32_t`.
Fix the issue by change action ID value type from `uint32_t` to
`uint8_t`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The function `bt_obex_has_header()` is used to check whether the
specific header is in the buffer.
It is required by upper layer to check the header from the receiving
buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The `bt_obex_string_is_valid()` is used to check whether the sending
or receiving UTF-16 string is valid or not.
Expose function "bt_obex_string_is_valid()" to support external
checking of UTF-16 strings.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
A new function bt_obex_add_header_body_or_end_body() is added to help
to add the body/end body header. When the tail room of the buffer is
more than the passed body room, and the total length of buffer is not
more than the mopl if the body has been added, the header end body
will be added. Or, the header body will be added.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit adds a new Kconfig option NET_LINK_ADDR_CUSTOM_LENGTH
that allows to set custom link layer address length if your link layer
technology is not supported directly. If this option is set to a value
greater than 0, that value is used as link layer address length.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
Follow the convention used elsewhere, e.g. in the sensor API, to allow
users to define their own channel identifiers. This is useful when a
driver's channels don't fit into the predefined set.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
In current implementation, the values are fixed for the field
`Max_Latency` and `Retransmission_Effort` of HCI command
`HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request`
It cannot work properly with these fixed value. It is better to
set it with default value. And it is determined by the controller.
Set the field `Max_Latency` and `Retransmission_Effort` of HCI
command `HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request` with default value.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add macro `BT_HCI_VOICE_SETTINGS` to assemble the voice_setting
Add macro `BT_HCI_VOICE_SETTING_*_PREP` to set the fields for
voice_setting.
Add macro `BT_HCI_VOICE_SETTING_*_GET` to get the value of the
field from the voice_setting.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The current GNSS_DATA_CALLBACK_DEFINE, GNSS_SATELLITES_CALLBACK_DEFINE and
GNSS_RTK_DATA_CALLBACK_DEFINE macros only utilize `_callback` when naming
the respective callback. This means that if the same callback function is
used more than once, there will be naming conflicts.
In order to allow the same callback function to be used several times for
specific gnss devices, introduce GNSS_DT_DATA_CALLBACK_DEFINE,
GNSS_DT_SATELLITES_CALLBACK_DEFINE and GNSS_DT_RTK_DATA_CALLBACK_DEFINE
macros that take a device tree node identifier instead of a device
reference. This makes it possible to name the callback using both
`_node_id` and `_callback`. Such will uniquely identify any combination of
gnss device and callback.
Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
In current implementation, the return value of `BT_FEAT_TEST()` is not
a boolean type. However, the macro `BT_FEAT_TEST()` is used as a type
with a return type value of boolean.
Change the return type of `BT_FEAT_TEST()` to boolean type to make it
easy to use.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Only voice calls are supported by HFP specification. And the
semicolon character shall be added when the voice call is originated.
Add the semicolon character to force the ATD command to end with
semicolon character.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a helper function to query how old the data in a channel is. Output
is converted to milliseconds as `k_ticks` objects cannot be compared
directly.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add scmi_cpu_info_get API to query CPU information via
NXP SCMI CPU domain protocol.
Retrieves run mode, sleep mode, and reset vector addresses
for the specified CPU ID using CPU_INFO_GET command.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add scmi_cpu_reset_vector API for NXP SCMI CPU domain protocol.
This API allows setting CPU reset vector addresses using the
CPU_RESET_VECTOR_SET command. The vector address must point to
the initial address of the vector table
Supports 64-bit addresses and boot/start/resume vector flags.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Adds function for app to obtain page table usage statistics,
allowing fine tuning of numbers of L1 and L2 page table
array.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If a phone was made during the previous SLC, AG cannot properly
process the redial request sent by HF after reconnecting.
Add a callback `redial` to get the last dial number from the upper
layer when `AT+BLDN` command is received.
If the callback is not provided or the error is returned after the
callback returned, send error response to the HF.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>