Skip to content

Commit de529e3

Browse files
committed
bug in USBCore.cpp for 1.8 IDE due to header file changes in avr-gcc etc.
1 parent 182a419 commit de529e3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cores/xmega/USBCore.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#endif // check for GNUC >= or < 4.6
7474

7575

76-
// bug in iox128a1u.h and iox64a1u.h
76+
// bugs in iox128a1u.h and iox64a1u.h
7777
// the definition for USB_TRNCOMPL_vect and USB_TRNCOMPL_vect_num is wrong
7878
// this can be corrected here. bug reported 'upstream' for avr-libc 1.8.0 and 1.8.1
7979
// https://savannah.nongnu.org/bugs/index.php?44279
@@ -87,6 +87,15 @@
8787
#define USB_TRNCOMPL_vect _VECTOR(126) /* Transaction complete interrupt */
8888
#endif // __AVR_ATxmega64A1U__, __AVR_ATxmega128A1U__
8989

90+
// additional compatibilty bugs between older and newer versions of iox128a1u.h and iox64a1u.h
91+
#ifdef USB_EP_BUFSIZE_gm
92+
#define USB_EP_SIZE_64_gc USB_EP_BUFSIZE_64_gc /* name change of definition from previous header */
93+
#endif // USB_EP_BUFSIZE_gm
94+
95+
#ifndef CLK_USBEN_bm
96+
#define CLK_USBEN_bm CLK_USBSEN_bm /* name change of definition from previous header */
97+
#endif // CLK_USBEN_bm
98+
9099

91100

92101
// number of endpoints - to determine buffer array sizes

0 commit comments

Comments
 (0)