usb lib: add maxpkt and ntds to Altc struct
This commit is contained in:
parent
56405e0919
commit
a2d8dcfd82
2 changed files with 4 additions and 0 deletions
|
@ -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->maxpkt = GET2(dep->wMaxPacketSize);
|
||||||
ep->ntds = 1 + ((ep->maxpkt >> 11) & 3);
|
ep->ntds = 1 + ((ep->maxpkt >> 11) & 3);
|
||||||
ep->maxpkt &= 0x7FF;
|
ep->maxpkt &= 0x7FF;
|
||||||
|
altc->maxpkt = ep->maxpkt;
|
||||||
|
altc->ntds = ep->ntds;
|
||||||
ep->addr = addr;
|
ep->addr = addr;
|
||||||
ep->type = type;
|
ep->type = type;
|
||||||
ep->isotype = (dep->bmAttributes>>2) & 0x03;
|
ep->isotype = (dep->bmAttributes>>2) & 0x03;
|
||||||
|
|
|
@ -221,6 +221,8 @@ struct Altc
|
||||||
{
|
{
|
||||||
int attrib;
|
int attrib;
|
||||||
int interval;
|
int interval;
|
||||||
|
int maxpkt;
|
||||||
|
int ntds;
|
||||||
void* aux; /* for the driver program */
|
void* aux; /* for the driver program */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue