diff options
| author | tmk <nobody@nowhere> | 2013-07-28 17:34:41 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-07-28 17:34:41 +0900 |
| commit | daa4a4235fd4a88b3b6f64e4a2cf590f28f4b65b (patch) | |
| tree | 91d6c2de3f98bf11e85868c6cd4802f05a55e60e /protocol/pjrc/usb_keyboard.c | |
| parent | c7d309e34bf5d05f245811389bea495d814e2111 (diff) | |
| download | qmk_firmware-daa4a4235fd4a88b3b6f64e4a2cf590f28f4b65b.tar.gz qmk_firmware-daa4a4235fd4a88b3b6f64e4a2cf590f28f4b65b.zip | |
Add NKRO support for LUFA
Diffstat (limited to 'protocol/pjrc/usb_keyboard.c')
| -rw-r--r-- | protocol/pjrc/usb_keyboard.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/protocol/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c index 49b85c179..de798fcc2 100644 --- a/protocol/pjrc/usb_keyboard.c +++ b/protocol/pjrc/usb_keyboard.c | |||
| @@ -57,12 +57,12 @@ int8_t usb_keyboard_send_report(report_keyboard_t *report) | |||
| 57 | 57 | ||
| 58 | #ifdef NKRO_ENABLE | 58 | #ifdef NKRO_ENABLE |
| 59 | if (keyboard_nkro) | 59 | if (keyboard_nkro) |
| 60 | result = send_report(report, KBD2_ENDPOINT, 0, KBD2_REPORT_KEYS); | 60 | result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); |
| 61 | else | 61 | else |
| 62 | #endif | 62 | #endif |
| 63 | { | 63 | { |
| 64 | if (usb_keyboard_protocol) | 64 | if (usb_keyboard_protocol) |
| 65 | result = send_report(report, KBD_ENDPOINT, 0, KBD_REPORT_KEYS); | 65 | result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE); |
| 66 | else | 66 | else |
| 67 | result = send_report(report, KBD_ENDPOINT, 0, 6); | 67 | result = send_report(report, KBD_ENDPOINT, 0, 6); |
| 68 | } | 68 | } |
| @@ -104,15 +104,8 @@ static inline int8_t send_report(report_keyboard_t *report, uint8_t endpoint, ui | |||
| 104 | cli(); | 104 | cli(); |
| 105 | UENUM = endpoint; | 105 | UENUM = endpoint; |
| 106 | } | 106 | } |
| 107 | UEDATX = report->mods; | ||
| 108 | #ifdef NKRO_ENABLE | ||
| 109 | if (!keyboard_nkro) | ||
| 110 | UEDATX = 0; | ||
| 111 | #else | ||
| 112 | UEDATX = 0; | ||
| 113 | #endif | ||
| 114 | for (uint8_t i = keys_start; i < keys_end; i++) { | 107 | for (uint8_t i = keys_start; i < keys_end; i++) { |
| 115 | UEDATX = report->keys[i]; | 108 | UEDATX = report->raw[i]; |
| 116 | } | 109 | } |
| 117 | UEINTX = 0x3A; | 110 | UEINTX = 0x3A; |
| 118 | SREG = intr_state; | 111 | SREG = intr_state; |
