Commit graph

15409 commits

Author SHA1 Message Date
Johann Fischer
693191467d usb: device_next: add USB device context to message delivery callback
Add USB device context argument to message delivery callback.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Fin Maaß
c5fc2e743c kernel: docs: correct sys_heap_aligned_realloc
correct doc of sys_heap_aligned_realloc().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 15:00:12 +02:00
Seppo Takalo
01b57b4999 net: lwm2m: Add offset to post-write callback
When Block-Wise transfer restarts, the post-write callback should
receive some indication that the block is actually a beginning of new,
instead of part of previous transfer.

Fixes #71351

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Emil Gydesen
a6a14360a9 Bluetooth: BAP: Remove err from recv_state_removed callback
The callback is only ever called when we received a
notification from the BASS server that the receive state is
removed, which cannot contain an error code.
Thus it does not make sense for the callback to have an
error code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-15 14:57:20 +02:00
Francois Ramu
e255444179 dts: bindings: introduce a new compatible for stm32 xSPI flash controller
The new bindings for the stm32 xspi is for new stm32 devices with
XSPI peripherals like the stm32h5 serie. This is close to the octo-spi.
Adapt the flash controller constants to the XSPI model especially.
This is done through a new xspi.h definition file.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:56:04 +02:00
Jukka Rissanen
6d129b2a2d net: http_server: Add support for specifying Content-Type
Allow user to specify the Content-Type header field for the
HTTP response.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 20:22:58 -04:00
Johann Fischer
c0e8f0d96b usb: device_next: add initial HID device support
Add initial HID device support. Unlike the existing HID implementation,
the new implementation uses a devicetree to instantiate a HID device.
To the user, the HID device appears as a normal Zephyr RTOS device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer
a2c9c65bfa include: usb_hid: remove conditional definition from struct hid_ops
For upcoming HID support in the new device stack and to provide API
backward compatibility, there must be no conditional definitions in the
header.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Declan Snyder
c767ed6e27 dts: bindings: adc: Add NXP GAU ADC binding
Add binding for NXP GAU ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Johan Hedberg
484fe3f06c Bluetooth: Remove bt_read_static_addr() "hack"
This function was used to shortcut HCI for combined host + controller
builds. It doesn't provide much value and adds complexity to the HCI
driver interface, so just remove it. This means vendor-specific HCI
commands is now the only way for the host to access the same
information.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Jukka Rissanen
e71569fc00 net: http: Make sure not use undefined Kconfig symbols
If CONFIG_HTTP_SERVER is not enabled, then we must not use
Kconfig symbols that are only available when HTTP server is
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 15:51:20 +02:00
Jamie McCrae
7a4f4711af drivers: led_strip: Make update channels function optional
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae
50b7d61c91 drivers: led_strip: Check length before updating LED strip
Checks that the supplied length is valid for the given driver
before passing it to the update function

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae
245163cb87 drivers: led_strip: Update format
Updates the include file to fix some formatting issues

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae
4bea96b68b drivers: led_strip: Add length function
Adds a length function which returns the length of the LED strip

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jordan Yates
98deebd29b kernel: add k_uptime_seconds
Add a helper function for retrieving the system uptime in seconds
without having to do a second division.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates
aee130f8d7 sys: time_units: add seconds conversions
Add conversions between the existing time units and seconds.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates
c354f7b00b sys: time_units: move warning to doxygen command
Move the warning about code being autogenerated into the doxygen comment
instead of being added as a separate comment that then appears in the
`@return` text.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jukka Rissanen
70ab0e65a5 net: websocket: Add a way to unregister a websocket connection
Doing a normal close for a websocket does not close the underlying
real socket. If we do not have fd for the real socket, then it is
not possible to fully close a websocket connection. As we are allocating
a websocket using websocket_register() in HTTP server use case,
create a websocket_unregister() that will close both the real
socket and the websocket socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Corey Wharton
bf114c6b1a logging: add API to trigger immediate processing of logs
There are use cases where it's beneficial to trigger the log
thread to process log messages as soon as able instead of waiting
for the processing timer or threshold triggers. An example would be
to flush the log buffer before entering the idle thread after
forcing a system power state.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Nicolas Pitre
57305971d1 kernel: mmu: abstract access to page frame flags and address
Introduce z_page_frame_set() and z_page_frame_clear() to manipulate
flags. Obtain the virtual address using the existing
z_page_frame_to_virt(). This will make changes to the page frame
structure easier.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-13 16:04:40 -04:00
Fin Maaß
9bd0170aad net: http: client: mark as unstable
As the http client API is currently used by two applications
(websocket and hawkbit), it should be marked as unstable, according
to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-13 16:02:55 -04:00
Grzegorz Swiderski
97a83ef8a7 dt-bindings: misc: Add nRF54H20 Domain IDs and Owner IDs
Move the Domain IDs from `nrf54h20.dtsi` into its own header file.
Additionally, include another header with Owner IDs.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Grzegorz Swiderski
beb4d5690a dt-bindings: adc: Fix BIT_MASK redefined warning
Include `dt-util.h` instead of providing a separate macro definition.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Flavio Ceolin
39538f78cf pm: device_runtime: Small API documentation fix
Remove an invalid return value in pm_device_runtime_enable

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-12 17:02:56 -04:00
Hess Nathan
b8c21d4898 coding guidelines: comply with MISRA Rule 13.4
- avoid to use assignment expression value

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-12 13:38:25 -04:00
Hess Nathan
1fb5cd6462 coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-12 13:37:54 -04:00
Jordan Yates
202a9329e5 net: capture: fix doxygen parameter names
Fix parameter names in the doxygen comment to fix warnings when building
the docs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-12 11:02:53 -04:00
Adam Matus
684a28656e net: zperf: Add periodic reporting for upload
Add option for zperf tcp upload that will enable periodic result reporting.
This is useful for monitoring performance swings during a longer session.

Signed-off-by: Adam Matus <adam.matus@nxp.com>
2024-05-10 14:45:48 -05:00
Robert Lubos
811386ef3a net: lib: http_server: Improve doxygen documentation
Add missing doxygen groups for HTTP service and server APIs.
Improve doxygen API documentation when missing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Robert Lubos
cb51bd007a net: lib: http_server: Remove unused struct
JSON support was dropped in the initial server implementation, so remove
a leftover struct representing it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Robert Lubos
8cc5193437 net: lib: http_server: Add missing extern C in headers
<zephyr/net//http/frame.h> and <zephyr/net/http/server.h> were missing
"extern C" statement.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Vinayak Kariappa Chettimada
3997479b49 Bluetooth: HCI: Rename to bt_hci_iso_sdu_hdr and bt_hci_iso_sdu_ts_hdr
Rename struct bt_hci_iso_data_hdr to bt_hci_iso_sdu_hdr, and
struct bt_hci_iso_ts_data_hdr to bt_hci_iso_sdu_ts_hdr.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-10 15:02:10 +02:00
Dinesh Kumar K
e08ce0ed71 drivers: sensor: grow_r502a: add upload and download template
1. Add functionality for upload and download fingerprint
template data of the R502A fingerprint sensor device.
2. change data type for data_len parameter of
transceive_packet function to uint16_t as it may hold
value 256 for dowload template data to sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K
7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K
3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K
e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Mayank Mahajan
d1687a557c ADD: Driver for Sensor INA226
INA226 - Bidirectional Current and Power Monitor w/ I2C
Boards Tested: mr_canhubk3

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-05-09 15:46:31 +02:00
Hess Nathan
ed12a0cc35 coding guidelines: comply with MISRA Rule 11.8
modified parameter types to receive a const pointer when a
non-const pointer is not needed

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-09 10:28:44 +02:00
Chekhov Ma
ad2745471c drivers: mfd: add new driver "mfd_adp5585"
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-05-08 16:09:08 -04:00
Jukka Rissanen
3c9513e9cc net: http_server: Add websocket support
After upgrading the HTTP connection to websocket, call the
application registered callback to transfer the ownership of
the socket to the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen
13118cf3c0 net: websocket: Create websocket_register() for http_server use
The http_server needs a way to bind a websocket socket to the
upgraded http connection socket. So websocket_register() is used
for that.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen
8960f13c4f net: websocket: Fix doc for websocket_recv_msg() function
The function websocket_recv_msg() documentation was missing description
for the return value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen
535d4b40a8 net: lib: http_server: Upgrade from HTTP/1.1 to websocket
Allow connection to be upgraded from HTTP/1.1 to websocket.
This commit does nothing yet with the upgraded connection.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Jukka Rissanen
37956465e1 net: lib: http_server: Check HTTP/1.1 Upgrade field
Check what kind of upgrading we are doing and return error
if we receive upgrade that we do not support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Pieter De Gendt
37ac93b555 include: linker: common-rom: Remove unused http_resource_desc section
HTTP resources are assigned a section for each service, so this
iterable section isn't used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-08 15:57:13 -04:00
Stoyan Bogdanov
3d60d551c4 dts: bindings: Add SDP-120 connector GPIO ADI
Add binding for adi SDP-120 connector and header file
with marcos to map signals using signal names.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-05-08 15:51:42 +02:00
Chris Friedt
d6db75640d posix: barrier: remove deprecated and non-std declaration macro
Remove the deprecated macro PTHREAD_BARRIER_DEFINE().

This was deprecated prior to v3.4.0 and technically should have
been removed prior to v3.6.0.

Users should instead use the standard POSIX call,
pthread_barrier_init() to initialize a pthread_barrier_t.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-08 12:02:05 +02:00
frei tycho
7260b89c54 drivers: linker: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-08 11:59:35 +02:00
Chris Friedt
1f5960e531 doc: posix: add links and make minor corrections
Add a link to _POSIX_CLOCK_MONOTONIC, correct the
_POSIX_RAW_SOCKETS kconfig option.

Define _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC so that they
conform to the spec.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-05-07 21:22:56 -04:00