diff options
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/protocol/vusb/usbconfig.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tmk_core/protocol/vusb/usbconfig.h b/tmk_core/protocol/vusb/usbconfig.h index f118dc8ed..dcef7584c 100644 --- a/tmk_core/protocol/vusb/usbconfig.h +++ b/tmk_core/protocol/vusb/usbconfig.h | |||
@@ -24,15 +24,21 @@ section at the end of this file). | |||
24 | 24 | ||
25 | /* ---------------------------- Hardware Config ---------------------------- */ | 25 | /* ---------------------------- Hardware Config ---------------------------- */ |
26 | 26 | ||
27 | #ifndef USB_CFG_IOPORTNAME | ||
27 | #define USB_CFG_IOPORTNAME D | 28 | #define USB_CFG_IOPORTNAME D |
29 | #endif | ||
28 | /* This is the port where the USB bus is connected. When you configure it to | 30 | /* This is the port where the USB bus is connected. When you configure it to |
29 | * "B", the registers PORTB, PINB and DDRB will be used. | 31 | * "B", the registers PORTB, PINB and DDRB will be used. |
30 | */ | 32 | */ |
33 | #ifndef USB_CFG_DMINUS_BIT | ||
31 | #define USB_CFG_DMINUS_BIT 3 | 34 | #define USB_CFG_DMINUS_BIT 3 |
35 | #endif | ||
32 | /* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. | 36 | /* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. |
33 | * This may be any bit in the port. | 37 | * This may be any bit in the port. |
34 | */ | 38 | */ |
39 | #ifndef USB_CFG_DPLUS_BIT | ||
35 | #define USB_CFG_DPLUS_BIT 2 | 40 | #define USB_CFG_DPLUS_BIT 2 |
41 | #endif | ||
36 | /* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. | 42 | /* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. |
37 | * This may be any bit in the port. Please note that D+ must also be connected | 43 | * This may be any bit in the port. Please note that D+ must also be connected |
38 | * to interrupt pin INT0! [You can also use other interrupts, see section | 44 | * to interrupt pin INT0! [You can also use other interrupts, see section |
@@ -151,7 +157,9 @@ section at the end of this file). | |||
151 | /* This macro (if defined) is executed when a USB SET_ADDRESS request was | 157 | /* This macro (if defined) is executed when a USB SET_ADDRESS request was |
152 | * received. | 158 | * received. |
153 | */ | 159 | */ |
160 | #ifndef USB_COUNT_SOF | ||
154 | #define USB_COUNT_SOF 1 | 161 | #define USB_COUNT_SOF 1 |
162 | #endif | ||
155 | /* define this macro to 1 if you need the global variable "usbSofCount" which | 163 | /* define this macro to 1 if you need the global variable "usbSofCount" which |
156 | * counts SOF packets. This feature requires that the hardware interrupt is | 164 | * counts SOF packets. This feature requires that the hardware interrupt is |
157 | * connected to D- instead of D+. | 165 | * connected to D- instead of D+. |
@@ -321,10 +329,18 @@ section at the end of this file). | |||
321 | 329 | ||
322 | /* Set INT1 for D- falling edge to count SOF */ | 330 | /* Set INT1 for D- falling edge to count SOF */ |
323 | /* #define USB_INTR_CFG EICRA */ | 331 | /* #define USB_INTR_CFG EICRA */ |
332 | #ifndef USB_INTR_CFG_SET | ||
324 | #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) | 333 | #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) |
334 | #endif | ||
325 | /* #define USB_INTR_CFG_CLR 0 */ | 335 | /* #define USB_INTR_CFG_CLR 0 */ |
326 | /* #define USB_INTR_ENABLE EIMSK */ | 336 | /* #define USB_INTR_ENABLE EIMSK */ |
337 | #ifndef USB_INTR_ENABLE_BIT | ||
327 | #define USB_INTR_ENABLE_BIT INT1 | 338 | #define USB_INTR_ENABLE_BIT INT1 |
339 | #endif | ||
328 | /* #define USB_INTR_PENDING EIFR */ | 340 | /* #define USB_INTR_PENDING EIFR */ |
341 | #ifndef USB_INTR_PENDING_BIT | ||
329 | #define USB_INTR_PENDING_BIT INTF1 | 342 | #define USB_INTR_PENDING_BIT INTF1 |
343 | #endif | ||
344 | #ifndef USB_INTR_VECTOR | ||
330 | #define USB_INTR_VECTOR INT1_vect | 345 | #define USB_INTR_VECTOR INT1_vect |
346 | #endif | ||