From d6cb34ff22cd8b50d23f3c9730aa15d080c1e19d Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 12 Jun 2018 23:08:03 +0700 Subject: [PATCH] clean up --- tinyusb/class/msc/msc_device.c | 5 ----- tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c | 17 +++-------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/tinyusb/class/msc/msc_device.c b/tinyusb/class/msc/msc_device.c index 5e0dcc5d..99b5652b 100644 --- a/tinyusb/class/msc/msc_device.c +++ b/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); diff --git a/tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c b/tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c index 8600f5d7..5f07bd72 100644 --- a/tinyusb/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/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);