Lines Matching +full:read +full:- +full:to +full:- +full:read
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
4 .. _lirc-read:
7 LIRC read()
13 lirc-read - Read from a LIRC device
18 .. code-block:: c
22 .. c:function:: ssize_t read( int fd, void *buf, size_t count )
31 Buffer to be filled
34 Max number of bytes to read
39 :c:func:`read()` attempts to read up to ``count`` bytes from file
41 :c:func:`read()` returns zero and has no other results. If ``count``
45 uses. Use :ref:`lirc_get_features` to get the supported mode, and use
48 The mode :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` is for raw IR,
50 read from the chardev.
52 Alternatively, :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` can be available,
54 by hardware decoders. The :c:type:`rc_proto` member is set to the
56 used for transmission, and ``scancode`` to the decoded scancode,
57 and the ``keycode`` set to the keycode or ``KEY_RESERVED``.
62 On success, the number of bytes read is returned. It is not an error if
64 of data required for one frame. On error, -1 is returned, and the ``errno``