Move macro definitions from lufa.c to lufa.h
authortmk <nobody@nowhere>
Fri, 25 Apr 2014 03:19:14 +0000 (12:19 +0900)
committertmk <nobody@nowhere>
Fri, 25 Apr 2014 03:19:14 +0000 (12:19 +0900)
protocol/lufa/lufa.c
protocol/lufa/lufa.h

index 68119d5e7a11d2af82efa4e607bf56b9fbae1b67..86e9f23d1775c35b058a6df09a147c6592d69405 100644 (file)
@@ -184,15 +184,6 @@ void EVENT_USB_Device_StartOfFrame(void)
 /** Event handler for the USB_ConfigurationChanged event.
  * This is fired when the host sets the current configuration of the USB device after enumeration.
  */
-#if LUFA_VERSION_INTEGER < 0x120730
-    /* old API 120219 */
-    #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank)    Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank)
-#else
-    /* new API >= 120730 */
-    #define ENDPOINT_BANK_SINGLE 1
-    #define ENDPOINT_BANK_DOUBLE 2
-    #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank)    Endpoint_ConfigureEndpoint((epdir) | (epnum) , eptype, epsize, epbank)
-#endif
 void EVENT_USB_Device_ConfigurationChanged(void)
 {
     bool ConfigSuccess = true;
index bcee060d67df62ce416262eaea9906c182d77c9b..195123c0f974f55a534ce716769e4358c0129554 100644 (file)
@@ -66,4 +66,15 @@ typedef struct {
     uint16_t usage;
 } __attribute__ ((packed)) report_extra_t;
 
+
+#if LUFA_VERSION_INTEGER < 0x120730
+    /* old API 120219 */
+    #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank)    Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank)
+#else
+    /* new API >= 120730 */
+    #define ENDPOINT_BANK_SINGLE 1
+    #define ENDPOINT_BANK_DOUBLE 2
+    #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank)    Endpoint_ConfigureEndpoint((epdir) | (epnum) , eptype, epsize, epbank)
+#endif
+
 #endif
Imprint / Impressum