lirc-get-timeout.rst 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: RC
  3. .. _lirc_get_min_timeout:
  4. .. _lirc_get_max_timeout:
  5. ****************************************************
  6. ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
  7. ****************************************************
  8. Name
  9. ====
  10. LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
  11. range for IR receive.
  12. Synopsis
  13. ========
  14. .. c:macro:: LIRC_GET_MIN_TIMEOUT
  15. ``int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)``
  16. .. c:macro:: LIRC_GET_MAX_TIMEOUT
  17. ``int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)``
  18. Arguments
  19. =========
  20. ``fd``
  21. File descriptor returned by open().
  22. ``timeout``
  23. Timeout, in microseconds.
  24. Description
  25. ===========
  26. Some devices have internal timers that can be used to detect when
  27. there's no IR activity for a long time. This can help lircd in
  28. detecting that a IR signal is finished and can speed up the decoding
  29. process. Returns an integer value with the minimum/maximum timeout
  30. that can be set.
  31. .. note::
  32. Some devices have a fixed timeout, in that case
  33. both ioctls will return the same value even though the timeout
  34. cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.
  35. Return Value
  36. ============
  37. On success 0 is returned, on error -1 and the ``errno`` variable is set
  38. appropriately. The generic error codes are described at the
  39. :ref:`Generic Error Codes <gen-errors>` chapter.