From 7d2adba0e7674a5a971df179079445dc83e550e8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 29 Jun 2015 21:47:56 +0200 Subject: ported usbio lib and usb-led --- lib/usbio.c | 32 +++++++++++++++++++------------- usb-led/Makefile | 4 ++-- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/usbio.c b/lib/usbio.c index 4a371c9..7f6eb72 100644 --- a/lib/usbio.c +++ b/lib/usbio.c @@ -40,19 +40,25 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = { .Config = { - .ControlInterfaceNumber = 0, - - .DataINEndpointNumber = CDC_TX_EPNUM, - .DataINEndpointSize = CDC_TXRX_EPSIZE, - .DataINEndpointDoubleBank = false, - - .DataOUTEndpointNumber = CDC_RX_EPNUM, - .DataOUTEndpointSize = CDC_TXRX_EPSIZE, - .DataOUTEndpointDoubleBank = false, - - .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, - .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, - .NotificationEndpointDoubleBank = false, + .ControlInterfaceNumber = INTERFACE_ID_CDC_CCI, + .DataINEndpoint = + { + .Address = CDC_TX_EPADDR, + .Size = CDC_TXRX_EPSIZE, + .Banks = 1, + }, + .DataOUTEndpoint = + { + .Address = CDC_RX_EPADDR, + .Size = CDC_TXRX_EPSIZE, + .Banks = 1, + }, + .NotificationEndpoint = + { + .Address = CDC_NOTIFICATION_EPADDR, + .Size = CDC_NOTIFICATION_EPSIZE, + .Banks = 1, + }, }, }; diff --git a/usb-led/Makefile b/usb-led/Makefile index eb47104..8bae554 100644 --- a/usb-led/Makefile +++ b/usb-led/Makefile @@ -39,8 +39,8 @@ LUFA_OPTS += -D USE_FLASH_DESCRIPTORS LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT -LUFA_OPTS += -D USB_MANUFACTURER="L\"equinox\"" -D USB_MANUFACTURER_LEN=7 -LUFA_OPTS += -D USB_PRODUCT="L\"spreadspace usb-led example\"" -D USB_PRODUCT_LEN=27 +LUFA_OPTS += -D USB_MANUFACTURER="L\"equinox\"" +LUFA_OPTS += -D USB_PRODUCT="L\"spreadspace usb-led example\"" LUFA_COMPONENTS := USB USBCLASS -- cgit v1.2.3