Removed all user pipe/endpoint interrupt APIs, added internal library support for...
[pub/USBasp.git] / LUFA / Drivers / USB / HighLevel / USBInterrupt.h
index 9a16047..7fbb33e 100644 (file)
   this software.\r
 */\r
 \r
-/** \ingroup Group_USB\r
- *  @defgroup Group_USBInterrupt Endpoint and Pipe Interrupts\r
- *\r
- *  This module manages the main USB interrupt vector, for handling such events as VBUS interrupts\r
- *  (on supported USB AVR models), device connections and disconnections, etc. as well as providing\r
- *  easy to use macros for the management of the unified Endpoint/Pipe interrupt vector.\r
- *\r
- *  @{\r
- */\r
-\r
 #ifndef __USBINTERRUPT_H__\r
 #define __USBINTERRUPT_H__\r
 \r
                #endif\r
 \r
        /* Public Interface - May be used in end-application: */\r
-               /* Macros: */\r
-                       /** Vector name for the common endpoint and pipe vector. This can be used to write an ISR handler\r
-                        *  for the endpoint and pipe events, to make certain USB functions interrupt rather than poll\r
-                        *  driven.\r
-                        */\r
-                       #define ENDPOINT_PIPE_vect                       USB_COM_vect\r
-       \r
-                       /** Enables the given USB interrupt vector (such as the ENDPOINT_INT_* and PIPE_INT_* vectors in\r
-                        *  Endpoint.h and Pipe.h).\r
-                        */\r
-                       #define USB_INT_Enable(int)              MACROS{ USB_INT_GET_EN_REG(int)   |=   USB_INT_GET_EN_MASK(int);   }MACROE\r
-\r
-                       /** Disables the given USB interrupt vector.\r
-                        *\r
-                        *  \see \ref USB_INT_Enable()\r
-                        */\r
-                       #define USB_INT_Disable(int)             MACROS{ USB_INT_GET_EN_REG(int)   &= ~(USB_INT_GET_EN_MASK(int));  }MACROE\r
-\r
-                       /** Resets the given USB interrupt flag, so that the interrupt is re-primed for the next firing. */\r
-                       #define USB_INT_Clear(int)               MACROS{ USB_INT_GET_INT_REG(int)  &= ~(USB_INT_GET_INT_MASK(int)); }MACROE\r
-                       \r
-                       /** Returns boolean false if the given USB interrupt is disabled, or true if the interrupt is currently\r
-                        *  enabled.\r
-                        */\r
-                       #define USB_INT_IsEnabled(int)                 ((USB_INT_GET_EN_REG(int)   &    USB_INT_GET_EN_MASK(int)) ? true : false)\r
-\r
-                       /** Returns boolean true if the given interrupt flag is set (i.e. the condition for the interrupt has occurred,\r
-                        *  but the interrupt vector is not necessarily enabled), otherwise returns false.\r
-                        */\r
-                       #define USB_INT_HasOccurred(int)               ((USB_INT_GET_INT_REG(int)  &    USB_INT_GET_INT_MASK(int)) ? true : false)\r
-               \r
                /* Throwable Events: */\r
                        /** This module raises the USB Connected interrupt when the AVR is attached to a host while in device\r
                         *  USB mode.\r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
                /* Macros: */\r
+                       #define USB_INT_Enable(int)              MACROS{ USB_INT_GET_EN_REG(int)   |=   USB_INT_GET_EN_MASK(int);   }MACROE\r
+                       #define USB_INT_Disable(int)             MACROS{ USB_INT_GET_EN_REG(int)   &= ~(USB_INT_GET_EN_MASK(int));  }MACROE\r
+                       #define USB_INT_Clear(int)               MACROS{ USB_INT_GET_INT_REG(int)  &= ~(USB_INT_GET_INT_MASK(int)); }MACROE\r
+                       #define USB_INT_IsEnabled(int)                 ((USB_INT_GET_EN_REG(int)   &    USB_INT_GET_EN_MASK(int)) ? true : false)\r
+                       #define USB_INT_HasOccurred(int)               ((USB_INT_GET_INT_REG(int)  &    USB_INT_GET_INT_MASK(int)) ? true : false)\r
+\r
                        #define USB_INT_GET_EN_REG(a, b, c, d)           a\r
                        #define USB_INT_GET_EN_MASK(a, b, c, d)          b\r
                        #define USB_INT_GET_INT_REG(a, b, c, d)          c\r
                        #define USB_INT_HSOFI                            UHIEN,  (1 << HSOFE)  , UHINT , (1 << HSOFI)\r
                        #define USB_INT_RSTI                             UHIEN , (1 << RSTE)   , UHINT , (1 << RSTI)\r
                        #define USB_INT_SRPI                             OTGIEN, (1 << SRPE)   , OTGINT, (1 << SRPI)\r
+                       #define USB_INT_ENDPOINT_SETUP                   UEIENX, (1 << RXSTPE) , UEINTX, (1 << RXSTPI)\r
        \r
                /* Function Prototypes: */\r
                        void USB_INT_ClearAllInterrupts(void);\r
                #endif\r
 \r
 #endif\r
-\r
-/** @} */\r