HAL_Project/Project -APP-V1.0/Hardware/OTA/ota.h

34 lines
660 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __OTA_H__
#define __OTA_H__
#include "main.h"
uint8_t checkId(uint8_t *);
void otaUpData(void);
typedef struct {
uint16_t iapCrc; //crc16
uint32_t binLength;//bin文件的长度
char iapUrl[20]; //待更新文件的URL
char id[15];//更新程序指令id上传更新成功用
uint32_t BinWriteAdd;//bin文件写入地址
uint16_t HttpHeadcount;
uint16_t bit2K_Pointer;//串口接收2K文件指针
uint8_t GetBinFlag;//获取BIN文件成功标志位
uint8_t bit2K_Select;//2k数据段选择标志位 取值0 1
uint8_t HttpFlag;//http头标志位
}IAP_Stuct;
extern IAP_Stuct IAPStuct;
#define IAP_STRUCT_LEN sizeof(IAP_Stuct)
#endif /*__OTA_H__*/