資源簡介
ESP8266模塊(串口轉(zhuǎn)WIFi)的開發(fā)SDK,資源在國外網(wǎng)站上,可以看但是下載容易中斷。來源網(wǎng)址https://github.com/espressif/ESP8266_RTOS_SDK/releases
代碼片段和文件信息
//?Copyright?2015-2016?Espressif?Systems?(Shanghai)?PTE?LTD
//
//?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
//?you?may?not?use?this?file?except?in?compliance?with?the?License.
//?You?may?obtain?a?copy?of?the?License?at
//?????http://www.apache.org/licenses/LICENSE-2.0
//
//?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
//?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
//?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
//?See?the?License?for?the?specific?language?governing?permissions?and
//?limitations?under?the?License.
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“esp_err.h“
#include?“esp_partition.h“
#include?“esp_spi_flash.h“
#include?“esp_image_format.h“
#include?“esp_secure_boot.h“
#include?“sdkconfig.h“
#include?“esp_ota_ops.h“
#include?“sys/queue.h“
#include?“crc.h“
#include?“esp_log.h“
#ifdef?CONFIG_TARGET_PLATFORM_ESP8266
#include?“spi_flash.h“
esp_err_t?bootloader_flash_read(size_t?src_addr?void?*dest?size_t?size?bool?allow_decrypt);
#endif
#define?OTA_MAX(ab)?((a)?>=?(b)???(a)?:?(b))?
#define?OTA_MIN(ab)?((a)?<=?(b)???(a)?:?(b))?
#define?SUB_TYPE_ID(i)?(i?&?0x0F)?
typedef?struct?ota_ops_entry_?{
????uint32_t?handle;
????const?esp_partition_t?*part;
????uint32_t?erased_size;
????uint32_t?wrote_size;
????uint8_t?partial_bytes;
????uint8_t?partial_data[16];
????LIST_ENTRY(ota_ops_entry_)?entries;
}?ota_ops_entry_t;
/*?OTA?selection?structure?(two?copies?in?the?OTA?data?partition.)
???Size?of?32?bytes?is?friendly?to?flash?encryption?*/
typedef?struct?{
????uint32_t?ota_seq;
????uint8_t??seq_label[24];
????uint32_t?crc;????????????????/*?CRC32?of?ota_seq?field?only?*/
}?ota_select;
static?LIST_HEAD(ota_ops_entries_head?ota_ops_entry_)?s_ota_ops_entries_head?=
????LIST_HEAD_INITIALIZER(s_ota_ops_entries_head);
static?uint32_t?s_ota_ops_last_handle?=?0;
static?ota_select?s_ota_select[2];
const?static?char?*TAG?=?“esp_ota_ops“;
#ifndef?CONFIG_ESP8266_BOOT_COPY_APP
static?inline?int?esp_ota_verify_binary(const?esp_partition_pos_t?*pos?esp_image_header_t?*image)
{
????const?int32_t?entry?=?image->entry_addr?-?0x40200010;
????ESP_LOGD(TAG?“OTA?binary?start?entry?0x%x?partition?start?from?0x%x?to?0x%x\n“?entry?pos->offset
????????????????????????pos->offset?+?pos->size);
????if?(pos->offset?+?pos->size?<=?0x100000)?{
????????if?(entry?<=?0?||?entry?<=?pos->offset?||?entry?>=?pos->offset?+?pos->size)?{
????????????const?char?*doc_str?=?“<>“;
????????????ESP_LOGE(TAG?“**Important**:?The?OTA?binary?link?data?is?error?“
??????????????????????????“please?refer?to?document?%s?for?how?to?generate?OTA?binaries“?doc_str);
????????????return?ESP_ERR_INVALID_ARG;
????????}
????}
????return?ESP_OK;
}
#endif
/*?Return?true?if?this?is?a
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\
?????文件??????????32??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\.gitattributes
?????文件?????????282??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\.gitignore
?????文件????????2580??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\.gitlab-ci.yml
?????文件????????5838??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\Kconfig
?????文件???????11358??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\LICENSE
?????文件????????7850??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\README.md
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\
?????文件?????????595??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\VERSION.md
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\
?????文件?????????456??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\Kconfig
?????文件?????????180??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\Makefile.projbuild
?????文件?????????131??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\component.mk
?????文件???????23311??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\esp_ota_ops.c
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\include\
?????文件????????8570??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\include\esp_ota_ops.h
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\test\
?????文件?????????112??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\test\component.mk
?????文件????????3352??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\app_update\test\test_ota_ops.c
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\
?????文件????????5168??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\Kconfig
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件????????8772??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件???????19046??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件???????13179??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件????????3622??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件?????????647??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件???????10431??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件????????9989??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????目錄???????????0??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
?????文件?????????388??2019-01-30?09:27??ESP8266_RTOS_SDK-3.1\components\aws_iot\aws-iot-device-sdk-em
............此處省略3104個文件信息
評論
共有 條評論