summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-03-26 00:51:49 +0300
committerYuval Adam <yuval@y3xz.com>2016-03-26 00:51:49 +0300
commit383c296e24cd96a0c5186598dfaaee00ebe8a621 (patch)
tree4e7b63d911d7563b29088ad68c01efb788fa2ba7
parentea0cb3cf80556d164d9350cdfa7768624cf137d4 (diff)
Fix usbconfig.h with proper USB defs
-rw-r--r--keyboard/usbdrv/usbconfig.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/keyboard/usbdrv/usbconfig.h b/keyboard/usbdrv/usbconfig.h
index 09ee3db..e228c2d 100644
--- a/keyboard/usbdrv/usbconfig.h
+++ b/keyboard/usbdrv/usbconfig.h
@@ -29,11 +29,11 @@ section at the end of this file).
/* This is the port where the USB bus is connected. When you configure it to
* "B", the registers PORTB, PINB and DDRB will be used.
*/
-#define USB_CFG_DMINUS_BIT 4
+#define USB_CFG_DMINUS_BIT 3
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
-#define USB_CFG_DPLUS_BIT 3
+#define USB_CFG_DPLUS_BIT 4
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
* This may be any bit in the port. Please note that D+ must also be connected
* to interrupt pin INT0! [You can also use other interrupts, see section
@@ -381,4 +381,13 @@ section at the end of this file).
/* #define USB_INTR_PENDING_BIT INTF0 */
/* #define USB_INTR_VECTOR INT0_vect */
+#define USB_INTR_CFG PCMSK
+#define USB_INTR_CFG_SET (1 << USB_CFG_DPLUS_BIT)
+#define USB_INTR_CFG_CLR 0
+#define USB_INTR_ENABLE GIMSK
+#define USB_INTR_ENABLE_BIT PCIE
+#define USB_INTR_PENDING GIFR
+#define USB_INTR_PENDING_BIT PCIF
+#define USB_INTR_VECTOR PCINT0_vect
+
#endif /* __usbconfig_h_included__ */