资源简介
Esp8266 百万条消息免费之乐鑫esp8266使用TCP直连模式MQTT协议接入阿里云物联网平台,支持私家服务器对接,支持阿里云规则引擎。。 - CSDN博客 https://blog.csdn.net/xh870189248/article/details/83149619
代码片段和文件信息
/*
/* config.c
*
* Copyright (c) 2014-2015 Tuan PM
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
* CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include “ets_sys.h“
#include “os_type.h“
#include “mem.h“
#include “osapi.h“
#include “user_interface.h“
#include “mqtt.h“
#include “config.h“
#include “user_config.h“
#include “debug.h“
SYSCFG sysCfg;
SAVE_FLAG saveFlag;
void ICACHE_FLASH_ATTR
CFG_Save()
{
spi_flash_read((CFG_LOCATION + 3) * SPI_FLASH_SEC_SIZE
(uint32 *)&saveFlag sizeof(SAVE_FLAG));
if (saveFlag.flag == 0)
{
spi_flash_erase_sector(CFG_LOCATION + 1);
spi_flash_write((CFG_LOCATION + 1) * SPI_FLASH_SEC_SIZE
(uint32 *)&sysCfg sizeof(SYSCFG));
saveFlag.flag = 1;
spi_flash_erase_sector(CFG_LOCATION + 3);
spi_flash_write((CFG_LOCATION + 3) * SPI_FLASH_SEC_SIZE
(uint32 *)&saveFlag sizeof(SAVE_FLAG));
}
else
{
spi_flash_erase_sector(CFG_LOCATION + 0);
spi_flash_write((CFG_LOCATION + 0) * SPI_FLASH_SEC_SIZE
(uint32 *)&sysCfg sizeof(SYSCFG));
saveFlag.flag = 0;
spi_flash_erase_sector(CFG_LOCATION + 3);
spi_flash_write((CFG_LOCATION + 3) * SPI_FLASH_SEC_SIZE
(uint32 *)&saveFlag sizeof(SAVE_FLAG));
}
}
void ICACHE_FLASH_ATTR
CFG_Load()
{
INFO(“\r\nload ...\r\n“);
spi_flash_read((CFG_LOCATION + 3) * SPI_FLASH_SEC_SIZE
(uint32 *)&saveFlag sizeof(SAVE_FLAG));
if (saveFlag.flag == 0)
{
spi_flash_read((CFG_LOCATION + 0) * SPI_FLASH_SEC_SIZE
(uint32 *)&sysCfg sizeof(SYSCFG));
}
else
{
spi_flash_read((CFG_LOCATION + 1) * SPI_FLASH_SEC_SIZE
(uint32 *)&sysCfg si
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\
文件 4445 2018-10-19 10:17 26_ESP8266_ALiYun_TCP_MQTT\.cproject
文件 791 2018-01-24 14:41 26_ESP8266_ALiYun_TCP_MQTT\.project
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\.settings\
文件 1225 2018-10-18 15:05 26_ESP8266_ALiYun_TCP_MQTT\.settings\language.settings.xm
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\.vscode\
文件 71 2018-10-18 15:47 26_ESP8266_ALiYun_TCP_MQTT\.vscode\settings.json
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\.output\
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\.output\eagle\
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\.output\eagle\debug\
目录 0 2018-10-19 11:59 26_ESP8266_ALiYun_TCP_MQTT\app\.output\eagle\debug\bin\
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\.output\eagle\debug\image\
文件 437373 2018-10-19 11:59 26_ESP8266_ALiYun_TCP_MQTT\app\.output\eagle\debug\image\eagle.app.v6.out
文件 3226 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\gen_misc.bat
文件 3798 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\gen_misc.sh
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\include\
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\include\driver\
文件 3406 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\driver\uart.h
文件 5801 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\driver\uart_register.h
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\include\modules\
文件 2111 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\modules\config.h
文件 285 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\modules\wifi.h
目录 0 2018-10-19 12:03 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\
文件 386 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\debug.h
文件 5301 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\mqtt.h
文件 4946 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\mqtt_msg.h
文件 860 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\proto.h
文件 2029 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\queue.h
文件 524 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\ringbuf.h
文件 263 2017-05-05 03:01 26_ESP8266_ALiYun_TCP_MQTT\app\include\mqtt\typedef.h
............此处省略202个文件信息
相关资源
- 使用cJson在乐鑫 esp8266 如何解析一段
- 乐鑫 esp8266 源码分析 MQTT 实现过程,
- 乐鑫Esp8266驱动 ds18b20、dht11 温湿度传
- Esp8266进阶之路Windows系统搭建8266的本
- ESP8266模块激活工具
- 实现乐鑫esp8266的无线OTA升级,实现远
- STM32 控制ESP8266 WIFI模块 连接OneNET
- ESP8266和stm32之四实现LCD联网
-
ESP8266_NONOS_SDK-2.2.1_ba
sed_USARTrevised. - 环境监测系统
- 基于51单片机接入阿里云物联网.pdf
- esp8266创建MQTT任务,订阅接收和发布发
- 正点原子mini开发板+DHT11测量温湿度上
- STM32&ESP8266;开发板电路图
- STM32f103 物联网OV2640摄像头wifi传送
- 安信可ESP8266模块调试工具V3.0.0
- 基于物联网的智慧宿舍的设计
- 百度云IoT物联网平台 -ESP8266-MQTT 1路开
- OneNet云IoT物联网平台 ESP8266 MQTT 1路开
- esp8266固件烧写.zip
- stm32esp8266连web服务器.rar
- ESP8266 SDK入门指南
- ESP8266原理图和封装
- esp8266-NONOS_SDK-2.2.1_AT
- ESP8266二次开发源码
- esp8266和stm32之五,能连接路由器和增
- f103 c8t6 esp8266连接阿里云.rar
- stm32通过esp8266把温湿度和gps地图上传
- 安信可ESP8266安卓手机测试软件
- ESP8266WiFi探针代码
评论
共有 条评论