diff options
| author | hathach <[email protected]> | 2018-06-12 23:08:03 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-06-12 23:08:03 +0700 |
| commit | d6cb34ff22cd8b50d23f3c9730aa15d080c1e19d (patch) | |
| tree | 44836ae81142b4d81210d6570c51e15be161c61c /tinyusb | |
| parent | fa2e04312615fc985de9e23c18cf52896ad191f5 (diff) | |
clean up
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/msc/msc_device.c | 5 | ||||
| -rw-r--r-- | 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 5e0dcc5d2..99b5652bb 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 8600f5d73..5f07bd722 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); |
