X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6a10d6b465be27db090d760dc0fbe722c94e4344..48400df13c7f9f4f0fd8e7f841d49f9502557cb1:/LUFA/Drivers/USB/LowLevel/LowLevel.h diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h index faafbd7bf..98deaaca1 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.h +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h @@ -66,7 +66,12 @@ #endif /* Preprocessor Checks and Defines: */ - #if (F_CPU == 8000000) + #if !defined(F_CLOCK) + #error F_CLOCK is not defined. You must device F_CLOCK to the frequency of the unprescaled input clock in your project makefile. + #define F_CLOCK 0 + #endif + + #if (F_CLOCK == 8000000) #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__)) #define USB_PLL_PSC 0 #elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || \ @@ -76,7 +81,7 @@ #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) #define USB_PLL_PSC 0 #endif - #elif (F_CPU == 16000000) + #elif (F_CLOCK == 16000000) #if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_ATmega32U6__)) #define USB_PLL_PSC ((1 << PLLP2) | (1 << PLLP1)) #elif (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)) @@ -200,7 +205,7 @@ #if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__) /** Constant for the maximum software timeout period of the USB data stream transfer functions * (both control and standard) when in either device or host mode. If the next packet of a stream - * is not received or acknowedged within this time period, the stream function will fail. + * is not received or acknowledged within this time period, the stream function will fail. * * This value may be overridden in the user project makefile as the value of the * USB_STREAM_TIMEOUT_MS token, and passed to the compiler using the -D switch.