diff options
author | Sean Young <sean@mess.org> | 2017-02-25 06:51:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-14 10:35:15 -0500 |
commit | 9b6192589be788dec73a0e99fe49b8f8ddaf825e (patch) | |
tree | 0f2482fc765d53e274c58c2d0000168eaa493559 /README | |
parent | 4e3cd001fde13dfd4a91888f908b2a07fd0a4047 (diff) | |
download | talos-obmc-linux-9b6192589be788dec73a0e99fe49b8f8ddaf825e.tar.gz talos-obmc-linux-9b6192589be788dec73a0e99fe49b8f8ddaf825e.zip |
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 'README')
0 files changed, 0 insertions, 0 deletions