Files
kernel/include/uapi/linux
Sean Young 23d520c7b6 UPSTREAM: media: lirc: implement scancode sending
This introduces a new lirc mode: scancode. Any device which can send raw IR
can now also send scancodes.

int main()
{
	int mode, fd = open("/dev/lirc0", O_RDWR);

        mode = LIRC_MODE_SCANCODE;
	if (ioctl(fd, LIRC_SET_SEND_MODE, &mode)) {
		// kernel too old or lirc does not support transmit
	}
	struct lirc_scancode scancode = {
		.scancode = 0x1e3d,
		.rc_proto = RC_PROTO_RC5,
	};
	write(fd, &scancode, sizeof(scancode));
	close(fd);
}

The other fields of lirc_scancode must be set to 0.

Note that toggle (rc5, rc6) and repeats (nec) are not implemented. Nor is
there a method for holding down a key for a period.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 9b6192589b)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-12-10 20:36:24 +08:00
..
2017-12-05 11:22:51 +01:00
2017-06-21 15:13:01 +08:00
2018-05-20 16:40:16 +05:30
2016-05-19 12:35:13 +05:30
2017-06-19 15:09:00 +09:00
2018-04-29 07:50:02 +02:00
2017-02-03 15:04:29 +05:30
2018-03-05 21:58:40 +05:30
2015-12-04 08:38:42 -07:00