久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
ESP8266_OTA_LEXIN_學習版源碼(原創)
[打印本頁]
作者:
lijay910
時間:
2019-12-8 09:19
標題:
ESP8266_OTA_LEXIN_學習版源碼(原創)
ESP8266 之OTA升級學習源碼,原創,可以自己學習用也可以改,分享給大家!
單片機源程序如下:
/* main.c -- MQTT client example
*
* Copyright (c) 2014-2015, Tuan PM <tuanpm at live dot com>
* 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 "driver/uart.h"
#include "osapi.h"
//#include "wifi.h"
#include "config.h"
#include "gpio.h"
#include "user_interface.h"
#include "mem.h"
#include "../iotserver/include/user_net.h"
void wifiConnectCb(uint8_t status)
{
//tcp服務器
if(status == STATION_GOT_IP)
{
if(mDebug)
{
at_port_print("Connect to TCP Server\r\n");
}
connect_tcp_server();
}
else
{
disconnect_tcp_server();
}
}
/******************************************************************************
* FunctionName : user_rf_cal_sector_set
* Description : SDK just reversed 4 sectors, used for rf init data and paramters.
* We add this function to force users to set rf cal sector, since
* we don't know which sector is free in user's application.
* sector map for last several sectors : ABCCC
* A : rf cal
* B : rf init data
* C : sdk parameters
* Parameters : none
* Returns : rf cal sector
*******************************************************************************/
uint32 ICACHE_FLASH_ATTR
user_rf_cal_sector_set(void)
{
enum flash_size_map size_map = system_get_flash_size_map();
uint32 rf_cal_sec = 0;
switch (size_map) {
case FLASH_SIZE_4M_MAP_256_256:
rf_cal_sec = 128 - 5;
break;
case FLASH_SIZE_8M_MAP_512_512:
rf_cal_sec = 256 - 5;
break;
case FLASH_SIZE_16M_MAP_512_512:
case FLASH_SIZE_16M_MAP_1024_1024:
rf_cal_sec = 512 - 5;
break;
case FLASH_SIZE_32M_MAP_512_512:
case FLASH_SIZE_32M_MAP_1024_1024:
rf_cal_sec = 1024 - 5;
break;
case FLASH_SIZE_64M_MAP_1024_1024:
rf_cal_sec = 2048 - 5;
break;
case FLASH_SIZE_128M_MAP_1024_1024:
rf_cal_sec = 4096 - 5;
break;
default:
rf_cal_sec = 0;
break;
}
return rf_cal_sec;
}
void user_init(void)
{
//此例子完全開源,某些作者還需要打賞,這個完全是根據樂鑫的官方例子的改進的,需要商用版的請聯系
BOOL bRet = FALSE;
char buffer[20] = {0};
uart_init(BIT_RATE_115200, BIT_RATE_115200);//jay lee 20180228 波特率
os_delay_us(60000);
user_net_init(wifiConnectCb);
}
復制代碼
所有資料51hei提供下載:
ESP8266_OTA_LEXIN.7z
(2.13 MB, 下載次數: 10)
2019-12-8 14:25 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
99久久久无码国产精品
|
亚洲福利网
|
欧美在线一区二区三区
|
欧美一级片在线看
|
狠狠干网站
|
日韩在线欧美
|
超碰伊人
|
久久久久久久久久久久久9999
|
国产日韩精品久久
|
91佛爷在线观看
|
人人干在线
|
欧美中文字幕一区二区三区
|
亚洲一区欧美一区
|
美女张开腿露出尿口
|
亚洲一区中文字幕
|
91综合在线视频
|
看av在线
|
亚洲 中文 欧美 日韩 在线观看
|
国产精品美女久久久久aⅴ国产馆
|
国产小视频精品
|
亚洲高清在线
|
av激情影院
|
免费在线成人网
|
伊人色综合久久天天五月婷
|
有码一区
|
91视频观看
|
国产日韩欧美在线
|
亚洲精品一区二三区不卡
|
亚洲狠狠爱
|
国产精品av久久久久久久久久
|
国产黄色网址在线观看
|
毛片视频免费观看
|
超碰97人人人人人蜜桃
|
中文字幕国产视频
|
成人精品一区二区
|
黄色毛片免费看
|
成人h电影在线观看
|
中文精品视频
|
日日干日日色
|
ririsao久久精品一区
|
日韩精品在线播放
|