diff options
| author | tmk <nobody@nowhere> | 2014-04-25 12:19:14 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2014-04-25 12:19:14 +0900 |
| commit | ad4cba172b2eea37697ca531016c4c3b4defaeb7 (patch) | |
| tree | 7d27322f6155b1112409ce05b3984a193106fd09 | |
| parent | 00e9a342df752f06888d3093110a703c70985128 (diff) | |
| download | qmk_firmware-ad4cba172b2eea37697ca531016c4c3b4defaeb7.tar.gz qmk_firmware-ad4cba172b2eea37697ca531016c4c3b4defaeb7.zip | |
Move macro definitions from lufa.c to lufa.h
| -rw-r--r-- | protocol/lufa/lufa.c | 9 | ||||
| -rw-r--r-- | protocol/lufa/lufa.h | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/protocol/lufa/lufa.c b/protocol/lufa/lufa.c index 68119d5e7..86e9f23d1 100644 --- a/protocol/lufa/lufa.c +++ b/protocol/lufa/lufa.c | |||
| @@ -184,15 +184,6 @@ void EVENT_USB_Device_StartOfFrame(void) | |||
| 184 | /** Event handler for the USB_ConfigurationChanged event. | 184 | /** Event handler for the USB_ConfigurationChanged event. |
| 185 | * This is fired when the host sets the current configuration of the USB device after enumeration. | 185 | * This is fired when the host sets the current configuration of the USB device after enumeration. |
| 186 | */ | 186 | */ |
| 187 | #if LUFA_VERSION_INTEGER < 0x120730 | ||
| 188 | /* old API 120219 */ | ||
| 189 | #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank) | ||
| 190 | #else | ||
| 191 | /* new API >= 120730 */ | ||
| 192 | #define ENDPOINT_BANK_SINGLE 1 | ||
| 193 | #define ENDPOINT_BANK_DOUBLE 2 | ||
| 194 | #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum) , eptype, epsize, epbank) | ||
| 195 | #endif | ||
| 196 | void EVENT_USB_Device_ConfigurationChanged(void) | 187 | void EVENT_USB_Device_ConfigurationChanged(void) |
| 197 | { | 188 | { |
| 198 | bool ConfigSuccess = true; | 189 | bool ConfigSuccess = true; |
diff --git a/protocol/lufa/lufa.h b/protocol/lufa/lufa.h index bcee060d6..195123c0f 100644 --- a/protocol/lufa/lufa.h +++ b/protocol/lufa/lufa.h | |||
| @@ -66,4 +66,15 @@ typedef struct { | |||
| 66 | uint16_t usage; | 66 | uint16_t usage; |
| 67 | } __attribute__ ((packed)) report_extra_t; | 67 | } __attribute__ ((packed)) report_extra_t; |
| 68 | 68 | ||
| 69 | |||
| 70 | #if LUFA_VERSION_INTEGER < 0x120730 | ||
| 71 | /* old API 120219 */ | ||
| 72 | #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint(epnum, eptype, epdir, epsize, epbank) | ||
| 73 | #else | ||
| 74 | /* new API >= 120730 */ | ||
| 75 | #define ENDPOINT_BANK_SINGLE 1 | ||
| 76 | #define ENDPOINT_BANK_DOUBLE 2 | ||
| 77 | #define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum) , eptype, epsize, epbank) | ||
| 78 | #endif | ||
| 79 | |||
| 69 | #endif | 80 | #endif |
