Diffstat (limited to 'libopie2/opiecore/linux_input.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/linux_input.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libopie2/opiecore/linux_input.h b/libopie2/opiecore/linux_input.h index b7a30bb..2df8a59 100644 --- a/libopie2/opiecore/linux_input.h +++ b/libopie2/opiecore/linux_input.h | |||
@@ -68,2 +68,3 @@ struct input_absinfo { | |||
68 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ | 68 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
69 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ | ||
69 | 70 | ||
@@ -88,2 +89,3 @@ struct input_absinfo { | |||
88 | #define EV_MSC 0x04 | 89 | #define EV_MSC 0x04 |
90 | #define EV_SW 0x05 | ||
89 | #define EV_LED 0x11 | 91 | #define EV_LED 0x11 |
@@ -523,2 +525,16 @@ struct input_absinfo { | |||
523 | /* | 525 | /* |
526 | * Switch events | ||
527 | */ | ||
528 | |||
529 | #define SW_0 0x00 | ||
530 | #define SW_1 0x01 | ||
531 | #define SW_2 0x02 | ||
532 | #define SW_3 0x03 | ||
533 | #define SW_4 0x04 | ||
534 | #define SW_5 0x05 | ||
535 | #define SW_6 0x06 | ||
536 | #define SW_7 0x07 | ||
537 | #define SW_MAX 0x0f | ||
538 | |||
539 | /* | ||
524 | * Misc events | 540 | * Misc events |
@@ -792,2 +808,3 @@ struct input_dev { | |||
792 | unsigned long ffbit[NBITS(FF_MAX)]; | 808 | unsigned long ffbit[NBITS(FF_MAX)]; |
809 | unsigned long swbit[NBITS(SW_MAX)]; | ||
793 | int ff_effects_max; | 810 | int ff_effects_max; |
@@ -813,2 +830,3 @@ struct input_dev { | |||
813 | unsigned long snd[NBITS(SND_MAX)]; | 830 | unsigned long snd[NBITS(SND_MAX)]; |
831 | unsigned long sw[NBITS(SW_MAX)]; | ||
814 | 832 | ||
@@ -851,2 +869,3 @@ struct input_dev { | |||
851 | #define INPUT_DEVICE_ID_MATCH_FFBIT0x800 | 869 | #define INPUT_DEVICE_ID_MATCH_FFBIT0x800 |
870 | #define INPUT_DEVICE_ID_MATCH_SWBIT0x1000 | ||
852 | 871 | ||
@@ -871,2 +890,3 @@ struct input_device_id { | |||
871 | unsigned long ffbit[NBITS(FF_MAX)]; | 890 | unsigned long ffbit[NBITS(FF_MAX)]; |
891 | unsigned long swbit[NBITS(SW_MAX)]; | ||
872 | 892 | ||
@@ -963,2 +983,7 @@ static inline void input_report_ff_status(struct input_dev *dev, unsigned int co | |||
963 | 983 | ||
984 | static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value) | ||
985 | { | ||
986 | input_event(dev, EV_SW, code, !!value); | ||
987 | } | ||
988 | |||
964 | static inline void input_regs(struct input_dev *dev, struct pt_regs *regs) | 989 | static inline void input_regs(struct input_dev *dev, struct pt_regs *regs) |