doc: connectivity: move USB-C device stack to USB chapter
This looks a bit lost in its own USB-C chapter, move it to USB under the Power Delivery heading. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
b335c19bcb
commit
fbb6cd1a39
|
@ -2636,7 +2636,7 @@ USB-C:
|
|||
- include/zephyr/usb_c/
|
||||
- samples/subsys/usb_c/
|
||||
- subsys/usb/usb_c/
|
||||
- doc/connectivity/usb_c/
|
||||
- doc/connectivity/usb/pd/
|
||||
labels:
|
||||
- "area: USB-C"
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ Connectivity
|
|||
networking/index.rst
|
||||
lora_lorawan/index.rst
|
||||
usb/index.rst
|
||||
usb_c/index.rst
|
||||
|
|
|
@ -20,6 +20,13 @@ USB
|
|||
device_next/api/index.rst
|
||||
host/api/index.rst
|
||||
|
||||
**USB Power Delivery support**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
pd/ucds.rst
|
||||
|
||||
**Common sections related to USB support**
|
||||
|
||||
.. toctree::
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.. _usbc_device_stack:
|
||||
.. _usbc_api:
|
||||
|
||||
USB-C device stack
|
||||
##################
|
||||
|
@ -36,7 +36,7 @@ For example, for the Sample USB-C Sink application:
|
|||
Each Physical Type-C port is represented in the devicetree by a usb-c-connector
|
||||
compatible node:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
|
||||
:language: dts
|
||||
:start-after: usbc.rst usbc-port start
|
||||
:end-before: usbc.rst usbc-port end
|
||||
|
@ -45,7 +45,7 @@ compatible node:
|
|||
VBUS is measured by a device that's referenced in the devicetree by a
|
||||
usb-c-vbus-adc compatible node:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
|
||||
:language: dts
|
||||
:start-after: usbc.rst vbus-voltage-divider-adc start
|
||||
:end-before: usbc.rst vbus-voltage-divider-adc end
|
||||
|
@ -55,7 +55,7 @@ usb-c-vbus-adc compatible node:
|
|||
A user defined structure is defined and later registered with the subsystem and can
|
||||
be accessed from callback through an API:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst port data object start
|
||||
:end-before: usbc.rst port data object end
|
||||
|
@ -63,7 +63,7 @@ be accessed from callback through an API:
|
|||
|
||||
These callbacks are used by the subsystem to set or get application specific data:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst callbacks start
|
||||
:end-before: usbc.rst callbacks end
|
||||
|
@ -71,7 +71,7 @@ These callbacks are used by the subsystem to set or get application specific dat
|
|||
|
||||
This callback is used by the subsystem to query if a certain action can be taken:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst check start
|
||||
:end-before: usbc.rst check end
|
||||
|
@ -79,7 +79,7 @@ This callback is used by the subsystem to query if a certain action can be taken
|
|||
|
||||
This callback is used by the subsystem to notify the application of an event:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst notify start
|
||||
:end-before: usbc.rst notify end
|
||||
|
@ -87,7 +87,7 @@ This callback is used by the subsystem to notify the application of an event:
|
|||
|
||||
Registering the callbacks:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst register start
|
||||
:end-before: usbc.rst register end
|
||||
|
@ -95,7 +95,7 @@ Registering the callbacks:
|
|||
|
||||
Register the user defined structure:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst user data start
|
||||
:end-before: usbc.rst user data end
|
||||
|
@ -103,7 +103,7 @@ Register the user defined structure:
|
|||
|
||||
Start the USB-C subsystem:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst usbc start
|
||||
:end-before: usbc.rst usbc end
|
||||
|
@ -126,7 +126,7 @@ For example, for the Sample USB-C Source application:
|
|||
Each Physical Type-C port is represented in the devicetree by a ``usb-c-connector``
|
||||
compatible node:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
|
||||
:language: dts
|
||||
:start-after: usbc.rst usbc-port start
|
||||
:end-before: usbc.rst usbc-port end
|
||||
|
@ -135,7 +135,7 @@ compatible node:
|
|||
VBUS is measured by a device that's referenced in the devicetree by a
|
||||
``usb-c-vbus-adc`` compatible node:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
|
||||
:language: dts
|
||||
:start-after: usbc.rst vbus-voltage-divider-adc start
|
||||
:end-before: usbc.rst vbus-voltage-divider-adc end
|
||||
|
@ -145,7 +145,7 @@ VBUS is measured by a device that's referenced in the devicetree by a
|
|||
A user defined structure is defined and later registered with the subsystem and can
|
||||
be accessed from callback through an API:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst port data object start
|
||||
:end-before: usbc.rst port data object end
|
||||
|
@ -153,7 +153,7 @@ be accessed from callback through an API:
|
|||
|
||||
These callbacks are used by the subsystem to set or get application specific data:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst callbacks start
|
||||
:end-before: usbc.rst callbacks end
|
||||
|
@ -161,7 +161,7 @@ These callbacks are used by the subsystem to set or get application specific dat
|
|||
|
||||
This callback is used by the subsystem to query if a certain action can be taken:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst check start
|
||||
:end-before: usbc.rst check end
|
||||
|
@ -169,7 +169,7 @@ This callback is used by the subsystem to query if a certain action can be taken
|
|||
|
||||
This callback is used by the subsystem to notify the application of an event:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst notify start
|
||||
:end-before: usbc.rst notify end
|
||||
|
@ -177,7 +177,7 @@ This callback is used by the subsystem to notify the application of an event:
|
|||
|
||||
Registering the callbacks:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst register start
|
||||
:end-before: usbc.rst register end
|
||||
|
@ -185,7 +185,7 @@ Registering the callbacks:
|
|||
|
||||
Register the user defined structure:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst user data start
|
||||
:end-before: usbc.rst user data end
|
||||
|
@ -193,7 +193,7 @@ Register the user defined structure:
|
|||
|
||||
Start the USB-C subsystem:
|
||||
|
||||
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
|
||||
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
|
||||
:language: c
|
||||
:start-after: usbc.rst usbc start
|
||||
:end-before: usbc.rst usbc end
|
|
@ -1,9 +0,0 @@
|
|||
.. _usbc_api:
|
||||
|
||||
USB-C device support
|
||||
####################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
ucds.rst
|
Loading…
Reference in a new issue