Fixed USB driver failing to define the PLL prescaler mask for the ATMEGA8U2 and ATMEGA16U2.

Simplified the USB.h master include file's target validity checks.
This commit is contained in:
Dean Camera 2009-11-29 07:41:54 +00:00
parent 414b92e812
commit b7f6a65c25
4 changed files with 21 additions and 21 deletions

View file

@ -75,7 +75,8 @@
#endif
#if (F_CLOCK == 8000000)
#if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))
#if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
defined(__AVR_ATMEGA8U2__) || defined(__AVR_ATMEGA16U2__))
#define USB_PLL_PSC 0
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
#define USB_PLL_PSC 0
@ -85,7 +86,8 @@
#define USB_PLL_PSC ((1 << PLLP1) | (1 << PLLP0))
#endif
#elif (F_CLOCK == 16000000)
#if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__))
#if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
defined(__AVR_ATMEGA8U2__) || defined(__AVR_ATMEGA16U2__))
#define USB_PLL_PSC (1 << PLLP0)
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
#define USB_PLL_PSC (1 << PINDIV)