Lines Matching +full:read +full:- +full:to +full:- +full:read
1 .. SPDX-License-Identifier: GPL-2.0
12 GPIO_V2_LINE_EVENT_READ - Read edge detection events for lines from a request.
17 ``int read(int req_fd, void *buf, size_t count)``
24 :c:type:`request.fd<gpio_v2_line_request>` by gpio-v2-get-line-ioctl.rst.
27 The buffer to contain the :c:type:`events<gpio_v2_line_event>`.
36 Read edge detection events for lines from a request.
43 Edges are defined in terms of changes to the logical line value, so an inactive
44 to active transition is a rising edge. If ``GPIO_V2_LINE_FLAG_ACTIVE_LOW`` is
46 ``GPIO_V2_LINE_FLAG_EDGE_RISING`` then corresponds to a falling physical edge.
48 The kernel captures and timestamps edge events as close as possible to their
49 occurrence and stores them in a buffer from where they can be read by
50 userspace at its convenience using `read()`.
52 Events read from the buffer are always in the same order that they were
61 The buffer may overflow if bursts of events occur quicker than they are read
66 To minimize the number of calls required to copy events from the kernel to
67 userspace, `read()` supports copying multiple events. The number of events
71 Changing the edge detection flags using gpio-v2-line-set-config-ioctl.rst
75 The `read()` will block if no event is available and the ``req_fd`` has not
84 On success the number of bytes read, which will be a multiple of the size of a
87 On error -1 and the ``errno`` variable is set appropriately.
88 Common error codes are described in error-codes.rst.