Explorar el Código

Move macro definitions from lufa.c to lufa.h

tags/v1.9
tmk hace 10 años
padre
commit
ad4cba172b
Se han modificado 2 ficheros con 11 adiciones y 9 borrados
  1. 0
    9
      protocol/lufa/lufa.c
  2. 11
    0
      protocol/lufa/lufa.h

+ 0
- 9
protocol/lufa/lufa.c Ver fichero

/** Event handler for the USB_ConfigurationChanged event. /** Event handler for the USB_ConfigurationChanged event.
* This is fired when the host sets the current configuration of the USB device after enumeration. * 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) void EVENT_USB_Device_ConfigurationChanged(void)
{ {
bool ConfigSuccess = true; bool ConfigSuccess = true;

+ 11
- 0
protocol/lufa/lufa.h Ver fichero

uint16_t usage; uint16_t usage;
} __attribute__ ((packed)) report_extra_t; } __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 #endif

Cargando…
Cancelar
Guardar