![arduino usb host shield libraries arduino usb host shield libraries](https://reneeharke.com/assets/media/nanohostbb.jpg)
Devices of this class provide serial connectivity. Initialization, polling, report descriptor parsing, as wellas reading and sending reports is possible.
![arduino usb host shield libraries arduino usb host shield libraries](https://docs.arduino.cc/static/1f56962b40c54f68f5518e3145949185/a207c/a000004_featured.jpg)
#Arduino usb host shield libraries code#
Keyboards, mice, game controllers, bar code scanners, magnetic card and RFID readers – the list goes on. The following devices are now supported by the library code: Device initialization and event handling is now moved to a library specific to device class, therefore user application does’n need to do this and only needs to process actual device data. Support for several popular device classes has been added. inTranser() function now is able to return actual number of bytes received. Control transfer function now accepts callback in order to split long chunks of data, if necessary. NAK_LIMIT is now tied to an endpoint – it is now possible to have NAK_LIMIT set to 1 for interrupt endpoint and 32000 for bulk endpoint of the same device simultaneously. Several minor code improvements has also been made. Also, a standard mechanism of device initialization/polling/releasing has been added to enumeration. It is now possible to connect USB hub to the shield and have many devices on USB bus, up to 7 daisy-chained 8-port hubs plus up to 44 devices connected to hub ports left after daisy-chaining, memory permitting. The high-level interface to USB devices has been re-designed as well.Also, pin reassignment can be done much easier by passing pin numbers into MAX3421E template during instantiation. As a result, low-level transfers became approximately 3.5 times faster. Arduino pin manipulation routines has been replaced with mechanism inspired by Konstantin Chizhov’s C++ AVR pin templates. The low-level interface to MAX3421E has been re-designed.Only 5 Arduino pins are now required for USB Host Shield to function – 3 standard SPI pins (SCK, MISO, MOSI) and 2 remappable pins (SS and INT).This new version contains several major improvements: What started as a quick re-factoring effort transformed to a major redevelopment, but finally all pieces fit together tightly and I am pleased to announce that initial release of USB Host Shield library ver.2.0 has been posted to github.