Simple test for USSD message.
Dependencies: CellularUSBModem
Fork of UbloxUSBModem by
UbloxCDMAModemInitializer.h@1:71286b99c1cb, 2013-10-17 (annotated)
- Committer:
- bogdanm
- Date:
- Thu Oct 17 13:06:33 2013 +0300
- Revision:
- 1:71286b99c1cb
- Child:
- 5:60b48a013e86
Initial release of the UbloxUSBModem library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 1:71286b99c1cb | 1 | /* Copyright (c) 2010-2012 mbed.org, MIT License |
bogdanm | 1:71286b99c1cb | 2 | * |
bogdanm | 1:71286b99c1cb | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
bogdanm | 1:71286b99c1cb | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
bogdanm | 1:71286b99c1cb | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
bogdanm | 1:71286b99c1cb | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
bogdanm | 1:71286b99c1cb | 7 | * Software is furnished to do so, subject to the following conditions: |
bogdanm | 1:71286b99c1cb | 8 | * |
bogdanm | 1:71286b99c1cb | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
bogdanm | 1:71286b99c1cb | 10 | * substantial portions of the Software. |
bogdanm | 1:71286b99c1cb | 11 | * |
bogdanm | 1:71286b99c1cb | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
bogdanm | 1:71286b99c1cb | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
bogdanm | 1:71286b99c1cb | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
bogdanm | 1:71286b99c1cb | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
bogdanm | 1:71286b99c1cb | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
bogdanm | 1:71286b99c1cb | 17 | */ |
bogdanm | 1:71286b99c1cb | 18 | |
bogdanm | 1:71286b99c1cb | 19 | #ifndef UBLOXCDMAMODEMINITIALIZER_H |
bogdanm | 1:71286b99c1cb | 20 | #define UBLOXCDMAMODEMINITIALIZER_H |
bogdanm | 1:71286b99c1cb | 21 | |
bogdanm | 1:71286b99c1cb | 22 | #include <stdint.h> |
bogdanm | 1:71286b99c1cb | 23 | |
bogdanm | 1:71286b99c1cb | 24 | #include "WANDongleInitializer.h" |
bogdanm | 1:71286b99c1cb | 25 | #include "USBHost.h" |
bogdanm | 1:71286b99c1cb | 26 | #include "IUSBEnumerator.h" |
bogdanm | 1:71286b99c1cb | 27 | |
bogdanm | 1:71286b99c1cb | 28 | enum |
bogdanm | 1:71286b99c1cb | 29 | { |
bogdanm | 1:71286b99c1cb | 30 | WAN_DONGLE_TYPE_UBLOXC200 |
bogdanm | 1:71286b99c1cb | 31 | }; |
bogdanm | 1:71286b99c1cb | 32 | |
bogdanm | 1:71286b99c1cb | 33 | class UbloxCDMAModemInitializer : public WANDongleInitializer |
bogdanm | 1:71286b99c1cb | 34 | { |
bogdanm | 1:71286b99c1cb | 35 | public: |
bogdanm | 1:71286b99c1cb | 36 | UbloxCDMAModemInitializer(USBHost* pHost); |
bogdanm | 1:71286b99c1cb | 37 | |
bogdanm | 1:71286b99c1cb | 38 | virtual uint16_t getMSDVid(); |
bogdanm | 1:71286b99c1cb | 39 | virtual uint16_t getMSDPid(); |
bogdanm | 1:71286b99c1cb | 40 | |
bogdanm | 1:71286b99c1cb | 41 | virtual uint16_t getSerialVid(); |
bogdanm | 1:71286b99c1cb | 42 | virtual uint16_t getSerialPid(); |
bogdanm | 1:71286b99c1cb | 43 | |
bogdanm | 1:71286b99c1cb | 44 | virtual bool switchMode(USBDeviceConnected* pDev); |
bogdanm | 1:71286b99c1cb | 45 | |
bogdanm | 1:71286b99c1cb | 46 | virtual int getSerialPortCount(); |
bogdanm | 1:71286b99c1cb | 47 | |
bogdanm | 1:71286b99c1cb | 48 | virtual void setVidPid(uint16_t vid, uint16_t pid); |
bogdanm | 1:71286b99c1cb | 49 | |
bogdanm | 1:71286b99c1cb | 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 |
bogdanm | 1:71286b99c1cb | 51 | |
bogdanm | 1:71286b99c1cb | 52 | virtual bool useEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir); //Must return true if the endpoint will be used |
bogdanm | 1:71286b99c1cb | 53 | |
bogdanm | 1:71286b99c1cb | 54 | virtual int getType(); |
bogdanm | 1:71286b99c1cb | 55 | |
bogdanm | 1:71286b99c1cb | 56 | private: |
bogdanm | 1:71286b99c1cb | 57 | |
bogdanm | 1:71286b99c1cb | 58 | int m_currentSerialIntf; |
bogdanm | 1:71286b99c1cb | 59 | int m_currentEndpoint; |
bogdanm | 1:71286b99c1cb | 60 | }; |
bogdanm | 1:71286b99c1cb | 61 | |
bogdanm | 1:71286b99c1cb | 62 | #endif |
bogdanm | 1:71286b99c1cb | 63 |