- void transferDataPackages(USB_DATA_PACKAGES_FIFO * const packagesFIFO){
- //Waiting usb send success
- if(HSUSBD->EP[EPA].EPDATCNT & 0xFFFF)
- {
- return;
- }
-
- USB_DATA_PACKAGES * package = popPackageFromReadysFIFO(packagesFIFO);
- formatDataAndSendPackages(package);
- resetPackage(package);
- }
复制代码 这个在while loop中执行,只有HSUSBD->EP[EPA].EPDATCNT & 0xFFFF等于0才会发下一包数据 |