Lines Matching +full:usb +full:- +full:c +full:- +full:vbus +full:- +full:adc
3 USB-C device stack
6 The USB-C device stack is a hardware independent interface between a
7 Type-C Port Controller (TCPC) and customer applications. It is a port of
8 the Google ChromeOS Type-C Port Manager (TCPM) stack.
11 * Uses the APIs provided by the Type-C Port Controller drivers to interact with
12 the Type-C Port Controller.
20 :zephyr:code-sample-category:`List<usbc>` of samples for different purposes.
22 Implementing a Sink Type-C and Power Delivery USB-C device
25 The configuration of a USB-C Device is done in the stack layer and devicetree.
29 * Devicetree usb-c-connector node referencing a TCPC
30 * Devicetree vbus node referencing a VBUS measurement device
34 For example, for the Sample USB-C Sink application:
36 Each Physical Type-C port is represented in the devicetree by a usb-c-connector
41 :start-after: usbc.rst usbc-port start
42 :end-before: usbc.rst usbc-port end
45 VBUS is measured by a device that's referenced in the devicetree by a
46 usb-c-vbus-adc compatible node:
50 :start-after: usbc.rst vbus-voltage-divider-adc start
51 :end-before: usbc.rst vbus-voltage-divider-adc end
58 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
59 :language: c
60 :start-after: usbc.rst port data object start
61 :end-before: usbc.rst port data object end
66 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
67 :language: c
68 :start-after: usbc.rst callbacks start
69 :end-before: usbc.rst callbacks end
74 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
75 :language: c
76 :start-after: usbc.rst check start
77 :end-before: usbc.rst check end
82 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
83 :language: c
84 :start-after: usbc.rst notify start
85 :end-before: usbc.rst notify end
90 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
91 :language: c
92 :start-after: usbc.rst register start
93 :end-before: usbc.rst register end
98 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
99 :language: c
100 :start-after: usbc.rst user data start
101 :end-before: usbc.rst user data end
104 Start the USB-C subsystem:
106 .. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
107 :language: c
108 :start-after: usbc.rst usbc start
109 :end-before: usbc.rst usbc end
112 Implementing a Source Type-C and Power Delivery USB-C device
115 The configuration of a USB-C Device is done in the stack layer and devicetree.
119 * Devicetree ``usb-c-connector`` node referencing a TCPC
120 * Devicetree ``vbus`` node referencing a VBUS measurement device
124 For example, for the Sample USB-C Source application:
126 Each Physical Type-C port is represented in the devicetree by a ``usb-c-connector``
131 :start-after: usbc.rst usbc-port start
132 :end-before: usbc.rst usbc-port end
135 VBUS is measured by a device that's referenced in the devicetree by a
136 ``usb-c-vbus-adc`` compatible node:
140 :start-after: usbc.rst vbus-voltage-divider-adc start
141 :end-before: usbc.rst vbus-voltage-divider-adc end
148 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
149 :language: c
150 :start-after: usbc.rst port data object start
151 :end-before: usbc.rst port data object end
156 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
157 :language: c
158 :start-after: usbc.rst callbacks start
159 :end-before: usbc.rst callbacks end
164 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
165 :language: c
166 :start-after: usbc.rst check start
167 :end-before: usbc.rst check end
172 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
173 :language: c
174 :start-after: usbc.rst notify start
175 :end-before: usbc.rst notify end
180 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
181 :language: c
182 :start-after: usbc.rst register start
183 :end-before: usbc.rst register end
188 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
189 :language: c
190 :start-after: usbc.rst user data start
191 :end-before: usbc.rst user data end
194 Start the USB-C subsystem:
196 .. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
197 :language: c
198 :start-after: usbc.rst usbc start
199 :end-before: usbc.rst usbc end