usb lib: add maxpkt and ntds to Altc struct

This commit is contained in:
aiju 2018-03-07 10:04:27 +00:00
parent 56405e0919
commit a2d8dcfd82
2 changed files with 4 additions and 0 deletions

View file

@ -145,6 +145,8 @@ parseendpt(Usbdev *d, Conf *c, Iface *ip, Altc *altc, uchar *b, int n, Ep **epp)
ep->maxpkt = GET2(dep->wMaxPacketSize);
ep->ntds = 1 + ((ep->maxpkt >> 11) & 3);
ep->maxpkt &= 0x7FF;
altc->maxpkt = ep->maxpkt;
altc->ntds = ep->ntds;
ep->addr = addr;
ep->type = type;
ep->isotype = (dep->bmAttributes>>2) & 0x03;

View file

@ -221,6 +221,8 @@ struct Altc
{
int attrib;
int interval;
int maxpkt;
int ntds;
void* aux; /* for the driver program */
};