X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=pjrc%2Fusb.h;h=4f0fd8f1e838b98ccbc856ea5341984ca35c573e;hb=13e4662baee972a6df340bfabe5fcb8aa00646e3;hp=ee72a1e39fb0fb638abcb19b5b44b32f02738226;hpb=acc974c64b1e17e6807133fdc50de5bb34aedda5;p=max%2Ftmk_keyboard.git diff --git a/pjrc/usb.h b/pjrc/usb.h index ee72a1e3..4f0fd8f1 100644 --- a/pjrc/usb.h +++ b/pjrc/usb.h @@ -14,8 +14,6 @@ uint8_t usb_configured(void); // is the USB port configured void usb_remote_wakeup(void); - - #define EP_TYPE_CONTROL 0x00 #define EP_TYPE_BULK_IN 0x81 #define EP_TYPE_BULK_OUT 0x80 @@ -88,4 +86,23 @@ void usb_remote_wakeup(void); #define ENDPOINT_HALT 0 #define TEST_MODE 2 + +/*------------------------------------------------------------------* + * Keyboard descriptor setting + *------------------------------------------------------------------*/ +#define KBD_INTERFACE 0 +#define KBD_ENDPOINT 1 +#define KBD_SIZE 8 +#define KBD_BUFFER EP_DOUBLE_BUFFER +#define KBD_REPORT_KEYS (KBD_SIZE - 2) + +// secondary keyboard +#ifdef USB_NKRO_ENABLE +#define KBD2_INTERFACE 4 +#define KBD2_ENDPOINT 5 +#define KBD2_SIZE 16 +#define KBD2_BUFFER EP_DOUBLE_BUFFER +#define KBD2_REPORT_KEYS (KBD2_SIZE - 1) +#endif + #endif