From 383c296e24cd96a0c5186598dfaaee00ebe8a621 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Sat, 26 Mar 2016 00:51:49 +0300 Subject: Fix usbconfig.h with proper USB defs --- keyboard/usbdrv/usbconfig.h | 13 +++++++++++-- 1 file 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__ */ -- cgit v1.3.1