modified by ohneta
Dependents: HelloESP8266Interface_mine
Fork of ESP8266Interface by
ESP8266Interface.h@10:80ece8d5aa2d, 2015-06-17 (annotated)
- Committer:
- sam_grove
- Date:
- Wed Jun 17 20:57:21 2015 +0000
- Revision:
- 10:80ece8d5aa2d
Giving it a name. Being abstract was making thing confusing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove | 10:80ece8d5aa2d | 1 | /* ESP8266Interface |
sam_grove | 10:80ece8d5aa2d | 2 | * Copyright (c) 2015 ARM Limited |
sam_grove | 10:80ece8d5aa2d | 3 | * |
sam_grove | 10:80ece8d5aa2d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sam_grove | 10:80ece8d5aa2d | 5 | * you may not use this file except in compliance with the License. |
sam_grove | 10:80ece8d5aa2d | 6 | * You may obtain a copy of the License at |
sam_grove | 10:80ece8d5aa2d | 7 | * |
sam_grove | 10:80ece8d5aa2d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
sam_grove | 10:80ece8d5aa2d | 9 | * |
sam_grove | 10:80ece8d5aa2d | 10 | * Unless required by applicable law or agreed to in writing, software |
sam_grove | 10:80ece8d5aa2d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
sam_grove | 10:80ece8d5aa2d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sam_grove | 10:80ece8d5aa2d | 13 | * See the License for the specific language governing permissions and |
sam_grove | 10:80ece8d5aa2d | 14 | * limitations under the License. |
sam_grove | 10:80ece8d5aa2d | 15 | */ |
sam_grove | 10:80ece8d5aa2d | 16 | |
sam_grove | 10:80ece8d5aa2d | 17 | #ifndef ESP8266INTERFACE_H |
sam_grove | 10:80ece8d5aa2d | 18 | #define ESP8266INTERFACE_H |
sam_grove | 10:80ece8d5aa2d | 19 | |
sam_grove | 10:80ece8d5aa2d | 20 | #include "WiFiInterface.h" |
sam_grove | 10:80ece8d5aa2d | 21 | |
sam_grove | 10:80ece8d5aa2d | 22 | /** ESP8266Interface class. |
sam_grove | 10:80ece8d5aa2d | 23 | This is a interface to the ESP8266 WiFi radio |
sam_grove | 10:80ece8d5aa2d | 24 | */ |
sam_grove | 10:80ece8d5aa2d | 25 | class ESP8266Interface : public WiFiInterface |
sam_grove | 10:80ece8d5aa2d | 26 | { |
sam_grove | 10:80ece8d5aa2d | 27 | public: |
sam_grove | 10:80ece8d5aa2d | 28 | |
sam_grove | 10:80ece8d5aa2d | 29 | ESP8266Interface(); |
sam_grove | 10:80ece8d5aa2d | 30 | ESP8266Interface(const char *ap, const char *pass_phrase = 0, wifi_security_t security = WI_NONE, uint32_t timeout_ms = 15000); |
sam_grove | 10:80ece8d5aa2d | 31 | virtual int32_t init(void) const; |
sam_grove | 10:80ece8d5aa2d | 32 | virtual int32_t init(const char *ip, const char *mask, const char *gateway) const; |
sam_grove | 10:80ece8d5aa2d | 33 | virtual int32_t connect(uint32_t timeout_ms) const; |
sam_grove | 10:80ece8d5aa2d | 34 | virtual int32_t connect(const char *ap, const char *pass_phrase = 0, wifi_security_t security = WI_NONE, uint32_t timeout_ms = 15000) const; |
sam_grove | 10:80ece8d5aa2d | 35 | virtual int32_t disconnect(void) const; |
sam_grove | 10:80ece8d5aa2d | 36 | virtual char *getIPAddress(void) const; |
sam_grove | 10:80ece8d5aa2d | 37 | virtual char *getGateway(void) const; |
sam_grove | 10:80ece8d5aa2d | 38 | virtual char *getNetworkMask(void) const; |
sam_grove | 10:80ece8d5aa2d | 39 | virtual char *getMACAddress(void) const; |
sam_grove | 10:80ece8d5aa2d | 40 | virtual int32_t isConnected(void) const; |
sam_grove | 10:80ece8d5aa2d | 41 | }; |
sam_grove | 10:80ece8d5aa2d | 42 | |
sam_grove | 10:80ece8d5aa2d | 43 | #endif |