CONFIG_UDC_BUF_FORCE_NOCACHE depend on NOCACHE_MEMORY && DCACHE in Kconfig,
so it can only be true when the platform supports cache.
The controller driver can imply the value of CONFIG_UDC_BUF_FORCE_NOCACHE,
like UDC_NXP_EHCI. If CONFIG_UDC_BUF_FORCE_NOCACHE is true, then all the
usb transfer buffer should be in noncache section.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
bt_gatt_find_by_uuid used bt_gatt_attr_value_handle but that
function only works to get the value handle of a characteristic
declaration, i.e. if the UUID is not BT_UUID_GATT_CHRC then it
would always return handle = 0. This meant that
bt_gatt_find_by_uuid would always use handle = 0 as the starting
handle for non-BT_UUID_GATT_CHRC attributes, instead of the handle
of the provided attr.
This was not an issue for any UUIDs that may only exist once on a
GATT server, which is most UUIDs, but for UUIDs like the
BT_UUID_TBS_* UUIDs that may be multiple instances of, it would
always return the first attribute rather than the one starting
from the provided start attr.
This commit also ensures that we do not overflow the `end_handle`
when adding 2 uint16_t values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update AT command API to return a response.
Add param to set the timeout when waiting for a response.
If the user does not desire a response, the response buffer can
be NULL.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
All other APIs that need to reset the modem do so in an async way.
Make the rest API async as well.
This fixes issues where modem events related to the reset
were not generated properly.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
Allow user to specify protocol extensions when receiving data
from Ethernet network. This means that user can register L3
protocol handler using NET_L3_REGISTER() with the desired
protocol type. Ethernet code will then call the handler if
such a protocol type packet is received. This is currently
only implemented for Ethernet. The original IPv4 and IPv6
handling is left intact even if they can be considered to
be L3 layer protocol. This could be changed in the future
if needed so that IPv4 and IPv6 handling could be made
pluggable protocols.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Added private channels for metadata associated with
distance measurement according to datasheet and API manual.
Signed-off-by: Michal Piekos <michal.piekos@wp.pl>
The smp_shell module uses k_fifo, but does not include the kernel header
file that defines it. This commit adds the missing include.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
This commit adds polling support to the newly rewritten k_pipe interface.
Changes include:
* Removed ifdef CONFIG_POLL from kernel/poll.c to let both implementations
coexist.
* Added the needed datastructures to the new k_pipe struct.
* k_pipe_write(..) now notifies the poll subsystem that data is available.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
The `k_pipe_*` API has been reworked to provide a more consistent and
intuitive interface. The new API aims to provide a simple to use byte
stream interface that is more in line with the POSIX pipe API.
The previous API has been deprecated and will be removed in a future
release.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
Add endian specific buffer convert and copy functions.
This is helpful when you want to convert arbitrary data lengths
but only swapping byte order when needed.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
In current implementation, the `accept` cannot be identified if the
same one `accept` callback is passed by the upper layer.
Similar with `accept` of `bt_l2cap_server.accept`, add a parameter
`server` to the `bt_rfcomm_server.accept` callback.
Add a argument `server` to function bt_hfp_hf_accept() to avoid
building issue for HFP_HF.
Add a argument `server` to function rfcomm_accept() to avoid building
issue for shell/rfcomm.c.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In the function `bt_rfcomm_server_register()`, the channel cannot be
dynamic allocated. And only pre-set channel is supported.
Improve the function `bt_rfcomm_server_register()` to support the
dynamic channel allocation if the passed channel is zero.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The buffer `BT_RFCOMM_BUF_SIZE` is used to define the TX buffer size of
TX pool.
In current implementation, the TX buffer size of RFCOMM cannot be
calculated due to the macro `BT_RFCOMM_BUF_SIZE` is defined in internal
header file `rfcomm_internal.h`.
Move the macro `BT_RFCOMM_BUF_SIZE` form internal header file
`rfcomm_internal.h` to interface `rfcomm.h`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
BASE is now parsed on-the-fly on sink sync, removing
unnecessary restriction in intermediate parsed storage
and without requiring an excessive amount of memory.
Signed-off-by: Lars Knudsen <LAKD@demant.com>
add flash_img_get_upload_slot() to get current
upload slot.
when CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD
is enabled, it is not based on the DT.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fix this warning:
zephyr/logging/log_core.h:356:21: \
warning: variable 'mode' set but not used [-Wunused-but-set-variable]
356 | int mode; \
| ^~~~
Use the same approach as in Z_LOG2().
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Content-Range functionality added in recent commits has been propagated
to http_client module. If "Content-Range" string is detected on header
field, Content-Range are returned via http_response structure.
Signed-off-by: Piotr Radecki <piotr.radecki@jrdltd.co.uk>
Content-Range hasn't been supported in zephyr. This change adds
Content-Range header parsing to http_parser module. Range start,
range end, and total size are supported. All units are currently
interpreted as bytes.
This is much needed change, because many applications responsible
for http data download are based on Content-Range approach.
Signed-off-by: Piotr Radecki <piotr.radecki@jrdltd.co.uk>
Implement lan865x mdio driver to provide interface between lan865x MAC
driver and internal PHY driver phy_microchip_t1s.c. This driver is needed
to support the driver architecture followed.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
10BASE-T1S PHYs can operate in either CSMA/CD or PLCA mode. PLCA mode
needs some set of parameters like node id, node count, max burst count,
burst timer and TO (Transmit Oppertunity) timer to be configured. OPEN
Alliance TC14 specification defined a set of PLCA registers to configure
PLCA mode. The below APIs are implemented for PLCA mode.
genphy_set_plca_cfg() - to configure PLCA settings.
genphy_get_plca_cfg() - to get the configured PLCA settings.
genphy_get_plca_sts() - to get the PLCA status like active or inactive.
These APIs are implemented as generic library so that all 10BASE-T1S
PHYs can use these APIs to configure/access PLCA settings to avoid
duplication of code.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Some devices like Microchip's LAN8650/1 has direct clause 45 register
access where clause 22 indirect access is not needed to read/write
clause 45 registers. PHY drivers can implement read_c45/write_c45
functions using mdio_read_c45/mdio_write_c45 if direct access is
supported OR mdio_read/mdio_write indirect approach to access clause 45
registers indirectly.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
This commit replaces a hack where is_busy status of adltc2990 was
checked by fetching SENSOR_CHAN_ALL with a dedicated function
expose adltc2990_trigger_measurement function to public api
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Many of the exception.h files from various arch directories have a typo in
the header gate e.g. ZEPHYR_INCLUDE_ARCH_MIPS_EXPCEPTION_H_ .
This patch corrects the issue by substituting EXPCEPTION for EXCEPTION.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit introduces a new Sensor Clock API, enabling the retrieval
of cycle counts and conversion to nanoseconds based on the system or
external clock. The API includes:
- `sensor_clock_get_cycles()` to get the current cycle count from the
sensor clock.
- `sensor_clock_cycles_to_ns()` to convert cycles to nanoseconds using
the clock's frequency.
The implementation supports both system clocks and external clocks
defined in the device tree, making the sensor clock integration more
flexible for various sensor use cases.
Signed-off-by: Mark Chen <mark.chen@cienet.com>
Added more APIs for ARM SCMI clock management protocol.
- scmi_clock_rate_set
- scmi_clock_parent_get
- scmi_clock_parent_set
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Change the stepper API to instead of changing the stepper speed based on
the velocity in microsteps per second to use the delay in usec between
successive steps. Also remove the velocity from the `stepper_run` function
as typical API usage is enable -> set step interval -> run.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
The address sanitizer in llvm adds padding (redzones) after data.
But for those structures we are re-grouping using the linker script
and for which we iterate over we cannot have that extra padding.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure all pending log messages are processed by the log processing
thread when log_flush is called, blocking the caller until done.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
libmctp provides interfaces for wiring up a MCTP bus it calls bus
bindings. The bindings provided in libmctp however are not directly
useful to Zephyr without some work. Provide an initial uart binding that
directly uses Zephyr's async uart interface.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Move the Atmel SAM E70/V71 DMA PERIDs header file to
include/zephyr/dt-bindings/dma and unify it for use with the entire product
family (SAM E70/S70/V70/V71).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add new SENSOR_CHAN_FREQUENCY constant to allow implement sensors that
output frequency values in Hertz.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Pass the report buffer originally provided in hid_device_submit_report()
as a parameter to input_report_done() callback. Example use case is to
enable HID report multi buffering which is easiest achieved by
allocating report buffer before submitting it and then releasing the
buffer after it has been sent.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The _POSIX2_VERSION feature test macro should be either -1 or
left undefined on systems that do not have a POSIX-conformant
shell or utilities. Otherwise, it should be defined to the
value _POSIX_VERSION.
Since Zephyr has neither a conformant shell nor utilities, leave
_POSIX2_VERSION undefined.
Similarly, the _POSIX2_C_DEV macro should be either -1 or left
undefined if the implementation does not support the c99, lex,
and yacc shell utilities. Otherwise it should be defined to the
value _POSIX_VERSION.
Although _POSIX2_C_BIND appears to be related to the _POSIX2
family of feature test macros, all it conveys is that the
implementation supports POSIX C Language bindings, which is
always the case if the implementation uses the C programming
language, even if the implementation does not support a
conformant shell and utilities. _POSIX2_C_BIND should be
defined to the same value as _POSIX_VERSION.
Define _POSIX2_C_BIND as _POSIX_VERSION since Zephyr's
implementation of the POSIX API supports C language bindings.
The information above comes from the "unistd.h" page in the
spec and also through word search of the term "C-Language
Development Utilities".
https://pubs.opengroup.org/onlinepubs/9699919799/index.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
fixes the following:
- If a read SQE generates a CQE with an error before a buffer
has been allocated,
the flags of the sqe are not correctly translated into cqe flags.
- rtio_cqe_get_mempool_buffer(...) sets the *buff
to a non-zero value, even if no buffer is assigned
Signed-off-by: Florian Weber <Florian.Weber@live.de>