diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-07-24 05:03:11 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-07-24 05:03:11 +0000 |
commit | c90b9b507d2643c897edb582091b8823295ce9a6 (patch) | |
tree | 6d22fa8de016470e348254f76c6dde4123065fa7 /LUFA | |
parent | bfee7f8c561637b134327c6efb9561479400cf3b (diff) | |
download | lufa-c90b9b507d2643c897edb582091b8823295ce9a6.tar.gz lufa-c90b9b507d2643c897edb582091b8823295ce9a6.tar.bz2 lufa-c90b9b507d2643c897edb582091b8823295ce9a6.zip |
Add missing UC3 architecture F_USB configuration checks.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3/USBController_UC3.h | 10 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Core/USBMode.h | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h index 4a5d267c8..006e08970 100644 --- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h +++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.h @@ -84,6 +84,16 @@ #error F_USB is not defined. You must define F_USB to the frequency of the clock input to the USB module. #endif + #if (defined(USB_SERIES_UC3A3_AVR) || defined(USB_SERIES_UC3A4_AVR)) + #if ((F_USB < 12000000) || (F_USB % 12000000)) + #error Invalid F_USB specified. F_USB must be a multiple of 12MHz for UC3A3 and UC3A4 devices. + #endif + #else + #if ((F_USB < 48000000) || (F_USB % 48000000)) + #error Invalid F_USB specified. F_USB must be a multiple of 48MHz for UC3A and UC3B devices. + #endif + #endif + /* Public Interface - May be used in end-application: */ /* Macros: */ /** \name USB Controller Option Masks */ diff --git a/LUFA/Drivers/USB/Core/USBMode.h b/LUFA/Drivers/USB/Core/USBMode.h index f62c8c152..7ae30bbcd 100644 --- a/LUFA/Drivers/USB/Core/USBMode.h +++ b/LUFA/Drivers/USB/Core/USBMode.h @@ -102,6 +102,11 @@ */ #define USB_SERIES_UC3A3_AVR + /** Indicates that the target AVR microcontroller belongs to the AVR32 UC3A4 Series USB controller + * (i.e. AT32UC3A4*) when defined. + */ + #define USB_SERIES_UC3A4_AVR + /** Indicates that the target AVR microcontroller belongs to the AVR32 UC3B0 Series USB controller * (i.e. AT32UC3B0*) when defined. */ |