UbloxCDMAModemInitializer.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* Copyright (c) 2010-2012 mbed.org, MIT License
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
  4. * and associated documentation files (the "Software"), to deal in the Software without
  5. * restriction, including without limitation the rights to use, copy, modify, merge, publish,
  6. * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
  7. * Software is furnished to do so, subject to the following conditions:
  8. *
  9. * The above copyright notice and this permission notice shall be included in all copies or
  10. * substantial portions of the Software.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
  13. * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  14. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  15. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. */
  18. #ifndef UBLOXCDMAMODEMINITIALIZER_H
  19. #define UBLOXCDMAMODEMINITIALIZER_H
  20. #include <stdint.h>
  21. #include "WANDongleInitializer.h"
  22. #include "USBHost.h"
  23. #include "IUSBEnumerator.h"
  24. enum
  25. {
  26. WAN_DONGLE_TYPE_UBLOX_LISAC200 = 0xC200,
  27. };
  28. class UbloxCDMAModemInitializer : public WANDongleInitializer
  29. {
  30. public:
  31. UbloxCDMAModemInitializer(USBHost* pHost);
  32. virtual uint16_t getMSDVid();
  33. virtual uint16_t getMSDPid();
  34. virtual uint16_t getSerialVid();
  35. virtual uint16_t getSerialPid();
  36. virtual bool switchMode(USBDeviceConnected* pDev);
  37. virtual int getSerialPortCount();
  38. virtual void setVidPid(uint16_t vid, uint16_t pid);
  39. virtual bool parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol); //Must return true if the interface should be parsed
  40. virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used
  41. virtual int getType();
  42. private:
  43. int m_currentSerialIntf;
  44. int m_currentEndpoint;
  45. };
  46. #endif