typedef struct USBReq USBReq; typedef struct USBPkt USBPkt; typedef struct USBQueue USBQueue; typedef struct USBEp USBEp; struct USBReq { uint8_t bmRequestType; uint8_t bRequest; uint16_t wValue; uint16_t wIndex; uint16_t wLength; uint16_t ptr, len; uint8_t *data; }; struct USBPkt { uint16_t len; uint16_t ptr; USBPkt *next; uint8_t data[0]; }; struct USBQueue { USBEp *ep; USBPkt *first, **nextp; int qalloc, maxq; }; struct USBEp { uint8_t devep; uint8_t targep; uint16_t fifosz; uint16_t fifoad; USBQueue *q; }; extern USBQueue msgq; extern USBQueue corrq;