hathach il y a 8 ans
Parent
commit
d6cb34ff22
2 fichiers modifiés avec 3 ajouts et 19 suppressions
  1. 0 5
      tinyusb/class/msc/msc_device.c
  2. 3 14
      tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c

+ 0 - 5
tinyusb/class/msc/msc_device.c

@@ -372,7 +372,6 @@ static void proc_read10_cmd(uint8_t rhport, mscd_interface_t* p_msc)
   msc_csw_t       * p_csw = &p_msc->csw;
 
   uint32_t lba = rdwr10_get_lba(p_cbw->command);
-  uint16_t block_count = rdwr10_get_blockcount(p_cbw->command);
 
   // remaining bytes capped at class buffer
   int32_t nbytes = (int32_t) min32_of(sizeof(_mscd_buf), p_cbw->xfer_bytes-p_msc->xferred_len);
@@ -402,10 +401,6 @@ static void proc_read10_cmd(uint8_t rhport, mscd_interface_t* p_msc)
 static void proc_write10_cmd(uint8_t rhport, mscd_interface_t* p_msc)
 {
   msc_cbw_t const * p_cbw = &p_msc->cbw;
-  msc_csw_t       * p_csw = &p_msc->csw;
-
-  uint32_t lba = rdwr10_get_lba(p_cbw->command);
-  uint16_t block_count = rdwr10_get_blockcount(p_cbw->command);
 
   // remaining bytes capped at class buffer
   int32_t nbytes = (int32_t) min32_of(sizeof(_mscd_buf), p_cbw->xfer_bytes-p_msc->xferred_len);

+ 3 - 14
tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c

@@ -224,20 +224,9 @@ static void normal_xact_start(uint8_t epnum, uint8_t dir)
 {
   if ( dir == TUSB_DIR_OUT )
   {
-    // Errata : HW issue on nrf5284 sample, SIZE.EPOUT won't trigger ACK as spec
-    // use the back door interface as sdk for walk around
-    if ( nrf_drv_usbd_errata_sizeepout_rw() )
-    {
-      *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7C5 + 2*epnum;
-      *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = 0;
-      (void) (((volatile uint32_t *)(NRF_USBD_BASE + 0x804)));
-    }
-    else
-    {
-      // Overwrite size will allow hw to accept data
-      NRF_USBD->SIZE.EPOUT[epnum] = 0;
-      __ISB(); __DSB();
-    }
+    // Overwrite size will allow hw to accept data
+    NRF_USBD->SIZE.EPOUT[epnum] = 0;
+    __ISB(); __DSB();
   }else
   {
     nom_xfer_t* xfer = get_td(epnum, dir);