Debian Codegraph @

dbus/lib/io.gpiod1.xml

raw symbols SCIP
1 <!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
2 <!-- SPDX-FileCopyrightText: 2022-2025 Bartosz Golaszewski <[email protected]> -->
3
4 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
5 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
6
7 <node>
8
9 <!--
10 io.gpiod1.Chip:
11 @short_description: Represents a single GPIO chip in the system.
12 -->
13 <interface name='io.gpiod1.Chip'>
14
15 <!--
16 Name:
17
18 Name of the chip as represented in the kernel.
19 -->
20 <property name='Name' type='s' access='read'/>
21
22 <!--
23 Label:
24
25 Label of the chip as represented in the kernel.
26 -->
27 <property name='Label' type='s' access='read'/>
28
29 <!--
30 NumLines:
31
32 Number of GPIO lines exposed by this chip.
33 -->
34 <property name='NumLines' type='u' access='read'/>
35
36 <!--
37 Path:
38
39 Filesystem path used to open this chip.
40 -->
41 <property name='Path' type='ay' access='read'/>
42
43 <!--
44 RequestLines:
45 @line_config: Line configuration. See below for details.
46 @request_config: Request configuration. See below for details.
47 @request_path: Object path pointing to the newly added request.
48
49 Requests a set of lines and makes it possible for the users of this API
50 to manipulate them depending on the line configuration.
51
52 Line configuration is a tuple of two arrays. The first one contains
53 mappings of arrays of line offsets to sets of line settings. The second
54 contains the list of default output values which are only used in output
55 mode.
56
57 **Available line config options:**
58
59 - **"direction"**: String representing the line direction.
60 Accepts the following values: "input", "output".
61 - **"edge"**: String representing the edge detection setting.
62 Accepts the following values: "falling", "rising", "both".
63 - **"active-low"**: Boolean representing the active-low setting.
64 - **"drive"**: String representing the drive settings.
65 Accepts the following values: "push-pull", "open-drain", "open-source".
66 - **"bias"**: String representing the internal bias settings.
67 Accepts the following values: "disabled", "pull-up", "pull-down", "as-is".
68 - **"debounce-period"**: Debounce period in microseconds, represented as a
69 signed 64-bit integer.
70 - **"event-clock"**: String representing the clock used to timestamp edge
71 events.
72 Accepts the following values: "monotonic", "realtime", "hte".
73
74 Output values are applied to the lines in the order they appear in the
75 settings mappings.
76
77 **Example variant** that allows requesting lines at offsets 1, 5, and 11
78 in output, push-pull, and active-low modes, and specifies the output
79 values as active (as visualized with `g_variant_print()`):
80
81 .. code-block:: none
82
83 // Line config tuple
84 (
85 // Array of line settings mappings
86 [
87 // Single mapping tuple
88 (
89 // Offsets to map
90 [1, 5, 11],
91 // Line settings dict
92 {
93 'direction': <'output'>,
94 'drive': <'push-pull'>,
95 'active-low': <true>
96 }
97 )
98 ],
99 // Output values
100 [1, 1, 1]
101 )
102
103 Request configuration is a hashmap mapping names of the available config
104 options to their values wrapped in a variant.
105
106 **Available request config options:**
107
108 - **"consumer"**: Consumer name as a string.
109 - **"event-buffer-size"**: Requested size of the in-kernel edge event buffer,
110 as an unsigned 32-bit integer.
111
112 The object path to the new request is returned on success. The user
113 should wait for it to appear before trying to use the requested lines in
114 any way.
115 -->
116 <method name='RequestLines'>
117 <arg name='line_config' direction='in' type='(a(aua{sv})ai)'/>
118 <arg name='request_config' direction='in' type='a{sv}'/>
119 <arg name='request_path' direction='out' type='o'/>
120 </method>
121
122 </interface>
123
124 <!--
125 io.gpiod1.Line:
126 @short_description: Represents a single GPIO line on a chip.
127 -->
128 <interface name='io.gpiod1.Line'>
129
130 <!--
131 Offset:
132
133 Uniquely identifies the line on the chip.
134 -->
135 <property name='Offset' type='u' access='read'/>
136
137 <!--
138 Name:
139
140 Name of the GPIO line as represented in the kernel.
141 -->
142 <property name='Name' type='s' access='read'/>
143
144 <!--
145 Used:
146
147 True if line is busy.
148
149 Line can be used by gpio-manager, another user-space process, a kernel
150 driver or is hogged. The exact reason a line is busy cannot be determined
151 from user-space unless it's known to be managed by gpio-manager (see:
152 the Managed property of this interface).
153 -->
154 <property name='Used' type='b' access='read'/>
155
156 <!--
157 Consumer:
158
159 Name of the consumer of the line.
160 -->
161 <property name='Consumer' type='s' access='read'/>
162
163 <!--
164 Direction:
165
166 Direction of the line. Returns "input" or "output".
167 -->
168 <property name='Direction' type='s' access='read'/>
169
170 <!--
171 EdgeDetection:
172
173 Edge detection settings of the line. Returns: "none", "falling",
174 "rising" or "both".
175 -->
176 <property name='EdgeDetection' type='s' access='read'/>
177
178 <!--
179 Bias:
180
181 Bias setting of the line. Returns: "unknown", "disabled, "pull-up" or
182 "pull-down".
183 -->
184 <property name='Bias' type='s' access='read'/>
185
186 <!--
187 Drive:
188
189 Drive setting of the line. Returns "push-pull", "open-source" or
190 "open-drain".
191 -->
192 <property name='Drive' type='s' access='read'/>
193
194 <!--
195 ActiveLow:
196
197 True if the line is active-low. False for active-high.
198 -->
199 <property name='ActiveLow' type='b' access='read'/>
200
201 <!--
202 Debounced:
203
204 True if line is being debounced on interrupts. Can only be true with
205 edge-detection enabled.
206 -->
207 <property name='Debounced' type='b' access='read'/>
208
209 <!--
210 DebouncePeriodUs:
211
212 Debounce period in microseconds. 0 if the line is not debounced. Can
213 only be non-zero with edge-detection enabled.
214 -->
215 <property name='DebouncePeriodUs' type='t' access='read'/>
216
217 <!--
218 EventClock:
219
220 System clock used to timestamp edge events on this line. Returns:
221 "monotonic", "realtime", "hte" or "unknown". New types may be added in
222 the future. Clients should interpret other types they don't recognize as
223 "unknown".
224 -->
225 <property name='EventClock' type='s' access='read'/>
226
227 <!--
228 Managed:
229
230 True if the line is managed by gpio-manager.
231 -->
232 <property name='Managed' type='b' access='read'/>
233
234 <!--
235 RequestPath:
236
237 If this line is managed by gpio-manager then this property will contain
238 the DBus object path pointing to the managing request object.
239 -->
240 <property name='RequestPath' type='o' access='read'/>
241
242 <!--
243 EdgeEvent:
244 @event_data: Edge, timestamp and the global & line-local sequence numbers.
245
246 If the line is managed by the gpio-manager and is requested with edge
247 detection enabled then this signal will be emitted for every edge event
248 registered on this line.
249
250 D-Bus EdgeEvent signals are designed for low-to-medium frequency
251 interrupts. If you performance better than the order of tens of HZ, you
252 should probably access the line directly using the kernel uAPI.
253
254 The edge contains 1 for rising and 0 for falling. The timestamp is
255 expressed in nanoseconds.
256 -->
257 <signal name='EdgeEvent'>
258 <arg name='event_data' type='(ittt)'/>
259 </signal>
260
261 </interface>
262
263 <!--
264 io.gpiod1.Request:
265 @short_description: Represents a set of requested GPIO lines.
266 -->
267 <interface name='io.gpiod1.Request'>
268
269 <!--
270 ChipPath:
271
272 DBus object path pointing to the chip exposing the lines held by this
273 request.
274 -->
275 <property name='ChipPath' type='o' access='read'/>
276
277 <!--
278 LinePaths:
279
280 Array of DBus object paths pointing to the lines held by this request.
281 -->
282 <property name='LinePaths' type='ao' access='read'/>
283
284 <!--
285 Release:
286
287 Release the requested lines. After this method returns, the request
288 object on which it was called will be destroyed.
289 -->
290 <method name='Release'/>
291
292 <!--
293 ReconfigureLines:
294 @line_config: Line configuration.
295
296 Change the configuration of lines held by this request object without
297 releasing them.
298
299 Refer to the RequestLines method of the io.gpiod1.Chip interface for
300 details on line configuration.
301 -->
302 <method name='ReconfigureLines'>
303 <arg name='line_config' direction='in' type='(a(aua{sv})ai)'/>
304 </method>
305
306 <!--
307 GetValues:
308 @offsets: Array of line offsets within the request to read values for.
309 @values: Array of values in the order lines were specified in @offsets.
310
311 Read the values for a set of lines held by the request.
312 -->
313 <method name='GetValues'>
314 <arg name='offsets' direction='in' type='au'/>
315 <arg name='values' direction='out' type='ai'/>
316 </method>
317
318 <!--
319 SetValues:
320 @values: Array of mappings from line offsets to desired output values.
321
322 Set the values for a set of lines held by the request.
323 -->
324 <method name='SetValues'>
325 <arg name='values' direction='in' type='a{ui}'/>
326 </method>
327
328 </interface>
329
330 </node>