1.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/userspace-api/media/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. _lirc_get_rec_mode:
11.. _lirc_set_rec_mode:
12
13**********************************************
14ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
15**********************************************
16
17Name
18====
19
20LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
21
22Synopsis
23========
24
25.. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 *mode)
26	:name: LIRC_GET_REC_MODE
27
28.. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 *mode)
29	:name: LIRC_SET_REC_MODE
30
31Arguments
32=========
33
34``fd``
35    File descriptor returned by open().
36
37``mode``
38    Mode used for receive.
39
40Description
41===========
42
43Get and set the current receive mode. Only
44:ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
45:ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
46Use :ref:`lirc_get_features` to find out which modes the driver supports.
47
48Return Value
49============
50
51.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
52
53.. flat-table::
54    :header-rows:  0
55    :stub-columns: 0
56
57
58    -  .. row 1
59
60       -  ``ENODEV``
61
62       -  Device not available.
63
64    -  .. row 2
65
66       -  ``ENOTTY``
67
68       -  Device does not support receiving.
69
70    -  .. row 3
71
72       -  ``EINVAL``
73
74       -  Invalid mode or invalid mode for this device.
75