-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
28 static uint8_t usb_error = 0;
-
29 static uint8_t usb_task_state;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
44 return ( usb_task_state);
-
+
+
+
+
+
+
+
+
+
21 static uint8_t usb_error = 0;
+
22 static uint8_t usb_task_state;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
37 return ( usb_task_state);
+
+
+
+
41 usb_task_state = state;
+
+
+
+
-
-
48 usb_task_state = state;
-
-
-
-
-
-
-
-
-
-
-
59 for(uint8_t i = 0; i < p->
epcount; i++) {
-
60 if((pep)->epAddr == ep)
-
+
+
+
+
+
+
52 for(uint8_t i = 0; i < p->
epcount; i++) {
+
53 if((pep)->epAddr == ep)
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
87 uint8_t USB::SetAddress(uint8_t addr, uint8_t ep,
EpInfo **ppep, uint16_t *nak_limit) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
80 uint8_t USB::SetAddress(uint8_t addr, uint8_t ep,
EpInfo **ppep, uint16_t *nak_limit) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
126 uint8_t
USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi,
+
127 uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr,
USBReadParser *p) {
+
128 bool direction =
false;
+
+
-
-
133 uint8_t
USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi,
-
134 uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr,
USBReadParser *p) {
-
135 bool direction =
false;
-
-
-
-
-
140 uint16_t nak_limit = 0;
+
+
133 uint16_t nak_limit = 0;
+
+
135 rcode = SetAddress(addr, ep, &pep, &nak_limit);
+
+
+
+
+
140 direction = ((bmReqType & 0x80) > 0);
-
142 rcode = SetAddress(addr, ep, &pep, &nak_limit);
-
-
-
-
-
147 direction = ((bmReqType & 0x80) > 0);
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
168 uint16_t left = total;
-
-
-
-
-
-
174 uint16_t read = nbytes;
-
-
-
177 rcode = InTransfer(pep, nak_limit, &read, dataptr);
-
-
-
-
-
-
-
-
+
+
+
+
+
161 uint16_t left = total;
+
+
+
+
+
+
167 #if defined(ESP8266) || defined(ESP32)
+
+
+
170 uint16_t read = nbytes;
+
+
+
173 rcode = InTransfer(pep, nak_limit, &read, dataptr);
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
199 rcode = OutTransfer(pep, nak_limit, nbytes, dataptr);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
213 uint8_t
USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval ) {
-
-
215 uint16_t nak_limit = 0;
-
-
217 uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
-
-
-
220 USBTRACE3(
"(USB::InTransfer) SetAddress Failed ", rcode, 0x81);
-
221 USBTRACE3(
"(USB::InTransfer) addr requested ", addr, 0x81);
-
222 USBTRACE3(
"(USB::InTransfer) ep requested ", ep, 0x81);
-
-
-
225 return InTransfer(pep, nak_limit, nbytesptr, data, bInterval);
-
+
+
+
+
+
+
+
+
+
195 rcode = OutTransfer(pep, nak_limit, nbytes, dataptr);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
209 uint8_t
USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval ) {
+
+
211 uint16_t nak_limit = 0;
+
+
213 uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
+
+
+
216 USBTRACE3(
"(USB::InTransfer) SetAddress Failed ", rcode, 0x81);
+
217 USBTRACE3(
"(USB::InTransfer) addr requested ", addr, 0x81);
+
218 USBTRACE3(
"(USB::InTransfer) ep requested ", ep, 0x81);
+
+
+
221 return InTransfer(pep, nak_limit, nbytesptr, data, bInterval);
+
+
+
224 uint8_t USB::InTransfer(
EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval ) {
+
+
-
228 uint8_t USB::InTransfer(
EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval ) {
-
-
+
228 uint16_t nbytes = *nbytesptr;
+
+
-
232 uint16_t nbytes = *nbytesptr;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
263 if(pktsize > nbytes) {
-
-
-
-
-
-
-
270 int16_t mem_left = (int16_t)nbytes - *((int16_t*)nbytesptr);
-
-
-
+
+
+
+
+
+
237 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
266 if(pktsize > nbytes) {
+
+
+
+
+
+
+
273 int16_t mem_left = (int16_t)nbytes - *((int16_t*)nbytesptr);
-
275 data =
bytesRd(
rRCVFIFO, ((pktsize > mem_left) ? mem_left : pktsize), data);
-
-
-
278 *nbytesptr += pktsize;
+
+
+
+
278 data =
bytesRd(
rRCVFIFO, ((pktsize > mem_left) ? mem_left : pktsize), data);
-
-
-
-
283 if((pktsize < maxpktsize) || (*nbytesptr >= nbytes))
-
-
-
-
-
-
-
290 }
else if(bInterval > 0)
-
-
-
-
-
-
-
+
+
281 *nbytesptr += pktsize;
+
+
+
+
+
286 if((pktsize < maxpktsize) || (*nbytesptr >= nbytes))
+
+
+
+
+
+
+
293 }
else if(bInterval > 0)
+
+
+
+
-
-
-
-
302 uint16_t nak_limit = 0;
-
-
304 uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
-
-
-
+
+
+
+
+
+
+
305 uint16_t nak_limit = 0;
+
+
307 uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
-
309 return OutTransfer(pep, nak_limit, nbytes, data);
-
+
+
-
312 uint8_t USB::OutTransfer(
EpInfo *pep, uint16_t nak_limit, uint16_t nbytes, uint8_t *data) {
-
-
314 uint8_t *data_p = data;
-
315 uint16_t bytes_tosend, nak_count;
-
316 uint16_t bytes_left = nbytes;
-
-
-
-
320 if(maxpktsize < 1 || maxpktsize > 64)
-
+
312 return OutTransfer(pep, nak_limit, nbytes, data);
+
+
+
315 uint8_t USB::OutTransfer(
EpInfo *pep, uint16_t nak_limit, uint16_t nbytes, uint8_t *data) {
+
+
317 uint8_t *data_p = data;
+
318 uint16_t bytes_tosend, nak_count;
+
319 uint16_t bytes_left = nbytes;
+
+
-
-
-
-
-
-
-
-
330 bytes_tosend = (bytes_left >= maxpktsize) ? maxpktsize : bytes_left;
-
-
-
-
-
-
-
-
338 while(rcode && ((int32_t)((uint32_t)millis() - timeout) < 0
L)) {
-
-
-
-
342 if(nak_limit && (nak_count == nak_limit))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
370 bytes_left -= bytes_tosend;
-
371 data_p += bytes_tosend;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
388 uint8_t retry_count = 0;
-
389 uint16_t nak_count = 0;
-
-
391 while((int32_t)((uint32_t)millis() - timeout) < 0
L) {
-
392 #if defined(ESP8266) || defined(ESP32)
-
-
-
-
-
-
398 while((int32_t)((uint32_t)millis() - timeout) < 0
L)
-
-
400 #if defined(ESP8266) || defined(ESP32)
-
-
-
-
-
405 if(tmpdata & bmHXFRDNIRQ) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
421 if(nak_limit && (nak_count == nak_limit))
-
-
-
-
-
-
-
-
-
-
+
323 if(maxpktsize < 1 || maxpktsize > 64)
+
+
+
+
+
+
+
+
331 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
336 bytes_tosend = (bytes_left >= maxpktsize) ? maxpktsize : bytes_left;
+
+
+
+
+
341 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
+
+
348 while(rcode && ((int32_t)((uint32_t)millis() - timeout) < 0
L)) {
+
349 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
+
355 if(nak_limit && (nak_count == nak_limit))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
380 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
+
+
387 bytes_left -= bytes_tosend;
+
388 data_p += bytes_tosend;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
405 uint8_t retry_count = 0;
+
406 uint16_t nak_count = 0;
+
+
408 while((int32_t)((uint32_t)millis() - timeout) < 0
L) {
+
409 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
+
415 while((int32_t)((uint32_t)millis() - timeout) < 0
L)
+
+
417 #if defined(ESP8266) || defined(ESP32)
+
+
+
+
+
422 if(tmpdata & bmHXFRDNIRQ) {
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
442 static uint32_t delay = 0;
-
-
444 bool lowspeed =
false;
-
-
-
-
+
+
+
+
+
+
438 if(nak_limit && (nak_count == nak_limit))
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
459 static uint32_t delay = 0;
+
+
461 bool lowspeed =
false;
-
-
-
-
-
-
-
-
-
-
-
-
-
475 rcode = devConfig[i]->
Poll();
-
-
477 switch(usb_task_state) {
-
-
-
-
-
-
483 rcode = devConfig[i]->
Release();
-
-
-
-
-
-
-
-
-
492 if((int32_t)((uint32_t)millis() - delay) >= 0
L)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
515 delay = (uint32_t)millis() + 20;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
558 p0->
lowspeed = (lowspeed) ?
true :
false;
-
-
-
561 uint8_t bAddress = addrPool.
AllocAddress(parent,
false, port);
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
492 rcode = devConfig[i]->
Poll();
+
+
494 switch(usb_task_state) {
+
+
+
+
+
+
500 rcode = devConfig[i]->
Release();
+
+
+
+
+
+
+
+
+
509 if((int32_t)((uint32_t)millis() - delay) >= 0
L)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
532 delay = (uint32_t)millis() + 20;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
571 p->lowspeed = lowspeed;
-
-
-
574 rcode =
setAddr(0, 0, bAddress);
-
-
-
-
-
-
-
-
-
-
584 uint8_t USB::AttemptConfig(uint8_t driver, uint8_t parent, uint8_t port,
bool lowspeed) {
-
-
+
+
+
+
+
+
+
+
+
+
575 p0->
lowspeed = (lowspeed) ?
true :
false;
+
+
+
578 uint8_t bAddress = addrPool.
AllocAddress(parent,
false, port);
+
+
+
+
+
+
+
+
-
-
589 uint8_t rcode = devConfig[driver]->
ConfigureDevice(parent, port, lowspeed);
-
-
-
-
-
-
-
-
-
-
599 }
else if(rcode ==
hrJERR && retries < 3) {
-
-
-
-
-
-
-
606 rcode = devConfig[driver]->
Init(parent, port, lowspeed);
-
607 if(rcode ==
hrJERR && retries < 3) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
669 uint8_t devConfigIndex;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
588 p->lowspeed = lowspeed;
+
+
+
591 rcode =
setAddr(0, 0, bAddress);
+
+
+
+
+
+
+
+
+
+
601 uint8_t USB::AttemptConfig(uint8_t driver, uint8_t parent, uint8_t port,
bool lowspeed) {
+
+
+
+
+
606 uint8_t rcode = devConfig[driver]->
ConfigureDevice(parent, port, lowspeed);
+
+
+
+
+
+
+
+
+
+
616 }
else if(rcode ==
hrJERR && retries < 3) {
+
+
+
+
+
+
+
623 rcode = devConfig[driver]->
Init(parent, port, lowspeed);
+
624 if(rcode ==
hrJERR && retries < 3) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
686 uint8_t devConfigIndex;
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
716 uint16_t vid = udd->idVendor;
-
717 uint16_t pid = udd->idProduct;
-
718 uint8_t klass = udd->bDeviceClass;
-
719 uint8_t subklass = udd->bDeviceSubClass;
-
-
-
-
-
-
-
726 for(devConfigIndex = 0; devConfigIndex <
USB_NUMDEVICES; devConfigIndex++) {
-
727 if(!devConfig[devConfigIndex])
continue;
-
728 if(devConfig[devConfigIndex]->GetAddress())
continue;
-
729 if(devConfig[devConfigIndex]->DEVSUBCLASSOK(subklass) && (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass))) {
-
730 rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed);
-
-
-
-
-
-
736 if(devConfigIndex < USB_NUMDEVICES) {
-
-
-
-
-
-
742 for(devConfigIndex = 0; devConfigIndex <
USB_NUMDEVICES; devConfigIndex++) {
-
743 if(!devConfig[devConfigIndex])
continue;
-
744 if(devConfig[devConfigIndex]->GetAddress())
continue;
-
745 if(devConfig[devConfigIndex]->DEVSUBCLASSOK(subklass) && (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass)))
continue;
-
746 rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
769 if(!devConfig[i])
continue;
-
770 if(devConfig[i]->GetAddress() == addr)
-
771 return devConfig[i]->
Release();
-
-
-
-
-
-
777 //get device descriptor
-
-
-
780 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, 0x00,
USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, NULL));
-
-
-
-
784 uint8_t
USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
-
785 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, conf,
USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, NULL));
-
-
-
-
-
-
791 const uint8_t bufSize = 64;
-
792 uint8_t buf[bufSize];
-
-
-
-
-
-
-
-
-
-
-
-
804 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, conf,
USB_DESCRIPTOR_CONFIGURATION, 0x0000, total, bufSize, buf, p));
-
-
-
-
-
809 uint8_t
USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
-
810 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, index,
USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, NULL));
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
733 uint16_t vid = udd->idVendor;
+
734 uint16_t pid = udd->idProduct;
+
735 uint8_t klass = udd->bDeviceClass;
+
736 uint8_t subklass = udd->bDeviceSubClass;
+
+
+
+
+
+
+
743 for(devConfigIndex = 0; devConfigIndex <
USB_NUMDEVICES; devConfigIndex++) {
+
744 if(!devConfig[devConfigIndex])
continue;
+
745 if(devConfig[devConfigIndex]->GetAddress())
continue;
+
746 if(devConfig[devConfigIndex]->DEVSUBCLASSOK(subklass) && (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass))) {
+
747 rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed);
+
+
+
+
+
+
753 if(devConfigIndex < USB_NUMDEVICES) {
+
+
+
+
+
+
759 for(devConfigIndex = 0; devConfigIndex <
USB_NUMDEVICES; devConfigIndex++) {
+
760 if(!devConfig[devConfigIndex])
continue;
+
761 if(devConfig[devConfigIndex]->GetAddress())
continue;
+
762 if(devConfig[devConfigIndex]->DEVSUBCLASSOK(subklass) && (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass)))
continue;
+
763 rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
786 if(!devConfig[i])
continue;
+
787 if(devConfig[i]->GetAddress() == addr)
+
788 return devConfig[i]->
Release();
+
+
+
+
+
+
794 //get device descriptor
+
+
+
797 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, 0x00,
USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, NULL));
+
+
+
+
801 uint8_t
USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
+
802 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, conf,
USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, NULL));
+
+
+
+
+
+
808 const uint8_t bufSize = 64;
+
809 uint8_t buf[bufSize];
+
+
+
-
-
815 uint8_t rcode =
ctrlReq(oldaddr, ep,
bmREQ_SET,
USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL);
-
-
-
-
-
-
-
-
-
824 return (
ctrlReq(addr, ep,
bmREQ_SET,
USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL));
-
-
-
827 #endif // defined(USB_METHODS_INLINE)
-
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
+
+
+
+
+
+
+
+
821 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, conf,
USB_DESCRIPTOR_CONFIGURATION, 0x0000, total, bufSize, buf, p));
+
+
+
+
+
826 uint8_t
USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
+
827 return (
ctrlReq(addr, ep,
bmREQ_GET_DESCR,
USB_REQUEST_GET_DESCRIPTOR, index,
USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, NULL));
+
+
+
+
+
832 uint8_t rcode =
ctrlReq(oldaddr, ep,
bmREQ_SET,
USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL);
+
+
+
+
+
+
+
+
+
841 return (
ctrlReq(addr, ep,
bmREQ_SET,
USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL));
+
+
+
844 #endif // defined(USB_METHODS_INLINE)
+
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
@@ -926,7 +943,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define USB_ERROR_EPINFO_IS_NULL
-
EpInfo * getEpInfoEntry(uint8_t addr, uint8_t ep)
+
EpInfo * getEpInfoEntry(uint8_t addr, uint8_t ep)
#define USB_DESCRIPTOR_STRING
@@ -941,25 +958,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define USB_DESCRIPTOR_DEVICE
#define USB_ERROR_INVALID_MAX_PKT_SIZE
-
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
+
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
#define USB_STATE_DETACHED
-
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
+
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
virtual uint8_t ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed)
-
+
-
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
+
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
#define USB_DESCRIPTOR_CONFIGURATION
virtual UsbDevice * GetUsbDevicePtr(uint8_t addr)=0
-
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
-
+
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
+
#define USB_STATE_RUNNING
@@ -975,19 +992,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
union SETUP_PKT::@33 wVal_u
-
void setUsbTaskState(uint8_t state)
-
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
+
void setUsbTaskState(uint8_t state)
+
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
#define USB_ATTACHED_SUBSTATE_RESET_DEVICE
-
uint8_t * bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p)
+
uint8_t * bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p)
virtual void ResetHubPort(uint8_t port)
uint8_t * bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p)
-
uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr)
+
uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr)
#define USB_REQUEST_SET_ADDRESS
@@ -1000,11 +1017,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
uint8_t getUsbTaskState(void)
+
uint8_t getUsbTaskState(void)
#define USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED
-
+
#define USB_DETACHED_SUBSTATE_ILLEGAL
@@ -1013,17 +1030,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void regWr(uint8_t reg, uint8_t data)
-
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
+
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
#define USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL
#define USB_STATE_CONFIGURING
-
uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit)
+
uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit)
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
-
uint8_t regRd(uint8_t reg)
+
uint8_t regRd(uint8_t reg)
AddressPool & GetAddressPool()
#define USB_ERROR_INVALID_ARGUMENT
-
uint8_t Configuring(uint8_t parent, uint8_t port, bool lowspeed)
+
uint8_t Configuring(uint8_t parent, uint8_t port, bool lowspeed)
union SETUP_PKT::@32 ReqType_u
#define USBTRACE3(s, r, l)
@@ -1040,13 +1057,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define USB_REQUEST_SET_CONFIGURATION
#define USB_DETACHED_SUBSTATE_WAIT_FOR_DEVICE
-
uint8_t DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed)
+
uint8_t DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed)
#define USB_DETACHED_SUBSTATE_INITIALIZE
-
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
+
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
#define USB_ATTACHED_SUBSTATE_WAIT_SOF
-
uint8_t ReleaseDevice(uint8_t addr)
+
uint8_t ReleaseDevice(uint8_t addr)
#define USB_ERROR_TRANSFER_TIMEOUT
#define USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET
diff --git a/_usb_core_8h_source.html b/_usb_core_8h_source.html
index 843b2080..c3babd81 100644
--- a/_usb_core_8h_source.html
+++ b/_usb_core_8h_source.html
@@ -396,56 +396,56 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
309 #endif // defined(USB_METHODS_INLINE)
-
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
+
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
virtual uint8_t GetAddress()
-
EpInfo * getEpInfoEntry(uint8_t addr, uint8_t ep)
+
EpInfo * getEpInfoEntry(uint8_t addr, uint8_t ep)
#define USB_DESCRIPTOR_STRING
#define USB_REQUEST_GET_DESCRIPTOR
#define USB_DESCRIPTOR_DEVICE
uint8_t ctrlData(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr, bool direction)
-
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
+
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
-
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
+
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
virtual uint8_t ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed)
-
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
+
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
#define USB_DESCRIPTOR_CONFIGURATION
-
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
-
+
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
+
void(* UsbDeviceHandleFunc)(UsbDevice *pdev)
-
void setUsbTaskState(uint8_t state)
-
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
+
void setUsbTaskState(uint8_t state)
+
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
virtual void ResetHubPort(uint8_t port)
#define USB_ERROR_UNABLE_TO_REGISTER_DEVICE_CLASS
-
uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr)
+
uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr)
#define USB_REQUEST_SET_ADDRESS
uint8_t ctrlStatus(uint8_t ep, bool direction, uint16_t nak_limit)
MAX3421e< P10, P9 > MAX3421E
-
uint8_t getUsbTaskState(void)
-
+
uint8_t getUsbTaskState(void)
+
virtual bool DEVSUBCLASSOK(uint8_t subklass)
-
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
+
uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval=0)
void ForEachUsbDevice(UsbDeviceHandleFunc pfunc)
-
uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit)
+
uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit)
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
AddressPool & GetAddressPool()
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
-
uint8_t Configuring(uint8_t parent, uint8_t port, bool lowspeed)
+
uint8_t Configuring(uint8_t parent, uint8_t port, bool lowspeed)
virtual uint8_t Release()
@@ -455,10 +455,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void ForEachUsbDevice(UsbDeviceHandleFunc pfunc)
#define USB_REQUEST_SET_CONFIGURATION
-
uint8_t DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed)
-
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
+
uint8_t DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed)
+
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
-
uint8_t ReleaseDevice(uint8_t addr)
+
uint8_t ReleaseDevice(uint8_t addr)