PaulStoffregen / USBHost_t36

USB Host Library for Teensy 3.6 and 4.0
167 stars 86 forks source link

String buffers - Devices contribute buffers #7

Closed KurtE closed 6 years ago

KurtE commented 6 years ago

instead of having each HUB have 7 buffers, which can eat up space. We have each main object contribute currently one string buffer, which than when we initialize a Device_t we try to allocate one for it, likewise we release it when the Device is released.

Hopefully less memory needed.

Also updated such that the HIDInput classes can not retrieve these strings.

Changed test program to now also have list of HIDInput objects and when I detect a new one, I again print out info on it...

Paul - Let me know if you want things changed here like such they simply return a const uint8_t * to the string, or should the user pass in buffer, size which we copy into.