indent clean up

This commit is contained in:
hathach 2019-07-04 18:45:10 +07:00
parent 3ec279b424
commit f16ebd512b
2 changed files with 95 additions and 92 deletions

View File

@ -245,6 +245,7 @@ static bool maybe_handle_setup_packet(void) {
void maybe_transfer_complete(void) {
uint32_t epints = USB->DEVICE.EPINTSMRY.reg;
for (uint8_t epnum = 0; epnum < USB_EPT_NUM; epnum++) {
if ((epints & (1 << epnum)) == 0) {
continue;
@ -253,6 +254,7 @@ void maybe_transfer_complete(void) {
if (maybe_handle_setup_packet()) {
continue;
}
UsbDeviceEndpoint* ep = &USB->DEVICE.DeviceEndpoint[epnum];
uint32_t epintflag = ep->EPINTFLAG.reg;
@ -281,7 +283,8 @@ void maybe_transfer_complete(void) {
dcd_event_xfer_complete(0, ep_addr, total_transfer_size, XFER_RESULT_SUCCESS, true);
}
// just finished status stage (total size = 0), prepare for next setup packet
// Just finished status stage (total size = 0), prepare for next setup packet
// TODO could cause issue with actual zero length data used by class such as DFU
if (epnum == 0 && total_transfer_size == 0) {
dcd_edpt_xfer(0, 0, _setup_packet, sizeof(_setup_packet));
}