]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/net/cellular/UbloxUSBModem/UbloxGSMModemInitializer.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / net / cellular / UbloxUSBModem / UbloxGSMModemInitializer.h
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
19 #ifndef UBLOXGSMMODEMINITIALIZER_H
20 #define UBLOXGSNMODEMINITIALIZER_H
21
22 #include "WANDongleInitializer.h"
23
24 enum
25 {
26   WAN_DONGLE_TYPE_UBLOX_LISAU200 = 0x0200
27 };
28
29 //-----------------------------------------------------------------------
30 // mamm, u-blox Modem
31 //-----------------------------------------------------------------------
32
33 class UbloxGSMModemInitializer : public WANDongleInitializer
34 {
35 public:
36     UbloxGSMModemInitializer(USBHost* pHost);
37     
38     virtual uint16_t getMSDVid();
39     virtual uint16_t getMSDPid();
40     
41     virtual uint16_t getSerialVid();
42     virtual uint16_t getSerialPid();
43     
44     virtual bool switchMode(USBDeviceConnected* pDev);
45     
46     virtual int getSerialPortCount();
47     
48     virtual void setVidPid(uint16_t vid, uint16_t pid);
49     
50     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
51     
52     virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used
53     
54     virtual int getType();
55
56 private:
57
58   bool m_hasSwitched;
59   int m_currentSerialIntf;
60   int m_endpointsToFetch;
61 };
62
63 #endif