Keyboard firmwares for Atmel AVR and Cortex-M
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

IUSBEnumerator.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* mbed USBHost Library
  2. * Copyright (c) 2006-2013 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef IUSBENUMERATOR_H_
  17. #define IUSBENUMERATOR_H_
  18. #include "stdint.h"
  19. #include "USBEndpoint.h"
  20. /*
  21. Generic interface to implement for "smart" USB enumeration
  22. */
  23. class IUSBEnumerator
  24. {
  25. public:
  26. virtual void setVidPid(uint16_t vid, uint16_t pid) = 0;
  27. virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol) = 0; //Must return true if the interface should be parsed
  28. virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir) = 0; //Must return true if the endpoint will be used
  29. };
  30. #endif /*IUSBENUMERATOR_H_*/