Переглянути джерело

Merge pull request #219 from xobs/fix-eptri-ep-clear

eptri: clear proper endpoint when opening IN port
hathach 6 роки тому
батько
коміт
f0682f6279
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/portable/valentyusb/eptri/dcd_eptri.c

+ 1 - 1
src/portable/valentyusb/eptri/dcd_eptri.c

@@ -415,7 +415,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc)
     rx_buffer[ep_num] = NULL;
   }
 
-  else if (ep_dir == TUSB_DIR_OUT) {
+  else if (ep_dir == TUSB_DIR_IN) {
     tx_buffer_offset[ep_num] = 0;
     tx_buffer_max[ep_num] = 0;
     tx_buffer[ep_num] = NULL;