Add new tag for the LUFA-120219-BETA release.
[pub/USBasp.git] / LUFA / Drivers / USB / Core / AVR8 / Host_AVR8.h
index 8dbeaa2..09c58bc 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  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
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
                #endif
 
+               #if defined(INVERTED_VBUS_ENABLE_LINE) && !defined(NO_AUTO_VBUS_MANAGEMENT)
+                       #error The INVERTED_VBUS_ENABLE_LINE compile option requires NO_AUTO_VBUS_MANAGEMENT for the AVR8 architecture.
+               #endif
+
        /* Public Interface - May be used in end-application: */
                /* Macros: */
                        /** Indicates the fixed USB device address which any attached device is enumerated to when in
                        static inline void USB_Host_VBUS_Manual_On(void) ATTR_ALWAYS_INLINE;
                        static inline void USB_Host_VBUS_Manual_On(void)
                        {
+                               #if defined(INVERTED_VBUS_ENABLE_LINE)
+                               PORTE  &= ~(1 << 7);
+                               #else
                                PORTE  |=  (1 << 7);
+                               #endif
                        }
 
                        static inline void USB_Host_VBUS_Auto_Off(void) ATTR_ALWAYS_INLINE;
                        static inline void USB_Host_VBUS_Manual_Off(void) ATTR_ALWAYS_INLINE;
                        static inline void USB_Host_VBUS_Manual_Off(void)
                        {
+                               #if defined(INVERTED_VBUS_ENABLE_LINE)
+                               PORTE  |=  (1 << 7);
+                               #else
                                PORTE  &= ~(1 << 7);
+                               #endif
                        }
 
                        static inline void USB_Host_SetDeviceAddress(const uint8_t Address) ATTR_ALWAYS_INLINE;