0001 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: RC
0003
0004 .. _lirc_get_min_timeout:
0005 .. _lirc_get_max_timeout:
0006
0007 ****************************************************
0008 ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
0009 ****************************************************
0010
0011 Name
0012 ====
0013
0014 LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
0015 range for IR receive.
0016
0017 Synopsis
0018 ========
0019
0020 .. c:macro:: LIRC_GET_MIN_TIMEOUT
0021
0022 ``int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)``
0023
0024 .. c:macro:: LIRC_GET_MAX_TIMEOUT
0025
0026 ``int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)``
0027
0028 Arguments
0029 =========
0030
0031 ``fd``
0032 File descriptor returned by open().
0033
0034 ``timeout``
0035 Timeout, in microseconds.
0036
0037 Description
0038 ===========
0039
0040 Some devices have internal timers that can be used to detect when
0041 there's no IR activity for a long time. This can help lircd in
0042 detecting that a IR signal is finished and can speed up the decoding
0043 process. Returns an integer value with the minimum/maximum timeout
0044 that can be set.
0045
0046 .. note::
0047
0048 Some devices have a fixed timeout, in that case
0049 both ioctls will return the same value even though the timeout
0050 cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.
0051
0052 Return Value
0053 ============
0054
0055 On success 0 is returned, on error -1 and the ``errno`` variable is set
0056 appropriately. The generic error codes are described at the
0057 :ref:`Generic Error Codes <gen-errors>` chapter.