summaryrefslogtreecommitdiffstats
path: root/hhkb/usbconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'hhkb/usbconfig.h')
-rw-r--r--hhkb/usbconfig.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/hhkb/usbconfig.h b/hhkb/usbconfig.h
index e8283505e2..c3aad34bef 100644
--- a/hhkb/usbconfig.h
+++ b/hhkb/usbconfig.h
@@ -171,7 +171,7 @@ section at the end of this file).
/* This macro (if defined) is executed when a USB SET_ADDRESS request was
* received.
*/
-#define USB_COUNT_SOF 0
+#define USB_COUNT_SOF 1
/* define this macro to 1 if you need the global variable "usbSofCount" which
* counts SOF packets. This feature requires that the hardware interrupt is
* connected to D- instead of D+.
@@ -352,8 +352,8 @@ section at the end of this file).
#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
-//#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
-#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
#define USB_CFG_DESCR_PROPS_UNKNOWN 0
@@ -375,4 +375,14 @@ section at the end of this file).
/* #define USB_INTR_PENDING_BIT INTF0 */
/* #define USB_INTR_VECTOR INT0_vect */
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
+
#endif /* __usbconfig_h_included__ */