Combined Keyboard, KeyboardViaInt and KeyboardFullInt demos into a single unified...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / LowLevel.h
index faafbd7..98deaac 100644 (file)
                #endif\r
 \r
        /* Preprocessor Checks and Defines: */\r
-               #if (F_CPU == 8000000)\r
+               #if !defined(F_CLOCK)\r
+                       #error F_CLOCK is not defined. You must device F_CLOCK to the frequency of the unprescaled input clock in your project makefile.\r
+                       #define F_CLOCK 0\r
+               #endif\r
+       \r
+               #if (F_CLOCK == 8000000)\r
                        #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))\r
                                #define USB_PLL_PSC                0\r
                        #elif (defined(__AVR_AT90USB646__)  || defined(__AVR_AT90USB647__)  || \\r
@@ -76,7 +81,7 @@
                        #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))\r
                                #define USB_PLL_PSC                0\r
                        #endif\r
-               #elif (F_CPU == 16000000)\r
+               #elif (F_CLOCK == 16000000)\r
                        #if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_ATmega32U6__))\r
                                #define USB_PLL_PSC                ((1 << PLLP2) | (1 << PLLP1))\r
                        #elif (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__))\r
                        #if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__)\r
                                /** Constant for the maximum software timeout period of the USB data stream transfer functions\r
                                 *  (both control and standard) when in either device or host mode. If the next packet of a stream\r
-                                *  is not received or acknowedged within this time period, the stream function will fail.\r
+                                *  is not received or acknowledged within this time period, the stream function will fail.\r
                                 *\r
                                 *  This value may be overridden in the user project makefile as the value of the \r
                                 *  USB_STREAM_TIMEOUT_MS token, and passed to the compiler using the -D switch.\r