Просмотр исходного кода

add dcd_edpt_close_all() for clear existing configured state

correctly responded to TD 9.13 Set Configuration Test
hathach 4 лет назад
Родитель
Сommit
71e77e47fa

+ 5 - 0
src/device/dcd.h

@@ -137,6 +137,11 @@ void dcd_edpt0_status_complete(uint8_t rhport, tusb_control_request_t const * re
 // Configure endpoint's registers according to descriptor
 // Configure endpoint's registers according to descriptor
 bool dcd_edpt_open            (uint8_t rhport, tusb_desc_endpoint_t const * desc_ep);
 bool dcd_edpt_open            (uint8_t rhport, tusb_desc_endpoint_t const * desc_ep);
 
 
+// Close all non-control endpoints, cancel all pending transfers if any.
+// Invoked when switching from a non-zero Configuration by SET_CONFIGURE therefore
+// required for multiple configuration support.
+void dcd_edpt_close_all       (uint8_t rhport);
+
 // Close an endpoint.
 // Close an endpoint.
 // Since it is weak, caller must TU_ASSERT this function's existence before calling it.
 // Since it is weak, caller must TU_ASSERT this function's existence before calling it.
 void dcd_edpt_close           (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK;
 void dcd_edpt_close           (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK;

+ 39 - 15
src/device/usbd.c

@@ -38,7 +38,7 @@
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
 // Debug level of USBD
 // Debug level of USBD
-#define USBD_DBG_LVL   2
+#define USBD_DBG   2
 
 
 #ifndef CFG_TUD_TASK_QUEUE_SZ
 #ifndef CFG_TUD_TASK_QUEUE_SZ
   #define CFG_TUD_TASK_QUEUE_SZ   16
   #define CFG_TUD_TASK_QUEUE_SZ   16
@@ -432,19 +432,22 @@ bool tud_init (uint8_t rhport)
   return true;
   return true;
 }
 }
 
 
-static void usbd_reset(uint8_t rhport)
+static void configuration_reset(uint8_t rhport)
 {
 {
-  tu_varclr(&_usbd_dev);
+  for ( uint8_t i = 0; i < TOTAL_DRIVER_COUNT; i++ )
+  {
+    get_driver(i)->reset(rhport);
+  }
 
 
+  tu_varclr(&_usbd_dev);
   memset(_usbd_dev.itf2drv, DRVID_INVALID, sizeof(_usbd_dev.itf2drv)); // invalid mapping
   memset(_usbd_dev.itf2drv, DRVID_INVALID, sizeof(_usbd_dev.itf2drv)); // invalid mapping
   memset(_usbd_dev.ep2drv , DRVID_INVALID, sizeof(_usbd_dev.ep2drv )); // invalid mapping
   memset(_usbd_dev.ep2drv , DRVID_INVALID, sizeof(_usbd_dev.ep2drv )); // invalid mapping
+}
 
 
+static void usbd_reset(uint8_t rhport)
+{
+  configuration_reset(rhport);
   usbd_control_reset();
   usbd_control_reset();
-
-  for ( uint8_t i = 0; i < TOTAL_DRIVER_COUNT; i++ )
-  {
-    get_driver(i)->reset(rhport);
-  }
 }
 }
 
 
 bool tud_task_event_ready(void)
 bool tud_task_event_ready(void)
@@ -686,9 +689,29 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
         {
         {
           uint8_t const cfg_num = (uint8_t) p_request->wValue;
           uint8_t const cfg_num = (uint8_t) p_request->wValue;
 
 
-          if ( !_usbd_dev.cfg_num && cfg_num ) TU_ASSERT( process_set_config(rhport, cfg_num) );
-          _usbd_dev.cfg_num = cfg_num;
+          // Only process if new configure is different
+          if (_usbd_dev.cfg_num != cfg_num)
+          {
+            if ( _usbd_dev.cfg_num )
+            {
+              // already configured: need to clear all endpoints and driver first
+              TU_LOG(USBD_DBG, "Clear current config (%u) before switching\r\n", _usbd_dev.cfg_num);
+
+              // close all non-control endpoints, cancel all pending transfers if any
+              dcd_edpt_close_all(rhport);
 
 
+              // close all drivers and current configured state except bus speed
+              uint8_t const speed = _usbd_dev.speed;
+              configuration_reset(rhport);
+
+              _usbd_dev.speed = speed; // restore speed
+            }
+
+            // switch to new configuration if not zero
+            if ( cfg_num ) TU_ASSERT( process_set_config(rhport, cfg_num) );
+          }
+
+          _usbd_dev.cfg_num = cfg_num;
           tud_control_status(rhport, p_request);
           tud_control_status(rhport, p_request);
         }
         }
         break;
         break;
@@ -701,7 +724,7 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
           // Only support remote wakeup for device feature
           // Only support remote wakeup for device feature
           TU_VERIFY(TUSB_REQ_FEATURE_REMOTE_WAKEUP == p_request->wValue);
           TU_VERIFY(TUSB_REQ_FEATURE_REMOTE_WAKEUP == p_request->wValue);
 
 
-          TU_LOG(USBD_DBG_LVL, "    Enable Remote Wakeup\r\n");
+          TU_LOG(USBD_DBG, "    Enable Remote Wakeup\r\n");
 
 
           // Host may enable remote wake up before suspending especially HID device
           // Host may enable remote wake up before suspending especially HID device
           _usbd_dev.remote_wakeup_en = true;
           _usbd_dev.remote_wakeup_en = true;
@@ -712,7 +735,7 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
           // Only support remote wakeup for device feature
           // Only support remote wakeup for device feature
           TU_VERIFY(TUSB_REQ_FEATURE_REMOTE_WAKEUP == p_request->wValue);
           TU_VERIFY(TUSB_REQ_FEATURE_REMOTE_WAKEUP == p_request->wValue);
 
 
-          TU_LOG(USBD_DBG_LVL, "    Disable Remote Wakeup\r\n");
+          TU_LOG(USBD_DBG, "    Disable Remote Wakeup\r\n");
 
 
           // Host may disable remote wake up after resuming
           // Host may disable remote wake up after resuming
           _usbd_dev.remote_wakeup_en = false;
           _usbd_dev.remote_wakeup_en = false;
@@ -851,7 +874,8 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
 // This function parse configuration descriptor & open drivers accordingly
 // This function parse configuration descriptor & open drivers accordingly
 static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
 static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
 {
 {
-  tusb_desc_configuration_t const * desc_cfg = (tusb_desc_configuration_t const *) tud_descriptor_configuration_cb(cfg_num-1); // index is cfg_num-1
+  // index is cfg_num-1
+  tusb_desc_configuration_t const * desc_cfg = (tusb_desc_configuration_t const *) tud_descriptor_configuration_cb(cfg_num-1);
   TU_ASSERT(desc_cfg != NULL && desc_cfg->bDescriptorType == TUSB_DESC_CONFIGURATION);
   TU_ASSERT(desc_cfg != NULL && desc_cfg->bDescriptorType == TUSB_DESC_CONFIGURATION);
 
 
   // Parse configuration descriptor
   // Parse configuration descriptor
@@ -1309,7 +1333,7 @@ bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr)
 
 
 void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 {
 {
-  TU_LOG(USBD_DBG_LVL, "    Stall EP %02X", ep_addr);
+  TU_LOG(USBD_DBG, "    Stall EP %02X", ep_addr);
 
 
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const dir   = tu_edpt_dir(ep_addr);
   uint8_t const dir   = tu_edpt_dir(ep_addr);
@@ -1321,7 +1345,7 @@ void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 
 
 void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
 void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
 {
 {
-  TU_LOG(USBD_DBG_LVL, "    Clear Stall EP %02X", ep_addr);
+  TU_LOG(USBD_DBG, "    Clear Stall EP %02X", ep_addr);
 
 
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const dir   = tu_edpt_dir(ep_addr);
   uint8_t const dir   = tu_edpt_dir(ep_addr);

+ 6 - 0
src/portable/dialog/da146xx/dcd_da146xx.c

@@ -847,6 +847,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 {
 {
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const epnum = tu_edpt_number(ep_addr);

+ 6 - 0
src/portable/espressif/esp32sx/dcd_esp32sx.c

@@ -312,6 +312,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all(uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 {
 {
   (void)rhport;
   (void)rhport;

+ 6 - 0
src/portable/microchip/samd/dcd_samd.c

@@ -240,6 +240,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/microchip/samg/dcd_samg.c

@@ -269,6 +269,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 // Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
 // Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {

+ 6 - 0
src/portable/microchip/samx7x/dcd_samx7x.c

@@ -544,6 +544,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   }
   }
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c

@@ -339,6 +339,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nordic/nrf5x/dcd_nrf5x.c

@@ -364,6 +364,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nuvoton/nuc120/dcd_nuc120.c

@@ -273,6 +273,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nuvoton/nuc121/dcd_nuc121.c

@@ -289,6 +289,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nuvoton/nuc505/dcd_nuc505.c

@@ -353,6 +353,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nxp/khci/dcd_khci.c

@@ -347,6 +347,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nxp/lpc17_40/dcd_lpc17_40.c

@@ -326,6 +326,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c

@@ -323,6 +323,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 static void prepare_setup_packet(uint8_t rhport)
 static void prepare_setup_packet(uint8_t rhport)
 {
 {
   if (_dcd_controller[rhport].max_speed == TUSB_SPEED_FULL )
   if (_dcd_controller[rhport].max_speed == TUSB_SPEED_FULL )

+ 6 - 0
src/portable/nxp/transdimension/dcd_transdimension.c

@@ -366,6 +366,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {
   dcd_registers_t* dcd_reg = _dcd_controller[rhport].regs;
   dcd_registers_t* dcd_reg = _dcd_controller[rhport].regs;

+ 6 - 0
src/portable/raspberrypi/rp2040/dcd_rp2040.c

@@ -428,6 +428,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
     return true;
     return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {
     assert(rhport == 0);
     assert(rhport == 0);

+ 6 - 0
src/portable/renesas/usba/dcd_usba.c

@@ -733,6 +733,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void)rhport;
   (void)rhport;

+ 6 - 0
src/portable/silabs/efm32/dcd_efm32.c

@@ -434,6 +434,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes)
 {
 {
   (void)rhport;
   (void)rhport;

+ 6 - 0
src/portable/sony/cxd56/dcd_cxd56.c

@@ -312,6 +312,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c

@@ -800,6 +800,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 /**
 /**
  * Close an endpoint.
  * Close an endpoint.
  * 
  * 

+ 6 - 0
src/portable/st/synopsys/dcd_synopsys.c

@@ -670,6 +670,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {
   uint8_t const epnum = tu_edpt_number(ep_addr);
   uint8_t const epnum = tu_edpt_number(ep_addr);

+ 5 - 0
src/portable/template/dcd_template.c

@@ -94,6 +94,11 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
   return false;
   return false;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+}
+
 // Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
 // Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {

+ 6 - 0
src/portable/ti/msp430x5xx/dcd_msp430x5xx.c

@@ -298,6 +298,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
 {
 {
   (void) rhport;
   (void) rhport;

+ 6 - 0
src/portable/valentyusb/eptri/dcd_eptri.c

@@ -429,6 +429,12 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
   return true;
   return true;
 }
 }
 
 
+void dcd_edpt_close_all (uint8_t rhport)
+{
+  (void) rhport;
+  // TODO implement dcd_edpt_close_all()
+}
+
 void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr)
 {
 {
   (void) rhport;
   (void) rhport;