summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Lawrence <[email protected]>2020-03-15 17:10:14 -0500
committerPeter Lawrence <[email protected]>2020-03-15 17:44:09 -0500
commitfb56c02a6f7cc03b2f9fd970a5b1bc772ccf4795 (patch)
treebe26e7a423281b5273d4668758690fc9e76f8b0e
parenta0eb8a26517040850a0e4185aef398183b04ddc7 (diff)
NUC505 : fix operation with net_lwip_webserver
-rw-r--r--examples/device/net_lwip_webserver/src/tusb_config.h2
-rw-r--r--src/portable/nuvoton/nuc505/dcd_nuc505.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/examples/device/net_lwip_webserver/src/tusb_config.h b/examples/device/net_lwip_webserver/src/tusb_config.h
index 329fc80b9..0b40fefab 100644
--- a/examples/device/net_lwip_webserver/src/tusb_config.h
+++ b/examples/device/net_lwip_webserver/src/tusb_config.h
@@ -39,7 +39,7 @@
#error CFG_TUSB_MCU must be defined
#endif
-#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || CFG_TUSB_MCU == OPT_MCU_NUC505
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
#else
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
diff --git a/src/portable/nuvoton/nuc505/dcd_nuc505.c b/src/portable/nuvoton/nuc505/dcd_nuc505.c
index 2b6a66bc2..031bfc5e4 100644
--- a/src/portable/nuvoton/nuc505/dcd_nuc505.c
+++ b/src/portable/nuvoton/nuc505/dcd_nuc505.c
@@ -211,6 +211,7 @@ static void bus_reset(void)
current_dma_xfer = NULL;
}
+#if 0
/* this must only be called by the ISR; it does its best to share the single DMA engine across all user EPs (IN and OUT) */
static void service_dma(void)
{
@@ -243,6 +244,7 @@ static void service_dma(void)
return;
}
}
+#endif
/* centralized location for USBD interrupt enable bit masks */
static const uint32_t enabled_irqs = USBD_GINTEN_USBIEN_Msk | \
@@ -366,7 +368,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to
for (int count = 0; count < total_bytes; count++)
*buffer++ = USBD->CEPDAT_BYTE;
- usb_control_send_zlp();
+ dcd_event_xfer_complete(0, ep_addr, total_bytes, XFER_RESULT_SUCCESS, true);
}
}
else
@@ -465,6 +467,7 @@ void USBD_IRQHandler(void)
if (bus_state & USBD_BUSINTSTS_DMADONEIF_Msk)
{
+#if 0
if (current_dma_xfer)
{
current_dma_xfer->dma_requested = false;
@@ -480,6 +483,7 @@ void USBD_IRQHandler(void)
current_dma_xfer = NULL;
service_dma();
}
+#endif
}
if (bus_state & USBD_BUSINTSTS_VBUSDETIF_Msk)
@@ -597,7 +601,7 @@ void USBD_IRQHandler(void)
if (out_ep)
{
-#if 1
+#if 0
xfer->dma_requested = true;
service_dma();
#else