X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c05c7c7df46a0377db8a72cb32f06aa40153d3e1..a7aaa45ec4c3f415bf6073a5cc016635d5ecf77d:/LUFA/Drivers/USB/HighLevel/USBInterrupt.c diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c index 3cf4bb3e1..f009a0aa5 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.c @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) - - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -28,6 +28,7 @@ this software. */ +#define __INCLUDE_FROM_USB_DRIVER #include "USBInterrupt.h" void USB_INT_DisableAllInterrupts(void) @@ -50,17 +51,24 @@ void USB_INT_DisableAllInterrupts(void) void USB_INT_ClearAllInterrupts(void) { - #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) - USBINT = 0; - #endif - - #if defined(USB_CAN_BE_HOST) - UHINT = 0; - OTGINT = 0; - #endif - - #if defined(USB_CAN_BE_DEVICE) - UDINT = 0; + #if defined(__AVR32__) + AVR32_USBB.USBSTACLR = 0xFFFFFF; + AVR32_USBB.UHINTCLR = 0xFFFFFF; + AVR32_USBB.UECONX = + AVR32_USBB.UDINTCLR = 0xFFFFFF; + #elif defined(__AVR__) + #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) + USBINT = 0; + #endif + + #if defined(USB_CAN_BE_HOST) + UHINT = 0; + OTGINT = 0; + #endif + + #if defined(USB_CAN_BE_DEVICE) + UDINT = 0; + #endif #endif }