#include <avr/interrupt.h>
#include <avr/pgmspace.h>
-#include "usb_keycodes.h"
+#include "keycode.h"
#include "usb_keyboard.h"
#include "print.h"
#include "debug.h"
// protocol setting from the host. We use exactly the same report
// either way, so this variable only stores the setting since we
// are required to be able to report which setting is in use.
-uint8_t usb_keyboard_protocol=1;
+uint8_t keyboard_protocol=1;
// the idle configuration, how often we send the report to the
// host (ms * 4) even when it hasn't changed
// Windows and Linux set 0 while OS X sets 6(24ms) by SET_IDLE request.
-uint8_t usb_keyboard_idle_config=125;
+uint8_t keyobard_idle=125;
// count until idle timeout
uint8_t usb_keyboard_idle_count=0;
#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);
- else
- result = send_report(report, KBD_ENDPOINT, 0, 6);
+ result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE);
}
if (result) return result;
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;