1 .. -*- coding: utf-8; mode: rst -*-
9 The LIRC device interface is a bi-directional interface for transporting
10 raw IR data between userspace and kernelspace. Fundamentally, it is just
11 a chardev (/dev/lircX, for X = 0, 1, 2, ...), with a number of standard
12 struct file_operations defined on it. With respect to transporting raw
13 IR data to and fro, the essential fops are read, write and ioctl.
15 Example dmesg output upon a driver registering w/LIRC:
19 $ dmesg |grep lirc_dev
20 lirc_dev: IR Remote Control driver registered, major 248
21 rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
23 What you should see for a chardev:
28 crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0
34 LIRC supports some modes of receiving and sending IR codes, as shown
35 on the following table.
41 The driver returns a sequence of pulse and space codes to userspace.
43 This mode is used only for IR receive.
45 .. _lirc-mode-lirccode:
47 ``LIRC_MODE_LIRCCODE``
49 The IR signal is decoded internally by the receiver. The LIRC interface
50 returns the scancode as an integer value. This is the usual mode used
51 by several TV media cards.
53 This mode is used only for IR receive.
59 On puse mode, a sequence of pulse/space integer values are written to the
60 lirc device using :Ref:`lirc-write`.
62 This mode is used only for IR send.