⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.h

📁 coldfire5206芯片平台的升级程序
💻 H
字号:
#ifndef	MAIN_H
#define MAIN_H

//#include "externs.h"
//#include "bastype.h"
//#include "mbuspack.h"
//#include "mbusman.h"


#pragma pack(1)	// following info need to store, so is removed word-matching
// ---------------------    1、系统标志信息结构		-----------------------------
//**************************************************************
//原来为2040,但最后256个字节有的EEPROM不能用,所以更改为1782
#define EEPROM_SYSTEM_FLAG_POS	1782	
//	xx00            主程序有效标志(保留给旧的升级软件使用)
//	xx01            升级请求标志
//	xx02            需要升级的机器号
//	xx03            需要升级的端口号
//	xx04            波特率
//	xx05-xx09      保留
typedef struct _eeprom_system_flag
{
	UINT8	ucMainSysIsValid;		
	UINT8	ucUpdateIsValid;	
	UINT8	ucUpdateMachineID;	
	UINT8	ucUpdatePortID;		
	UINT8	ucUpdateUartBaud;	
	UINT8	acReserved[5];	
} EEPROMSYSFLAG;
//  系统标志(不变)FLASH 地址定义(0x800000开始):
//	xx08	    本机的升级机器号
//	xx09        本机的升级端口号
//  xx0a		引导程序版本
//	xx0b		保留
//  xx0c - xx13 FLASH ID
//  xx14		FLASH 容量标记
//  xx15		FLASH 硬件走线类型
//  xx16-xx19	FPGA文件在FLASH的位置
//  xx1a-xx1d	语言库在FLASH的位置
//  xx1e-xx21	配置数据在FLASH的位置
//  xx22-xx3b	保留
//  xx3c-xx3f	校验和
#define FLASH_SYSTEM_FLAG_POS	0x800008
typedef struct _flash_system_flag
{
	UINT8	ucSelfMachineID;
	UINT8	ucSelfPortID;
	UINT8	ucBiosVer;
	UINT8	ucReserved1;
	UINT8	acFlashID[8];
	UINT8	ucFlashSizeType;
	UINT8	ucFlashCircuitType;
	UINT32  lFpgaPos;
	UINT32  lLangPos;
	UINT32  lConfigPos;
	UINT8	acReserved2[26];
	UINT32	lChecksum;
} FLASHSYSFLAG;
typedef struct system_config_flag
{
	EEPROMSYSFLAG stESysFlag;
	FLASHSYSFLAG stFSysFlag;
} SYSCONFIGFLAG;
////////////////////////////////////////////////////
// 软件组件信息结构
// 对于系统软件,放在配置数据中的系统软件信息
//901			机器类型
//902-905	系统软件长度
//906-909	系统软件版本
//910-913	系统软件校验和
//914-960	保留
//961-964	系统软件信息校验和
// 对于FPGA,放在FPGA数据开始位置
//0		FPGA类型
//1-4	FPGA数据长度
//5-8	FPGA数据版本
//9-12	FPGA数据校验和
//13-59	保留	
//60-63	信息头校验和
#define CONFIG_SYS_SOFT_INFO_POS	901

typedef struct _soft_component_info
{
	UINT8	ucType;
	UINT32	lComLen;
	UINT8	acVer[4];
	UINT32  lComChecksum;
	UINT8	acReserved[47];
	UINT32	lChecksum;
} SOFTCOMINFO;

//**************************************************************

#pragma pack(0)		// pack defination is over


extern SYSCONFIGFLAG g_stSysFlag;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -