diff options
author | tmk <nobody@nowhere> | 2011-02-12 16:15:51 +0100 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-02-21 19:09:05 +0100 |
commit | 9a938eecbd2b70c970992583b5c16da717d8e254 (patch) | |
tree | 22ac37491f88aa60d917a18696c93f61a429d43c /pjrc/usb.h | |
parent | 2b8cd88ab142068eed0a3f230a3de79deb567536 (diff) | |
download | qmk_firmware-9a938eecbd2b70c970992583b5c16da717d8e254.tar.gz qmk_firmware-9a938eecbd2b70c970992583b5c16da717d8e254.tar.xz |
host interface for pjrc
Diffstat (limited to 'pjrc/usb.h')
-rw-r--r-- | pjrc/usb.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pjrc/usb.h b/pjrc/usb.h index ee72a1e39..4f0fd8f1e 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 |