Add build tests to verify correct compilation of as many modules as possible under...
[pub/USBasp.git] / LUFA / Common / Common.h
index 35c739a..4c9aa49 100644 (file)
@@ -89,6 +89,7 @@
                        #include <avr/pgmspace.h>
                        #include <avr/eeprom.h>
                        #include <avr/boot.h>
+                       #include <math.h>
                        #include <util/delay.h>
 
                        typedef uint8_t uint_reg_t;
                        #include <avr/interrupt.h>
                        #include <avr/pgmspace.h>
                        #include <avr/eeprom.h>
+                       #include <math.h>
                        #include <util/delay.h>
 
                        typedef uint8_t uint_reg_t;
                                while (Milliseconds--)
                                {
                                        __builtin_mtsr(AVR32_COUNT, 0);
-                                       while (__builtin_mfsr(AVR32_COUNT) < (F_CPU / 1000));
+                                       while ((uint32_t)__builtin_mfsr(AVR32_COUNT) < (F_CPU / 1000));
                                }
                                #elif (ARCH == ARCH_XMEGA)
                                if (GCC_IS_COMPILE_CONST(Milliseconds))