lirc-set-transmitter-mask.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: RC
  3. .. _lirc_set_transmitter_mask:
  4. *******************************
  5. ioctl LIRC_SET_TRANSMITTER_MASK
  6. *******************************
  7. Name
  8. ====
  9. LIRC_SET_TRANSMITTER_MASK - Enables send codes on a given set of transmitters
  10. Synopsis
  11. ========
  12. .. c:macro:: LIRC_SET_TRANSMITTER_MASK
  13. ``int ioctl(int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask)``
  14. Arguments
  15. =========
  16. ``fd``
  17. File descriptor returned by open().
  18. ``mask``
  19. Mask with channels to enable tx. Channel 0 is the least significant bit.
  20. Description
  21. ===========
  22. Some IR TX devices have multiple output channels, in such case,
  23. :ref:`LIRC_CAN_SET_TRANSMITTER_MASK <LIRC-CAN-SET-TRANSMITTER-MASK>` is
  24. returned via :ref:`LIRC_GET_FEATURES` and this ioctl sets what channels will
  25. send IR codes.
  26. This ioctl enables the given set of transmitters. The first transmitter is
  27. encoded by the least significant bit and so on.
  28. When an invalid bit mask is given, i.e. a bit is set, even though the device
  29. does not have so many transitters, then this ioctl returns the number of
  30. available transitters and does nothing otherwise.
  31. Return Value
  32. ============
  33. On success 0 is returned, on error -1 and the ``errno`` variable is set
  34. appropriately. The generic error codes are described at the
  35. :ref:`Generic Error Codes <gen-errors>` chapter.