STM32F103C8T6,ONENET,ESP8266
Dependents: STM32F103C8T6_OneNet_IoT
Diff: wifi_example.h
- Revision:
- 0:cbe8a0553d45
- Child:
- 1:8512a7d76959
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wifi_example.h Wed Mar 29 03:08:46 2017 +0000 @@ -0,0 +1,37 @@ +#ifndef WIFI_EXAMPLE_H_H +#define WIFI_EXAMPLE_H_H + +#include "mbed.h" +#include "Common.h" +#include "EdpKit.h" +#include "cJSON.h" +#include "ESP8266.h" + +#include <time.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define DEVICEID "5116906" +#define APIKEY "E75QrwTpTp5hmWCxljc0Seg1KS0=" +#define APNAME "AnChuangKongJian" +#define APPASSWD "jiasuqi@0111" +#define TCPNUM 0 +#define TCPADD "jjfaedp.hedevice.com" +#define TCPPORT 876 + +#define MAX_SEND_BUF_LEN 1024 + +extern EdpPacket* send_pack; +extern char send_buf[MAX_SEND_BUF_LEN]; +extern char read_buf[MAX_SEND_BUF_LEN]; + +extern void connectInit(void); +extern void sendJsonDat(char* dataName, float data); +extern void sendData(char* dataName, float data); +extern void devLink(const char* devid, const char* auth_key); +extern int checkSocketStatus(void); + + +#endif +