aboutsummaryrefslogtreecommitdiff
path: root/mcu
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2016-05-31 12:53:23 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2016-05-31 13:13:14 +0900
commit1fa89d17547cc6a28991d559d69fead33eacd151 (patch)
tree799376597bdd21c2182126879c5a03252031e0b9 /mcu
parent03a1d46c0873c0a545c81a9a3acc4d51f0f6d4d4 (diff)
Change USB API a bit
Diffstat (limited to 'mcu')
-rw-r--r--mcu/usb-mkl27z.c7
-rw-r--r--mcu/usb-stm32f103.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/mcu/usb-mkl27z.c b/mcu/usb-mkl27z.c
index 5a21dd8..9f0021a 100644
--- a/mcu/usb-mkl27z.c
+++ b/mcu/usb-mkl27z.c
@@ -896,11 +896,14 @@ handle_transaction (uint8_t stat)
uint32_t len = (BD_table[4*ep_num+2+odd].ctrl >> 16)&0x3ff;
if (!success)
- USB_CTRL1->ERRSTAT = dmaerr; /* Clear error. */
+ {
+ USB_CTRL1->ERRSTAT = dmaerr; /* Clear error. */
+ dev_p->error++;
+ }
dev_p->send++;
ep[ep_num].tx_odd ^= 1;
- usb_cb_tx_done (ep_num, len, success);
+ usb_cb_tx_done (ep_num, len);
}
USB_CTRL1->ISTAT = USB_IS_TOKDNE;
diff --git a/mcu/usb-stm32f103.c b/mcu/usb-stm32f103.c
index 02be1cf..3d11ef8 100644
--- a/mcu/usb-stm32f103.c
+++ b/mcu/usb-stm32f103.c
@@ -888,7 +888,7 @@ usb_handle_transfer (uint16_t istr_value)
uint32_t len = st103_get_tx_count (ep_index);
st103_ep_clear_ctr_tx (ep_index);
- usb_cb_tx_done (ep_index, len, 1);
+ usb_cb_tx_done (ep_index, len);
}
}
}