diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-29 15:19:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 12:19:48 -0300 |
commit | 2e3658836efad06662968bd6373c72df06c4b2f1 (patch) | |
tree | 50748b6a7a9cbcb2e0a7d44a59c65783a8fe6fa7 /drivers/media/dvb/dvb-usb/dvb-usb.h | |
parent | 715a223323c8c8bcbe7739e20f6c619f7343b595 (diff) | |
download | blackbird-op-linux-2e3658836efad06662968bd6373c72df06c4b2f1.tar.gz blackbird-op-linux-2e3658836efad06662968bd6373c72df06c4b2f1.zip |
V4L/DVB (12598): dvb-usb: store rc5 custom and data at the same field
In order to be closer to V4L IR implementation, it is needed to replace
u8 custom, data
to:
u16 scan
This allows using non-rc5 mappings, like the 8 bit keycodes used on older
protocols. It will also allow future implementations of rc6 keystrokes
when needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index e441d274e6c1..fe2b87efb3f1 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -81,10 +81,25 @@ struct dvb_usb_device_description { * @event: the input event assigned to key identified by custom and data */ struct dvb_usb_rc_key { - u8 custom,data; + u16 scan; u32 event; }; +static inline u8 rc5_custom(struct dvb_usb_rc_key *key) +{ + return (key->scan >> 8) & 0xff; +} + +static inline u8 rc5_data(struct dvb_usb_rc_key *key) +{ + return key->scan & 0xff; +} + +static inline u8 rc5_scan(struct dvb_usb_rc_key *key) +{ + return key->scan & 0xffff; +} + struct dvb_usb_device; struct dvb_usb_adapter; struct usb_data_stream; |