aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile28
-rw-r--r--quantum/keymap_extras/keymap_dvorak.h15
-rw-r--r--quantum/keymap_extras/keymap_fr_ch.h2
-rw-r--r--quantum/keymap_extras/keymap_french.h4
-rw-r--r--quantum/keymap_extras/keymap_german.h2
-rw-r--r--quantum/keymap_extras/keymap_german_ch.h2
-rw-r--r--quantum/keymap_extras/keymap_nordic.h2
-rw-r--r--quantum/keymap_extras/keymap_spanish.h2
-rw-r--r--quantum/keymap_extras/keymap_uk.h4
-rw-r--r--quantum/process_keycode/process_tap_dance.c52
-rw-r--r--quantum/process_keycode/process_tap_dance.h19
-rw-r--r--readme.md63
-rw-r--r--tmk_core/avr.mk4
-rw-r--r--tmk_core/protocol/lufa/descriptor.c4
14 files changed, 172 insertions, 31 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..96ace4ec6
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
1FROM debian:jessie
2MAINTAINER Erik Dasque <erik@frenchguys.com>
3
4RUN apt-get update
5RUN apt-get install --no-install-recommends -y build-essential \
6 gcc \
7 unzip \
8 wget \
9 zip \
10 gcc-avr \
11 binutils-avr \
12 avr-libc \
13 dfu-programmer \
14 dfu-util \
15 gcc-arm-none-eabi \
16 binutils-arm-none-eabi \
17 libnewlib-arm-none-eabi \
18 git
19
20RUN apt-get clean
21RUN rm -rf /var/lib/apt/lists/*
22
23ENV keyboard=ergodox_ez
24ENV keymap=default
25
26VOLUME /qmk
27WORKDIR /qmk
28CMD make clean ; make keyboard=${keyboard} keymap=${keymap} \ No newline at end of file
diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h
index e855056e8..17f205977 100644
--- a/quantum/keymap_extras/keymap_dvorak.h
+++ b/quantum/keymap_extras/keymap_dvorak.h
@@ -18,18 +18,19 @@
18#define DV_LBRC KC_MINS 18#define DV_LBRC KC_MINS
19#define DV_RBRC KC_EQL 19#define DV_RBRC KC_EQL
20 20
21#define DV_QUOT KC_Q 21#define DV_QUOT KC_Q
22#define DV_COMM KC_W 22#define DV_COMM KC_W
23#define DV_DOT KC_E 23#define DV_DOT KC_E
24#define DV_P KC_R 24#define DV_P KC_R
25#define DV_Y KC_T 25#define DV_Y KC_T
26#define DV_F KC_Y 26#define DV_F KC_Y
27#define DV_G KC_U 27#define DV_G KC_U
28#define DV_C KC_I 28#define DV_C KC_I
29#define DV_R KC_O 29#define DV_R KC_O
30#define DV_L KC_P 30#define DV_L KC_P
31#define DV_SLSH KC_LBRC 31#define DV_SLSH KC_LBRC
32#define DV_EQL KC_RBRC 32#define DV_EQL KC_RBRC
33#define DV_BSLS KC_BSLS
33 34
34#define DV_A KC_A 35#define DV_A KC_A
35#define DV_O KC_S 36#define DV_O KC_S
@@ -68,7 +69,13 @@
68#define DV_RPRN LSFT(DV_0) 69#define DV_RPRN LSFT(DV_0)
69#define DV_LCBR LSFT(DV_LBRC) 70#define DV_LCBR LSFT(DV_LBRC)
70#define DV_RCBR LSFT(DV_RBRC) 71#define DV_RCBR LSFT(DV_RBRC)
71#define DV_UNDS LSFT(DV_MINS) 72
72#define DV_PLUS LSFT(DV_EQL) 73#define DV_QUES LSFT(DV_SLSH)
74#define DV_PLUS LSFT(DV_EQL)
75#define DV_PIPE LSFT(DV_BSLS)
76
77#define DV_UNDS LSFT(DV_MINS)
78
79#define DV_COLN LSFT(DV_SCLN)
73 80
74#endif 81#endif
diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h
index 3fd971357..87d4bb24c 100644
--- a/quantum/keymap_extras/keymap_fr_ch.h
+++ b/quantum/keymap_extras/keymap_fr_ch.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define FR_CH_ALGR KC_RALT 8#define FR_CH_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h
index 2a44c80b1..834c69650 100644
--- a/quantum/keymap_extras/keymap_french.h
+++ b/quantum/keymap_extras/keymap_french.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
@@ -80,4 +80,4 @@
80#define FR_EURO ALGR(KC_E) 80#define FR_EURO ALGR(KC_E)
81#define FR_BULT ALGR(FR_DLR) 81#define FR_BULT ALGR(FR_DLR)
82 82
83#endif \ No newline at end of file 83#endif
diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h
index 3f9ae8bad..7e2e0ed44 100644
--- a/quantum/keymap_extras/keymap_german.h
+++ b/quantum/keymap_extras/keymap_german.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define DE_ALGR KC_RALT 8#define DE_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h
index 6a782bcd7..b66d582a4 100644
--- a/quantum/keymap_extras/keymap_german_ch.h
+++ b/quantum/keymap_extras/keymap_german_ch.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define CH_ALGR KC_RALT 8#define CH_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h
index 3acb8b698..f8cf4e2e4 100644
--- a/quantum/keymap_extras/keymap_nordic.h
+++ b/quantum/keymap_extras/keymap_nordic.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h
index af76e39fc..4ba568af2 100644
--- a/quantum/keymap_extras/keymap_spanish.h
+++ b/quantum/keymap_extras/keymap_spanish.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h
index 5c5d95179..00c87afc3 100644
--- a/quantum/keymap_extras/keymap_uk.h
+++ b/quantum/keymap_extras/keymap_uk.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
@@ -33,4 +33,4 @@
33 33
34#define UK_AACT ALGR(KC_A) 34#define UK_AACT ALGR(KC_A)
35 35
36#endif \ No newline at end of file 36#endif
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 9b172e1b6..b9b836df2 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -22,10 +22,29 @@ static void _process_tap_dance_action_pair (qk_tap_dance_state_t *state,
22static void _process_tap_dance_action_fn (qk_tap_dance_state_t *state, 22static void _process_tap_dance_action_fn (qk_tap_dance_state_t *state,
23 qk_tap_dance_user_fn_t fn) 23 qk_tap_dance_user_fn_t fn)
24{ 24{
25 fn(state); 25 if (fn) {
26 fn(state);
27 }
28}
29
30void process_tap_dance_action_on_each_tap (uint16_t keycode)
31{
32 uint16_t idx = keycode - QK_TAP_DANCE;
33 qk_tap_dance_action_t action;
34
35 action = tap_dance_actions[idx];
36
37 switch (action.type) {
38 case QK_TAP_DANCE_TYPE_FN:
39 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn.on_each_tap);
40 break;
41
42 default:
43 break;
44 }
26} 45}
27 46
28void process_tap_dance_action (uint16_t keycode) 47void process_tap_dance_action_on_dance_finished (uint16_t keycode)
29{ 48{
30 uint16_t idx = keycode - QK_TAP_DANCE; 49 uint16_t idx = keycode - QK_TAP_DANCE;
31 qk_tap_dance_action_t action; 50 qk_tap_dance_action_t action;
@@ -38,7 +57,7 @@ void process_tap_dance_action (uint16_t keycode)
38 action.pair.kc1, action.pair.kc2); 57 action.pair.kc1, action.pair.kc2);
39 break; 58 break;
40 case QK_TAP_DANCE_TYPE_FN: 59 case QK_TAP_DANCE_TYPE_FN:
41 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn); 60 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn.on_dance_finished);
42 break; 61 break;
43 62
44 default: 63 default:
@@ -51,8 +70,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
51 70
52 switch(keycode) { 71 switch(keycode) {
53 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: 72 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
73 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
54 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) { 74 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) {
55 process_tap_dance_action (qk_tap_dance_state.keycode); 75 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
56 } else { 76 } else {
57 r = false; 77 r = false;
58 } 78 }
@@ -66,8 +86,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
66 86
67 default: 87 default:
68 if (qk_tap_dance_state.keycode) { 88 if (qk_tap_dance_state.keycode) {
69 process_tap_dance_action (qk_tap_dance_state.keycode); 89 // if we are here, the tap dance was interrupted by a different key
70 90 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
91 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
71 reset_tap_dance (&qk_tap_dance_state); 92 reset_tap_dance (&qk_tap_dance_state);
72 } 93 }
73 break; 94 break;
@@ -78,13 +99,28 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
78 99
79void matrix_scan_tap_dance () { 100void matrix_scan_tap_dance () {
80 if (qk_tap_dance_state.keycode && timer_elapsed (qk_tap_dance_state.timer) > TAPPING_TERM) { 101 if (qk_tap_dance_state.keycode && timer_elapsed (qk_tap_dance_state.timer) > TAPPING_TERM) {
81 process_tap_dance_action (qk_tap_dance_state.keycode); 102 // if we are here, the tap dance was timed out
82 103 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
83 reset_tap_dance (&qk_tap_dance_state); 104 reset_tap_dance (&qk_tap_dance_state);
84 } 105 }
85} 106}
86 107
87void reset_tap_dance (qk_tap_dance_state_t *state) { 108void reset_tap_dance (qk_tap_dance_state_t *state) {
109 uint16_t idx = state->keycode - QK_TAP_DANCE;
110 qk_tap_dance_action_t action;
111
112 action = tap_dance_actions[idx];
113 switch (action.type) {
114 case QK_TAP_DANCE_TYPE_FN:
115 if (action.fn.on_reset) {
116 action.fn.on_reset(state);
117 }
118 break;
119
120 default:
121 break;
122 }
123
88 state->keycode = 0; 124 state->keycode = 0;
89 state->count = 0; 125 state->count = 0;
90} 126}
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index b9d7c7fcf..7b820584a 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -31,18 +31,27 @@ typedef struct
31 uint16_t kc1; 31 uint16_t kc1;
32 uint16_t kc2; 32 uint16_t kc2;
33 } pair; 33 } pair;
34 qk_tap_dance_user_fn_t fn; 34 struct {
35 qk_tap_dance_user_fn_t on_each_tap;
36 qk_tap_dance_user_fn_t on_dance_finished;
37 qk_tap_dance_user_fn_t on_reset;
38 } fn;
35 }; 39 };
36} qk_tap_dance_action_t; 40} qk_tap_dance_action_t;
37 41
38#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ 42#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \
39 .type = QK_TAP_DANCE_TYPE_PAIR, \ 43 .type = QK_TAP_DANCE_TYPE_PAIR, \
40 .pair = { kc1, kc2 } \ 44 .pair = { kc1, kc2 } \
41 } 45 }
42 46
43#define ACTION_TAP_DANCE_FN(user_fn) { \ 47#define ACTION_TAP_DANCE_FN(user_fn) { \
44 .type = QK_TAP_DANCE_TYPE_FN, \ 48 .type = QK_TAP_DANCE_TYPE_FN, \
45 .fn = user_fn \ 49 .fn = { NULL, user_fn, NULL } \
50 }
51
52#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \
53 .type = QK_TAP_DANCE_TYPE_FN, \
54 .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \
46 } 55 }
47 56
48extern const qk_tap_dance_action_t tap_dance_actions[]; 57extern const qk_tap_dance_action_t tap_dance_actions[];
diff --git a/readme.md b/readme.md
index e0dcd5608..bdea197f5 100644
--- a/readme.md
+++ b/readme.md
@@ -75,6 +75,21 @@ Debian/Ubuntu example:
75 sudo apt-get update 75 sudo apt-get update
76 sudo apt-get install gcc-avr avr-libc dfu-programmer 76 sudo apt-get install gcc-avr avr-libc dfu-programmer
77 77
78### Docker
79
80If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
81
82```bash
83# You'll run this every time you want to build a keymap
84# modify the keymap and keyboard assigment to compile what you want
85# defaults are ergodox_ez/default
86
87docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
88
89```
90
91This will compile the targetted keyboard/keymap and leave it in your QMK directory for you to flash.
92
78### Vagrant 93### Vagrant
79If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). 94If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
80 95
@@ -372,10 +387,11 @@ But lets start with how to use it, first!
372 387
373First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. 388First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
374 389
375This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are two possible options: 390This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
376 391
377* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. 392* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise.
378* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the current state of the tap-dance action. 393* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
394* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
379 395
380The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. 396The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
381 397
@@ -399,7 +415,8 @@ In the end, let's see a full example!
399enum { 415enum {
400 CT_SE = 0, 416 CT_SE = 0,
401 CT_CLN, 417 CT_CLN,
402 CT_EGG 418 CT_EGG,
419 CT_FLSH,
403}; 420};
404 421
405/* Have the above three on the keymap, TD(CT_SE), etc... */ 422/* Have the above three on the keymap, TD(CT_SE), etc... */
@@ -424,10 +441,50 @@ void dance_egg (qk_tap_dance_state_t *state) {
424 } 441 }
425} 442}
426 443
444// on each tap, light up one led, from right to left
445// on the forth tap, turn them off from right to left
446void dance_flsh_each(qk_tap_dance_state_t *state) {
447 switch (state->count) {
448 case 1:
449 ergodox_right_led_3_on();
450 break;
451 case 2:
452 ergodox_right_led_2_on();
453 break;
454 case 3:
455 ergodox_right_led_1_on();
456 break;
457 case 4:
458 ergodox_right_led_3_off();
459 _delay_ms(50);
460 ergodox_right_led_2_off();
461 _delay_ms(50);
462 ergodox_right_led_1_off();
463 }
464}
465
466// on the fourth tap, set the keyboard on flash state
467void dance_flsh_finished(qk_tap_dance_state_t *state) {
468 if (state->count >= 4) {
469 reset_keyboard();
470 reset_tap_dance(state);
471 }
472}
473
474// if the flash state didnt happen, then turn off leds, left to right
475void dance_flsh_reset(qk_tap_dance_state_t *state) {
476 ergodox_right_led_1_off();
477 _delay_ms(50);
478 ergodox_right_led_2_off();
479 _delay_ms(50);
480 ergodox_right_led_3_off();
481}
482
427const qk_tap_dance_action_t tap_dance_actions[] = { 483const qk_tap_dance_action_t tap_dance_actions[] = {
428 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) 484 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
429 ,[CT_CLN] = ACTION_TAP_DANCE_FN (dance_cln) 485 ,[CT_CLN] = ACTION_TAP_DANCE_FN (dance_cln)
430 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) 486 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
487 ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
431}; 488};
432``` 489```
433 490
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 3bf2b34f8..6c03e1650 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -107,6 +107,10 @@ flip: $(BUILD_DIR)/$(TARGET).hex
107 batchisp -hardware usb -device $(MCU) -operation start reset 0 107 batchisp -hardware usb -device $(MCU) -operation start reset 0
108 108
109dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter 109dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter
110 until dfu-programmer $(MCU) get bootloader-version; do\
111 echo "Error: Bootloader not found. Trying again in 5s." ;\
112 sleep 5 ;\
113 done
110ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) 114ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
111 dfu-programmer $(MCU) erase --force 115 dfu-programmer $(MCU) erase --force
112else 116else
diff --git a/tmk_core/protocol/lufa/descriptor.c b/tmk_core/protocol/lufa/descriptor.c
index 850a20fdb..539a58d66 100644
--- a/tmk_core/protocol/lufa/descriptor.c
+++ b/tmk_core/protocol/lufa/descriptor.c
@@ -140,9 +140,9 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM ExtrakeyReport[] =
140 HID_RI_USAGE(8, 0x80), /* System Control */ 140 HID_RI_USAGE(8, 0x80), /* System Control */
141 HID_RI_COLLECTION(8, 0x01), /* Application */ 141 HID_RI_COLLECTION(8, 0x01), /* Application */
142 HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM), 142 HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM),
143 HID_RI_LOGICAL_MINIMUM(16, 0x0001), 143 HID_RI_LOGICAL_MINIMUM(16, 0x0081),
144 HID_RI_LOGICAL_MAXIMUM(16, 0x00B7), 144 HID_RI_LOGICAL_MAXIMUM(16, 0x00B7),
145 HID_RI_USAGE_MINIMUM(16, 0x0001), /* System Power Down */ 145 HID_RI_USAGE_MINIMUM(16, 0x0081), /* System Power Down */
146 HID_RI_USAGE_MAXIMUM(16, 0x00B7), /* System Display LCD Autoscale */ 146 HID_RI_USAGE_MAXIMUM(16, 0x00B7), /* System Display LCD Autoscale */
147 HID_RI_REPORT_SIZE(8, 16), 147 HID_RI_REPORT_SIZE(8, 16),
148 HID_RI_REPORT_COUNT(8, 1), 148 HID_RI_REPORT_COUNT(8, 1),