From 842bb64195f958b050867c50db66fc0aa413dafb Mon Sep 17 00:00:00 2001 From: QuakeGod <quakegod@sina.com> Date: 星期六, 27 七月 2024 10:42:56 +0800 Subject: [PATCH] KBus upgrade --- KBus/Inc/BoardType.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 40 insertions(+), 2 deletions(-) diff --git a/KBus/Inc/BoardType.h b/KBus/Inc/BoardType.h index caef6a9..676ed73 100644 --- a/KBus/Inc/BoardType.h +++ b/KBus/Inc/BoardType.h @@ -43,8 +43,9 @@ }; -#define BOARD_TYPE 10 -#define BOARD_VER 1 +#define BOARD_TYPE 8 +#define BOARD_VER 2 + #if (BOARD_TYPE == 11) #define XLAT_FREQ 12 @@ -73,5 +74,42 @@ #define DOUTPUT 0 #endif +typedef struct tagInfoBlockHdr { + unsigned short nBlkSign; // 开始标志 + unsigned short nBlkTypeVer; // 类型和版本 + unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 + unsigned short Pad1; +}stInfoBlockHdr; + +typedef struct tagInfoBlockTail { + + unsigned short CRC16; + unsigned short EndSign; +}stInfoBlockTail; + +typedef struct tagBtLdrInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nBtldrVer; + unsigned short nBtldrDevice; + unsigned short nBtldrSize; // 设计大小 + unsigned short nBtldrDataSize; //代码大小 + unsigned int nBtldr_AppAddr; + unsigned int nBtldr_NewAppInfoAddr; + unsigned int nBtldr_NewAppAddr; + stInfoBlockTail tail; +}stBtLdrInfoBlock, *pBtLdrInfoBlock; + +typedef struct tagAppInfoBlock { + stInfoBlockHdr Hdr; + unsigned short nAppVer; + unsigned short nAppDevice; + unsigned short nAppSize; // 代码设计大小 + unsigned short nAppDataSize; //实际代码大小 + unsigned int nAppStartAddr; + unsigned int nAppStartOffset; + unsigned int nApp; + stInfoBlockTail tail; +}stAppInfoBlock, * pAppInfoBlock; + #endif /* __BOARDTYPE_H__ */ -- Gitblit v1.9.1