X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=protocol%2Flufa%2Flufa.h;h=195123c0f974f55a534ce716769e4358c0129554;hb=ad4cba172b2eea37697ca531016c4c3b4defaeb7;hp=71c279b0dcb27570e810a3e91dd1c2ae31dea504;hpb=a112f3614e0e3204ce35dcdfbf2723c3382c4c35;p=max%2Ftmk_keyboard.git diff --git a/protocol/lufa/lufa.h b/protocol/lufa/lufa.h index 71c279b0..195123c0 100644 --- a/protocol/lufa/lufa.h +++ b/protocol/lufa/lufa.h @@ -47,12 +47,34 @@ #include #include #include +#include "host.h" +#ifdef __cplusplus +extern "C" { +#endif + +extern host_driver_t lufa_driver; + +#ifdef __cplusplus +} +#endif + /* extra report structure */ typedef struct { uint8_t report_id; 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