Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of AvnetATT_shape_hackathon by
Wnc.h
00001 00002 #ifndef Wnc_ 00003 #define Wnc_ 00004 00005 #define WNC_WAIT_TIME_MS 500 00006 00007 00008 extern void SetLedColor(unsigned char ucColor); 00009 00010 00011 class Wnc { 00012 public: 00013 Wnc(void); 00014 bool init(void); 00015 bool isModemResponding(); 00016 00017 char* read(int timeout_ms); 00018 char* send(const char *cmd, int timeout_ms); 00019 00020 00021 void setPowerSave(bool on,int t3412,int t3324); 00022 void resumePowerSave(); 00023 bool isPowerSaveOn(); 00024 int gett3412Timer(); 00025 int gett3324Timer(); 00026 void wakeFromPowerSave(); 00027 00028 char* getIccid(); 00029 bool startInternet(); 00030 bool connect(char* ip, int port); 00031 void disconnect(); 00032 bool writeSocket(const char * s); 00033 char* readSocket(); 00034 char* ping(char* ip); 00035 void setIn(); 00036 void passthrough(); 00037 void checkPassthrough(); 00038 void toggleWake(); 00039 char* resolveDn(const char* name); 00040 bool cmdFailed(char* reply,char* msg); 00041 00042 private: 00043 int secToTau(int time); 00044 int secToActivity(int time); 00045 int hex_to_int(char c); 00046 int hex_to_ascii(char h, char l); 00047 int indexOf(char* str, char c); 00048 char* encode(int value, char* result, int base); 00049 }; 00050 00051 #endif
Generated on Tue Jul 12 2022 21:53:53 by
1.7.2
