Guest User

Untitled

a guest
Jan 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1.             timeout = 100; // Wait up to 100 ms
  2.             while(timeout > 0)
  3.             {
  4.                 bool b = true;
  5.                 for(dlelement_t* elem = transfer->transactions->head; b && elem; elem = elem->next)
  6.                 {
  7.                     uhci_transaction_t* uT = ((usb_transaction_t*)elem->data)->data;
  8.                     b = b && !uT->TD->active;
  9.                 }
  10.                 if(b)
  11.                     break;
  12.                 sleepMilliSeconds(10);
  13.                 timeout--;
  14.             }
  15.             if(timeout == 0)
  16.             {
  17.                 textColor(ERROR);
  18.                 printf("\nUHCI: Timeout during waiting for TD execution!");
  19.                 textColor(TEXT);
  20.             }
Add Comment
Please, Sign In to add comment