linux_dsm_epyc7002/include/media
Sean Young de142c3241 media: lirc: implement reading scancode
This implements LIRC_MODE_SCANCODE reading from the lirc device. The
scancode can be read from the input device too, but with this interface
you get the rc protocol, keycode, toggle and repeat status in addition
to just the scancode.

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

	mode = LIRC_MODE_SCANCODE;
	if (ioctl(fd, LIRC_SET_REC_MODE, &mode)) {
		// kernel too old or lirc does not support transmit
	}
	struct lirc_scancode scancode;
	while (read(fd, &scancode, sizeof(scancode)) == sizeof(scancode)) {
		printf("protocol:%d scancode:0x%x toggle:%d repeat:%d\n",
			scancode.rc_proto, scancode.scancode,
			!!(scancode.flags & LIRC_SCANCODE_FLAG_TOGGLE),
			!!(scancode.flags & LIRC_SCANCODE_FLAG_REPEAT));
	}
	close(fd);
}

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-14 10:35:20 -05:00
..
blackfin License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
davinci media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS 2017-07-26 06:14:33 -04:00
drv-intf media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
i2c media: rc: implement zilog transmitter 2017-12-14 09:58:20 -05:00
cec-notifier.h Linux 4.13-rc4 2017-08-08 05:38:41 -04:00
cec-pin.h media: cec-pin.h: move non-kAPI parts into cec-pin-priv.h 2017-10-27 14:02:19 +02:00
cec.h media: cec: disable the hardware when unregistered 2017-12-08 11:11:25 -05:00
i2c-addr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
imx.h
lirc.h
media-device.h media: media-device: remove driver_version 2017-08-08 06:02:22 -04:00
media-devnode.h
media-entity.h media: Make parameter of media_entity_remote_pad() const 2017-07-20 16:54:04 -04:00
rc-core.h media: lirc: implement reading scancode 2017-12-14 10:35:20 -05:00
rc-map.h media: lirc: implement scancode sending 2017-12-14 10:35:15 -05:00
rcar-fcp.h
soc_camera.h
tuner-types.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tuner.h
tveeprom.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-async.h media: v4l: fwnode: Add a convenience function for registering sensors 2017-10-31 14:03:15 -04:00
v4l2-clk.h media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
v4l2-common.h
v4l2-ctrls.h media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill 2017-08-20 08:11:40 -04:00
v4l2-dev.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-device.h
v4l2-dv-timings.h
v4l2-event.h
v4l2-fh.h
v4l2-flash-led-class.h media: v4l2-flash-led-class: Document v4l2_flash_init() references 2017-08-26 20:26:57 -04:00
v4l2-fwnode.h media: v4l2-fwnode: use a typedef for a function callback 2017-11-01 12:25:28 -04:00
v4l2-image-sizes.h
v4l2-ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-mc.h
v4l2-mediabus.h
v4l2-mem2mem.h
v4l2-rect.h
v4l2-subdev.h media: v4l: fwnode: Add a convenience function for registering sensors 2017-10-31 14:03:15 -04:00
v4l2-tpg-colors.h
v4l2-tpg.h
videobuf2-core.h media: vb2: add bidirectional flag in vb2_queue 2017-08-26 14:15:54 -04:00
videobuf2-dma-contig.h
videobuf2-dma-sg.h
videobuf2-dvb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
videobuf2-memops.h
videobuf2-v4l2.h
videobuf2-vmalloc.h
videobuf-core.h
videobuf-dma-contig.h
videobuf-dma-sg.h
videobuf-dvb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
videobuf-vmalloc.h
vsp1.h drm: rcar-du: Repair vblank for DRM page flips using the VSP 2017-08-03 16:17:30 +03:00