diff options
| author | hathach <[email protected]> | 2012-12-07 16:22:47 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2012-12-07 16:22:47 +0700 |
| commit | cd74f4f0ed9750f0019b0b66b5d921d68b4ba356 (patch) | |
| tree | 9b8541103dfc33603e4ab5050d87245731b3e482 /tinyusb/class | |
| parent | cc45f35d706ee9388be422d9a89ab204fac2a591 (diff) | |
work with lpc11u37 (lpc11uxx) on kevin's board
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/cdc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tinyusb/class/cdc.c b/tinyusb/class/cdc.c index a163be13a..de08eeeda 100644 --- a/tinyusb/class/cdc.c +++ b/tinyusb/class/cdc.c @@ -309,15 +309,16 @@ TUSB_Error_t tusb_cdc_configured(USBD_HANDLE_T hUsb) uint8_t dummy=0; USBD_API->hw->WriteEP(hUsb, CDC_DATA_EP_IN, &dummy, 1); // initial packet for IN endpoint, will not work if omitted -// #if defined CFG_MCU_FAMILY_LPC11UXX -// fifo_init (&ffTX, qBuffer[0], CDC_BUFFER_SIZE, false, USB_IRQn); // TX is non-overwritable -// fifo_init (&ffRX, qBuffer[1], CDC_BUFFER_SIZE, true, USB_IRQn); // RX is overwritable -// #elif defined CFG_MCU_FAMILY_LPC13UXX + // FIXME abstract to hal + #if MCU == MCU_LPC11UXX + fifo_init (&ffTX, qBuffer[0], CDC_BUFFER_SIZE, false, USB_IRQn); // TX is non-overwritable + fifo_init (&ffRX, qBuffer[1], CDC_BUFFER_SIZE, true, USB_IRQn); // RX is overwritable + #elif MCU == MCU_LPC13UXX fifo_init (&ffTX, qBuffer[0], CDC_BUFFER_SIZE, false, USB_IRQ_IRQn); // TX is non-overwritable fifo_init (&ffRX, qBuffer[1], CDC_BUFFER_SIZE, true, USB_IRQ_IRQn); // RX is overwritable -// #else -// #error "usb_cdc.c: No MCU defined" -// #endif + #else + #error "usb_cdc.c: No MCU defined" + #endif return tERROR_NONE; } |
