Support Isochronous transfer additionally
Dependents: USBHostC270_example_GR-PEACH USBHostDac_example USBHostDac_Audio_in_out
Fork of USBHost_custom by
Diff: USBHost/USBHost.h
- Revision:
- 41:5c3ebf7372ee
- Parent:
- 24:868cbfe611a7
--- a/USBHost/USBHost.h Fri Mar 17 01:29:52 2017 +0000 +++ b/USBHost/USBHost.h Fri Apr 21 07:23:33 2017 +0000 @@ -127,6 +127,16 @@ */ USB_TYPE enumerate(USBDeviceConnected * dev, IUSBEnumerator* pEnumerator); +#if(1) /* Isochronous */ + inline uint8_t * getConfDescrCurPtr() { + return &data[indexCnfdDescr]; + }; + + inline uint16_t getConfDescrRestLen() { + return lenCnfdDescr - indexCnfdDescr; + }; +#endif + /** * reset a specific device * @@ -235,6 +245,10 @@ USBHost(); static USBHost * instHost; uint16_t lenReportDescr; +#if(1) /* Isochronous */ + uint16_t lenCnfdDescr; + uint16_t indexCnfdDescr; +#endif // endpoints void unqueueEndpoint(USBEndpoint * ep) ; @@ -284,7 +298,11 @@ Mutex td_mutex; // buffer for conf descriptor +#if(1) /* Isochronous */ + uint8_t data[1024]; +#else uint8_t data[415]; +#endif /** * Add a transfer on the TD linked list associated to an ED