GNU Linux-libre 4.14.266-gnu1
[releases.git] / Documentation / media / uapi / rc / lirc-get-send-mode.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _lirc_get_send_mode:
4 .. _lirc_set_send_mode:
5
6 ************************************************
7 ioctls LIRC_GET_SEND_MODE and LIRC_SET_SEND_MODE
8 ************************************************
9
10 Name
11 ====
12
13 LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set supported transmit mode.
14
15 Synopsis
16 ========
17
18 .. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *tx_modes )
19     :name: LIRC_GET_SEND_MODE
20
21 .. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *tx_modes )
22     :name: LIRC_SET_SEND_MODE
23
24 Arguments
25 =========
26
27 ``fd``
28     File descriptor returned by open().
29
30 ``tx_modes``
31     Bitmask with the supported transmit modes.
32
33
34 Description
35 ===========
36
37 Get/set current transmit mode.
38
39 Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` and
40 :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` is supported by for IR send,
41 depending on the driver. Use :ref:`lirc_get_features` to find out which
42 modes the driver supports.
43
44 Return Value
45 ============
46
47 On success 0 is returned, on error -1 and the ``errno`` variable is set
48 appropriately. The generic error codes are described at the
49 :ref:`Generic Error Codes <gen-errors>` chapter.