lirc-get-features.rst 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: RC
  3. .. _lirc_get_features:
  4. ***********************
  5. ioctl LIRC_GET_FEATURES
  6. ***********************
  7. Name
  8. ====
  9. LIRC_GET_FEATURES - Get the underlying hardware device's features
  10. Synopsis
  11. ========
  12. .. c:macro:: LIRC_GET_FEATURES
  13. ``int ioctl(int fd, LIRC_GET_FEATURES, __u32 *features)``
  14. Arguments
  15. =========
  16. ``fd``
  17. File descriptor returned by open().
  18. ``features``
  19. Bitmask with the LIRC features.
  20. Description
  21. ===========
  22. Get the underlying hardware device's features. If a driver does not
  23. announce support of certain features, calling of the corresponding ioctls
  24. is undefined.
  25. LIRC features
  26. =============
  27. .. _LIRC-CAN-REC-RAW:
  28. ``LIRC_CAN_REC_RAW``
  29. Unused. Kept just to avoid breaking uAPI.
  30. .. _LIRC-CAN-REC-PULSE:
  31. ``LIRC_CAN_REC_PULSE``
  32. Unused. Kept just to avoid breaking uAPI.
  33. :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` can only be used for transmitting.
  34. .. _LIRC-CAN-REC-MODE2:
  35. ``LIRC_CAN_REC_MODE2``
  36. This is raw IR driver for receiving. This means that
  37. :ref:`LIRC_MODE_MODE2 <lirc-mode-MODE2>` is used. This also implies
  38. that :ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is also supported,
  39. as long as the kernel is recent enough. Use the
  40. :ref:`lirc_set_rec_mode` to switch modes.
  41. .. _LIRC-CAN-REC-LIRCCODE:
  42. ``LIRC_CAN_REC_LIRCCODE``
  43. Unused. Kept just to avoid breaking uAPI.
  44. .. _LIRC-CAN-REC-SCANCODE:
  45. ``LIRC_CAN_REC_SCANCODE``
  46. This is a scancode driver for receiving. This means that
  47. :ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is used.
  48. .. _LIRC-CAN-SET-SEND-CARRIER:
  49. ``LIRC_CAN_SET_SEND_CARRIER``
  50. The driver supports changing the modulation frequency via
  51. :ref:`ioctl LIRC_SET_SEND_CARRIER <LIRC_SET_SEND_CARRIER>`.
  52. .. _LIRC-CAN-SET-SEND-DUTY-CYCLE:
  53. ``LIRC_CAN_SET_SEND_DUTY_CYCLE``
  54. The driver supports changing the duty cycle using
  55. :ref:`ioctl LIRC_SET_SEND_DUTY_CYCLE <LIRC_SET_SEND_DUTY_CYCLE>`.
  56. .. _LIRC-CAN-SET-TRANSMITTER-MASK:
  57. ``LIRC_CAN_SET_TRANSMITTER_MASK``
  58. The driver supports changing the active transmitter(s) using
  59. :ref:`ioctl LIRC_SET_TRANSMITTER_MASK <LIRC_SET_TRANSMITTER_MASK>`.
  60. .. _LIRC-CAN-SET-REC-CARRIER:
  61. ``LIRC_CAN_SET_REC_CARRIER``
  62. The driver supports setting the receive carrier frequency using
  63. :ref:`ioctl LIRC_SET_REC_CARRIER <LIRC_SET_REC_CARRIER>`.
  64. .. _LIRC-CAN-SET-REC-CARRIER-RANGE:
  65. ``LIRC_CAN_SET_REC_CARRIER_RANGE``
  66. The driver supports
  67. :ref:`ioctl LIRC_SET_REC_CARRIER_RANGE <LIRC_SET_REC_CARRIER_RANGE>`.
  68. .. _LIRC-CAN-GET-REC-RESOLUTION:
  69. ``LIRC_CAN_GET_REC_RESOLUTION``
  70. The driver supports
  71. :ref:`ioctl LIRC_GET_REC_RESOLUTION <LIRC_GET_REC_RESOLUTION>`.
  72. .. _LIRC-CAN-SET-REC-TIMEOUT:
  73. ``LIRC_CAN_SET_REC_TIMEOUT``
  74. The driver supports
  75. :ref:`ioctl LIRC_SET_REC_TIMEOUT <LIRC_SET_REC_TIMEOUT>`.
  76. .. _LIRC-CAN-MEASURE-CARRIER:
  77. ``LIRC_CAN_MEASURE_CARRIER``
  78. The driver supports measuring of the modulation frequency using
  79. :ref:`ioctl LIRC_SET_MEASURE_CARRIER_MODE <LIRC_SET_MEASURE_CARRIER_MODE>`.
  80. .. _LIRC-CAN-USE-WIDEBAND-RECEIVER:
  81. ``LIRC_CAN_USE_WIDEBAND_RECEIVER``
  82. The driver supports learning mode using
  83. :ref:`ioctl LIRC_SET_WIDEBAND_RECEIVER <LIRC_SET_WIDEBAND_RECEIVER>`.
  84. .. _LIRC-CAN-SEND-RAW:
  85. ``LIRC_CAN_SEND_RAW``
  86. Unused. Kept just to avoid breaking uAPI.
  87. .. _LIRC-CAN-SEND-PULSE:
  88. ``LIRC_CAN_SEND_PULSE``
  89. The driver supports sending (also called as IR blasting or IR TX) using
  90. :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>`. This implies that
  91. :ref:`LIRC_MODE_SCANCODE <lirc-mode-SCANCODE>` is also supported for
  92. transmit, as long as the kernel is recent enough. Use the
  93. :ref:`lirc_set_send_mode` to switch modes.
  94. .. _LIRC-CAN-SEND-MODE2:
  95. ``LIRC_CAN_SEND_MODE2``
  96. Unused. Kept just to avoid breaking uAPI.
  97. :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` can only be used for receiving.
  98. .. _LIRC-CAN-SEND-LIRCCODE:
  99. ``LIRC_CAN_SEND_LIRCCODE``
  100. Unused. Kept just to avoid breaking uAPI.
  101. Return Value
  102. ============
  103. On success 0 is returned, on error -1 and the ``errno`` variable is set
  104. appropriately. The generic error codes are described at the
  105. :ref:`Generic Error Codes <gen-errors>` chapter.