91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 9KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-24
  • 語言: 其他
  • 標簽: WIFI驅動??STM32??

資源簡介

ESp8266驅動,基于stm32F103的標準庫,可自己改成hal庫。

資源截圖

代碼片段和文件信息

#include?“connect.h“
#include?“esp8266.h“
#include?“pro_phy.h“
#include?“timer.h“
#include?“usart.h“
#include?“pro_memory.h“
#include?“led.h“
#include?“bsp.h“
#include?“MQTTPacket.h“

ESP8266_obj?esp8266;
Store_obj?Store_Data;
MQTT_obj?mqtt;
static?msg_obj?msg[MAX_NODE_NUM];

char?post_buff[PAYLOAD_DATA_LEN]={0};
static?char?ser_data[512]={0};
//static?char?cmd_buf[256]={0};
static?unsigned?char?buf[200]={0};

static?const?char?html_head[]=“tle>Configtle>yle=\“font-size:20px\“>“;
static?const?char?html_set1[]=“yle=\“font-size:75px\“?value=\“Set?ApiKey\“>

“;
static?const?char?html_set2[]=“yle=\“font-size:75px\“?value=\“Set?Server\“>

“;
static?const?char?html_set3[]=“yle=\“font-size:75px\“?value=\“Set?Router\“>

“;
static?const?char?html_exit[]=“yle=\“font-size:75px\“?value=\“Exit\“>
“;
static?const?char?html_login[]=“yle=\“font-size:75px\“>usernameyle=\“font-size:75px\“>
passwordyle=\“font-size:75px\“>
yle=\“font-size:75px\“>ok
“;
static?const?char?html_set_apiKey[]=“yle=\“font-size:75px\“>apiKeyyle=\“font-size:75px\“>
yle=\“font-size:75px\“>ok
“;
static?const?char?html_set_server[]=“yle=\“font-size:75px\“>serveryle=\“font-size:75px\“>
yle=\“font-size:75px\“>ok
“;
static?const?char?html_end[]=““;

void?Connect_Init(void)
{
HTTP_LED=1;
ESP_Init();
MemSet((BYTE?*)&esp82660sizeof(ESP8266_obj));
MemSet((BYTE?*)&Store_Data0sizeof(Store_obj));
MemSet((BYTE?*)&msg0sizeof(msg_obj)*MAX_NODE_NUM);
MemSet((BYTE?*)&mqtt0sizeof(MQTT_obj));
esp8266.state=WAIT_LOGIN;
if(NRF_IsHaveStoreData(PRO_STORE_FLAGPRO_STORE_FLASH_ADDRESS))
{
NRF_ReadDataFromStore(PRO_STORE_FLAGPRO_STORE_FLASH_ADDRESS(u8?*)&Store_Datasizeof(Store_obj));
}
esp8266.state=WAIT_LOGIN;
esp8266.mode=ESP_CLIENT;//
ESP_PowerOn();//ESP8266模塊上電
ESP_HardReset();
mqtt.port=1883;
esp8266.port=8080;
HTTP_LED=0;
}

void?Msg_Get(u8?*nodeu8?*valu8?*type)
{
u8?i;

*node=msg[0].addr;//獲取消息
*val=msg[0].data;
*type=msg[0].type;
for(i=1;i {
msg[i-1].addr=msg[i].addr;
msg[i-1].data=msg[i].data;
msg[i-1].type=msg[i].type;
}
}

u8?Msg_Put(u8?nodeu8?valu8?type)
{
u8?k=0;

if(node)//有效地址
{
for(k=0;?k {
if(msg[k].addr==node)//有地址更新
{
msg[k].addr=node;

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????17026??2017-09-16?08:28??Esp8266\connect.c

?????文件???????1476??2017-09-12?15:11??Esp8266\connect.h

?????文件???????8709??2017-09-16?10:45??Esp8266\esp8266.c

?????文件???????1678??2017-09-13?08:07??Esp8266\esp8266.h

?????目錄??????????0??2017-09-16?10:45??Esp8266

-----------?---------??----------?-----??----

????????????????28889????????????????????5


評論

共有 條評論