lirc-get-rec-mode.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: RC
  3. .. _lirc_get_rec_mode:
  4. .. _lirc_set_rec_mode:
  5. **********************************************
  6. ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
  7. **********************************************
  8. Name
  9. ====
  10. LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
  11. Synopsis
  12. ========
  13. .. c:macro:: LIRC_GET_REC_MODE
  14. ``int ioctl(int fd, LIRC_GET_REC_MODE, __u32 *mode)``
  15. .. c:macro:: LIRC_SET_REC_MODE
  16. ``int ioctl(int fd, LIRC_SET_REC_MODE, __u32 *mode)``
  17. Arguments
  18. =========
  19. ``fd``
  20. File descriptor returned by open().
  21. ``mode``
  22. Mode used for receive.
  23. Description
  24. ===========
  25. Get and set the current receive mode. Only
  26. :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
  27. :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
  28. Use :ref:`lirc_get_features` to find out which modes the driver supports.
  29. Return Value
  30. ============
  31. .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
  32. .. flat-table::
  33. :header-rows: 0
  34. :stub-columns: 0
  35. - .. row 1
  36. - ``ENODEV``
  37. - Device not available.
  38. - .. row 2
  39. - ``ENOTTY``
  40. - Device does not support receiving.
  41. - .. row 3
  42. - ``EINVAL``
  43. - Invalid mode or invalid mode for this device.