summaryrefslogtreecommitdiff
path: root/drivers/media/rc/rc-core-priv.h
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-02-25 06:51:29 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 10:35:15 -0500
commit9b6192589be788dec73a0e99fe49b8f8ddaf825e (patch)
tree0f2482fc765d53e274c58c2d0000168eaa493559 /drivers/media/rc/rc-core-priv.h
parent4e3cd001fde13dfd4a91888f908b2a07fd0a4047 (diff)
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>
Diffstat (limited to 'drivers/media/rc/rc-core-priv.h')
-rw-r--r--drivers/media/rc/rc-core-priv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
index 564d6e13585e..d10fc998e1db 100644
--- a/drivers/media/rc/rc-core-priv.h
+++ b/drivers/media/rc/rc-core-priv.h
@@ -103,7 +103,7 @@ struct ir_raw_event_ctrl {
u64 gap_duration;
bool gap;
bool send_timeout_reports;
-
+ u8 send_mode;
} lirc;
struct xmp_dec {
int state;