Standardized the naming scheme given to configuration descriptor sub-elements in...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / LowLevel.h
index 2c8ade7..e99bd1f 100644 (file)
 #ifndef __USBLOWLEVEL_H__\r
 #define __USBLOWLEVEL_H__\r
 \r
-       /* External Variables: */\r
-               #if defined(__AVR32__)\r
-                       #if !defined(CONTROL_ONLY_DEVICE)\r
-                               extern uint8_t USB_SelectedEPNumber;\r
-                       #else\r
-                               #define USB_SelectedEPNumber  0\r
-                       #endif\r
-               #endif\r
-       \r
        /* Includes: */\r
-               #if defined(__AVR32__)\r
-                       #include <avr32/io.h>\r
-                       #include <stdint.h>\r
-                       #include <stdbool.h>\r
-               #elif defined(__AVR__)\r
-                       #include <avr/io.h>\r
-                       #include <avr/interrupt.h>\r
-                       #include <stdbool.h>\r
-               #endif\r
-                               \r
+               #include <avr/io.h>\r
+               #include <avr/interrupt.h>\r
+               #include <stdbool.h>\r
+               \r
                #include "../HighLevel/USBMode.h"\r
 \r
                #include "../../../Common/Common.h"\r
                        #define USB_Controller_Disable()   MACROS{ USBCON  &= ~(1 << USBE);                 }MACROE\r
                        #define USB_Controller_Reset()     MACROS{ const uint8_t Temp = USBCON; USBCON = (Temp & ~(1 << USBE)); \\r
                                                                   USBCON = (Temp | (1 << USBE));           }MACROE\r
+       \r
                /* Inline Functions: */\r
                        #if defined(USB_CAN_BE_BOTH)\r
                        static inline uint8_t USB_GetUSBModeFromUID(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
                        static inline uint8_t USB_GetUSBModeFromUID(void)\r
                        {\r
-                               #if defined(__AVR32__)\r
-                               if (AVR32_USBB.USBSTA.id)\r
-                                 return USB_MODE_DEVICE;\r
-                               else\r
-                                 return USB_MODE_HOST;                         \r
-                               #elif defined(__AVR__)\r
                                if (USBSTA & (1 << ID))\r
                                  return USB_MODE_DEVICE;\r
                                else\r
                                  return USB_MODE_HOST;\r
-                               #endif\r
                        }\r
                        #endif\r
                        \r