Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

USBDeviceInfo.h 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* USB Device Info class
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a
  4. * copy of this software and associated documentation files (the
  5. * "Software"), to deal in the Software without restriction, including
  6. * without limitation the rights to use, copy, modify, merge, publish,
  7. * distribute, sublicense, and/or sell copies of the Software, and to
  8. * permit persons to whom the Software is furnished to do so, subject to
  9. * the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included
  12. * in all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  15. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  17. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  18. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  19. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  20. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. */
  22. // This simple class does nothing, but print out information about the device it
  23. // extracts from calls to claim...
  24. #ifndef __USBDeviceInfo_h_
  25. #define __USBDeviceInfo_h_
  26. #include <Arduino.h>
  27. #include <USBHost_t36.h>
  28. class USBDeviceInfo : public USBDriver {
  29. public:
  30. USBDeviceInfo(USBHost &host) { init();}
  31. protected:
  32. virtual bool claim(Device_t *dev, int type, const uint8_t *descriptors, uint32_t len);
  33. virtual void disconnect() {};
  34. void init();
  35. };
  36. #endif