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.
pull/1469/head
Dean Camera 15 years ago
parent 414b92e812
commit b7f6a65c25

@ -544,17 +544,17 @@
{
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
int16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
* string language IDs). If normal ASCII characters are
* to be used, they must be added as an array of characters
* rather than a normal C string so that they are widened to
* Unicode size.
*
* Under GCC, strings prefixed with the "L" character (before
* the opening string quotation mark) are considered to be
* Unicode strings, and may be used instead of an explicit
* array of ASCII characters.
*/
wchar_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
* string language IDs). If normal ASCII characters are
* to be used, they must be added as an array of characters
* rather than a normal C string so that they are widened to
* Unicode size.
*
* Under GCC, strings prefixed with the "L" character (before
* the opening string quotation mark) are considered to be
* Unicode strings, and may be used instead of an explicit
* array of ASCII characters.
*/
} USB_Descriptor_String_t;
/** Type define for a standard string descriptor. Unlike other standard descriptors, the length

@ -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)

@ -132,19 +132,16 @@
#ifndef __USB_H__
#define __USB_H__
/* Includes: */
#include "HighLevel/USBMode.h"
/* Preprocessor Checks: */
#if (!(defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || \
defined(__AVR_ATmega8U2__) || \
defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
defined(__AVR_ATmega32U6__)))
#if (!defined(USB_SERIES_2_AVR) && !defined(USB_SERIES_4_AVR) && \
!defined(USB_SERIES_6_AVR) && !defined(USB_SERIES_7_AVR))
#error The currently selected AVR model is not supported under the USB component of the LUFA library.
#endif
/* Includes: */
#include "HighLevel/USBMode.h"
#include "HighLevel/USBTask.h"
#include "HighLevel/USBInterrupt.h"
#include "HighLevel/Events.h"

@ -40,6 +40,7 @@
* - Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero
* - Fixed misnamed Pipe_SetPipeToken() macro for setting a pipe's direction
* - Fixed CDCHost failing on devices with bidirectional endpoints
* - Fixed USB driver failing to define the PLL prescaler mask for the ATMEGA8U2 and ATMEGA16U2
*
* \section Sec_ChangeLog091122 Version 091122
*

Loading…
Cancel
Save