X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/37f8a84f35dadf27a6f8997b675238269f854b45..a96d77eca77c84777de7ff289a5144fb0db94517:/LUFA/Drivers/USB/LowLevel/DevChapter9.h diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h index 55e3b8253..3d49062ba 100644 --- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h +++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h @@ -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) + Copyright 2010 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 + 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 @@ -51,7 +51,7 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ #if defined(USE_SINGLE_DEVICE_CONFIGURATION) - #define TOTAL_NUM_CONFIGURATIONS 1 + #define FIXED_NUM_CONFIGURATIONS 1 #endif /* Enums: */ @@ -82,23 +82,32 @@ */ extern uint8_t USB_ConfigurationNumber; - /** Indicates if the host is currently allowing the device to issue remote wakeup events. If this - * flag is cleared, the device should not issue remote wakeup events to the host. - * - * \note This variable should be treated as read-only in the user application, and never manually - * changed in value. - * - * \ingroup Group_Device - */ - extern bool USB_RemoteWakeupEnabled; + #if !defined(NO_DEVICE_REMOTE_WAKEUP) + /** Indicates if the host is currently allowing the device to issue remote wakeup events. If this + * flag is cleared, the device should not issue remote wakeup events to the host. + * + * \note This variable should be treated as read-only in the user application, and never manually + * changed in value. + * + * \note To reduce FLASH usage of the compiled applications where Remote Wakeup is not supported, + * this global and the underlying management code can be disabled by defining the + * NO_DEVICE_REMOTE_WAKEUP token in the project makefile and passing it to the compiler via + * the -D switch. + * + * \ingroup Group_Device + */ + extern bool USB_RemoteWakeupEnabled; + #endif - /** Indicates if the device is currently being powered by its own power supply, rather than being - * powered by the host's USB supply. This flag should remain cleared if the device does not - * support self powered mode, as indicated in the device descriptors. - * - * \ingroup Group_Device - */ - extern bool USB_CurrentlySelfPowered; + #if !defined(NO_DEVICE_SELF_POWER) + /** Indicates if the device is currently being powered by its own power supply, rather than being + * powered by the host's USB supply. This flag should remain cleared if the device does not + * support self powered mode, as indicated in the device descriptors. + * + * \ingroup Group_Device + */ + extern bool USB_CurrentlySelfPowered; + #endif /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) @@ -113,7 +122,7 @@ #endif /* Function Prototypes: */ - void USB_Device_ProcessControlPacket(void); + void USB_Device_ProcessControlRequest(void); #if defined(INCLUDE_FROM_DEVCHAPTER9_C) static void USB_Device_SetAddress(void); @@ -124,6 +133,7 @@ static void USB_Device_ClearSetFeature(void); #if !defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)) + static char USB_Device_NibbleToASCII(uint8_t Nibble) ATTR_ALWAYS_INLINE; static void USB_Device_GetInternalSerialDescriptor(void); #endif #endif