Go to file
Johann Fischer 3aef852fc0 usb: device_next: implementation of USB device support notification
The implementation uses the system workqueue and a callback provided
and registered by the application. The application callback is called in
the context of the workqueue. Notification messages are stored in a
queue and delivered to the callback in sequence.

We cannot call application callback directly from the USB device stack
thread because the behavior of arbitrary code provided by the
application is unpredictable, and we do not want it to be executed in
the same context where all events from the device controller are
handled.

Nor can we use the ZBUS subsystem directly. ZBUS offloads responsibility
for defined behavior to the observers and application, and does not
provide any way for the publisher to enforce defined behavior and
execution context.
ZBUS listener would be called from the USB thread context and is not
acceptable. ZBUS subscriber does not provide delivery guarantee and
cached message can be overwritten. ZBUS message subscriber has
cumbersome global configuration and buffers that are too complicated to
handle from USB configuration, and even if we would use it, defined
behavior is not possible because of how listener and subscriber are
handled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:42 +01:00
.github Bluetooth: CI: trigger bsim on testlib change 2024-03-19 21:15:44 -05:00
arch xtensa: userspace: Fixes in xtensa_userspace_enter 2024-03-21 13:16:13 -05:00
boards boards: Remove setting CONFIG_BOARD 2024-03-22 00:56:51 +01:00
cmake terminology: adopt CMake, python, and Kconfig code to use qualifiers 2024-03-21 15:32:17 +01:00
doc doc: posix: aep: mark POSIX_SINGLE_PROCESS as supported 2024-03-22 08:57:44 +01:00
drivers drivers: udc_dwc2: enable SOF interrupts and SOF events 2024-03-22 10:10:26 +01:00
dts dts: bindings: Add nxp,rw-soc-ctrl binding 2024-03-22 08:56:10 +01:00
include/zephyr usb: device_next: implementation of USB device support notification 2024-03-22 10:10:42 +01:00
kernel syscall: Export all emitted syscalls, enabling them for extensions 2024-03-20 16:26:54 +00:00
lib posix: unistd: support for confstr() 2024-03-22 08:57:44 +01:00
misc cmake: modules: dts: use devicetree stub file 2023-10-20 12:18:17 -07:00
modules modules: hal_ethos_u: add support for log level NONE 2024-03-21 09:07:35 +01:00
samples samples: shields: x_nucleo_iks01a3: Fix deprecated config fragment 2024-03-22 10:06:04 +01:00
scripts scripts: kconfig: Add substring function 2024-03-21 20:10:46 +01:00
share terminology: adopt CMake, python, and Kconfig code to use qualifiers 2024-03-21 15:32:17 +01:00
snippets snippets: Add nordic-ppr-xip 2024-03-18 19:11:36 +00:00
soc soc: Move non-grouped qemu boards into qemu folder 2024-03-22 00:56:51 +01:00
submanifests Revert "manifest: optional: Update nanopb" 2024-03-20 21:19:53 +00:00
subsys usb: device_next: implementation of USB device support notification 2024-03-22 10:10:42 +01:00
tests tests: drivers: mbox: mbox_data: Fix usage of board name checking 2024-03-22 10:06:04 +01:00
.checkpatch.conf
.clang-format Build System: clang-format: add K_SPINLOCK to FOR_EACH 2023-12-26 19:36:01 +00:00
.codecov.yml
.editorconfig
.gitattributes
.gitignore hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
.gitlint .gitlint: de-duplicate defaults with zephyr_commit_rules.py 2023-09-21 09:29:24 +02:00
.mailmap
.yamllint
CMakeLists.txt cmake: change check_init_priorities target into a post build command 2024-03-20 07:54:06 -05:00
CODE_OF_CONDUCT.md coc: Update Code of Conduct to latest Contributor Covenant 2023-12-21 09:38:23 +00:00
CODEOWNERS doc: CODEOWNERS 2024-03-15 09:39:48 +00:00
CONTRIBUTING.rst
Kconfig
Kconfig.zephyr hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
LICENSE
MAINTAINERS.yml maintainers: Update paths 2024-03-22 00:56:51 +01:00
README.rst doc: README: Rework Resources section 2023-10-17 19:05:20 +03:00
SDK_VERSION SDK_VERSION: Use Zephyr SDK 0.16.5-1 2024-03-12 08:54:42 -04:00
VERSION release: Zephyr v3.6.99 2024-02-23 22:28:57 -06:00
version.h.in version: cmake: kconfig: introduce extra <type>_VERSION_<x>_STRING 2024-02-01 10:28:43 +00:00
west.yml modules: hal_ethos_u: update module revision 2024-03-21 09:07:35 +01:00
zephyr-env.cmd
zephyr-env.sh

.. raw:: html

   <a href="https://www.zephyrproject.org">
     <p align="center">
       <picture>
         <source media="(prefers-color-scheme: dark)" srcset="doc/_static/images/logo-readme-dark.svg">
         <source media="(prefers-color-scheme: light)" srcset="doc/_static/images/logo-readme-light.svg">
         <img src="doc/_static/images/logo-readme-light.svg">
       </picture>
     </p>
   </a>

   <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
   src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
   <a
   href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
   <img
   src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>


The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM (Cortex-A,
Cortex-R, Cortex-M), Intel x86, ARC, Nios II, Tensilica Xtensa, and RISC-V,
SPARC, MIPS, and a large number of `supported boards`_.

.. below included in doc/introduction/introduction.rst


Getting Started
***************

Welcome to Zephyr! See the `Introduction to Zephyr`_ for a high-level overview,
and the documentation's `Getting Started Guide`_ to start developing.

.. start_include_here

Community Support
*****************

Community support is provided via mailing lists and Discord; see the Resources
below for details.

.. _project-resources:

Resources
*********

Here's a quick summary of resources to help you find your way around:

Getting Started
---------------

  | 📖 `Zephyr Documentation`_
  | 🚀 `Getting Started Guide`_
  | 🙋🏽 `Tips when asking for help`_
  | 💻 `Code samples`_

Code and Development
--------------------

  | 🌐 `Source Code Repository`_
  | 📦 `Releases`_
  | 🤝 `Contribution Guide`_

Community and Support
---------------------

  | 💬 `Discord Server`_ for real-time community discussions
  | 📧 `User mailing list (users@lists.zephyrproject.org)`_
  | 📧 `Developer mailing list (devel@lists.zephyrproject.org)`_
  | 📬 `Other project mailing lists`_
  | 📚 `Project Wiki`_

Issue Tracking and Security
---------------------------

  | 🐛 `GitHub Issues`_
  | 🔒 `Security documentation`_
  | 🛡️ `Security Advisories Repository`_
  | ⚠️ Report security vulnerabilities at vulnerabilities@zephyrproject.org

Additional Resources
--------------------
  | 🌐 `Zephyr Project Website`_
  | 📺 `Zephyr Tech Talks`_

.. _Zephyr Project Website: https://www.zephyrproject.org
.. _Discord Server: https://chat.zephyrproject.org
.. _supported boards: https://docs.zephyrproject.org/latest/boards/index.html
.. _Zephyr Documentation: https://docs.zephyrproject.org
.. _Introduction to Zephyr: https://docs.zephyrproject.org/latest/introduction/index.html
.. _Getting Started Guide: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
.. _Contribution Guide: https://docs.zephyrproject.org/latest/contribute/index.html
.. _Source Code Repository: https://github.com/zephyrproject-rtos/zephyr
.. _GitHub Issues: https://github.com/zephyrproject-rtos/zephyr/issues
.. _Releases: https://github.com/zephyrproject-rtos/zephyr/releases
.. _Project Wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _User mailing list (users@lists.zephyrproject.org): https://lists.zephyrproject.org/g/users
.. _Developer mailing list (devel@lists.zephyrproject.org): https://lists.zephyrproject.org/g/devel
.. _Other project mailing lists: https://lists.zephyrproject.org/g/main/subgroups
.. _Code samples: https://docs.zephyrproject.org/latest/samples/index.html
.. _Security documentation: https://docs.zephyrproject.org/latest/security/index.html
.. _Security Advisories Repository: https://github.com/zephyrproject-rtos/zephyr/security
.. _Tips when asking for help: https://docs.zephyrproject.org/latest/develop/getting_started/index.html#asking-for-help
.. _Zephyr Tech Talks: https://www.zephyrproject.org/tech-talks