Browse Source

T4 USB read transfer status directly

teensy4-core
PaulStoffregen 5 years ago
parent
commit
f0c53891eb
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      teensy4/usb.c

+ 4
- 0
teensy4/usb.c View File



uint32_t usb_transfer_status(const transfer_t *transfer) uint32_t usb_transfer_status(const transfer_t *transfer)
{ {
#if 0
uint32_t status, cmd; uint32_t status, cmd;
//int count=0; //int count=0;
cmd = USB1_USBCMD; cmd = USB1_USBCMD;
//if (status & 0x80) break; // for still active, only 1 reading needed //if (status & 0x80) break; // for still active, only 1 reading needed
//if (++count > 1) break; // for completed, check 10 times //if (++count > 1) break; // for completed, check 10 times
} }
#else
return transfer->status;
#endif
} }





Loading…
Cancel
Save