34 lines
660 B
C
34 lines
660 B
C
|
|
#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<69>ļ<EFBFBD><C4BC>ij<EFBFBD><C4B3><EFBFBD>
|
|||
|
|
char iapUrl[20]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>URL
|
|||
|
|
char id[15];//<2F><><EFBFBD>³<EFBFBD><C2B3><EFBFBD>ָ<EFBFBD><D6B8>id<69><64><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>³ɹ<C2B3><C9B9><EFBFBD>
|
|||
|
|
uint32_t BinWriteAdd;//bin<69>ļ<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>ַ
|
|||
|
|
uint16_t HttpHeadcount;
|
|||
|
|
uint16_t bit2K_Pointer;//<2F><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>2K<32>ļ<EFBFBD>ָ<EFBFBD><D6B8>
|
|||
|
|
uint8_t GetBinFlag;//<2F><>ȡBIN<49>ļ<EFBFBD><C4BC>ɹ<EFBFBD><C9B9><EFBFBD>־λ
|
|||
|
|
uint8_t bit2K_Select;//2k<32><6B><EFBFBD>ݶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>־λ ȡֵ0 1
|
|||
|
|
uint8_t HttpFlag;//httpͷ<70><CDB7>־λ
|
|||
|
|
}IAP_Stuct;
|
|||
|
|
|
|||
|
|
extern IAP_Stuct IAPStuct;
|
|||
|
|
|
|||
|
|
#define IAP_STRUCT_LEN sizeof(IAP_Stuct)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /*__OTA_H__*/
|
|||
|
|
|
|||
|
|
|