X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=protocol%2Fpjrc%2Fusb_keyboard.c;h=de798fcc229a72ad47ef9e7f7a5a7e51f4c4dadb;hb=897daee45604bcacc0b33b3fdc8a74f7160d7149;hp=49b85c179fb968f50f9a068e9b1c7ffcbe472c6b;hpb=3c822b511e7af60332a7e5a938c08bafb2516ba3;p=max%2Ftmk_keyboard.git diff --git a/protocol/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c index 49b85c17..de798fcc 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) #ifdef NKRO_ENABLE if (keyboard_nkro) - result = send_report(report, KBD2_ENDPOINT, 0, KBD2_REPORT_KEYS); + result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); else #endif { if (usb_keyboard_protocol) - result = send_report(report, KBD_ENDPOINT, 0, KBD_REPORT_KEYS); + result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE); else result = send_report(report, KBD_ENDPOINT, 0, 6); } @@ -104,15 +104,8 @@ static inline int8_t send_report(report_keyboard_t *report, uint8_t endpoint, ui cli(); UENUM = endpoint; } - UEDATX = report->mods; -#ifdef NKRO_ENABLE - if (!keyboard_nkro) - UEDATX = 0; -#else - UEDATX = 0; -#endif for (uint8_t i = keys_start; i < keys_end; i++) { - UEDATX = report->keys[i]; + UEDATX = report->raw[i]; } UEINTX = 0x3A; SREG = intr_state;