123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- /**
- * Copyright(c) 2012 Sunmedia Technologies - All Rights Reserved.
- *
- * @file
- *
- * @brief Definitions for 9202 header info structure and operation.
- *
- * @note This file must match packmod tool.
- *
- */
- #ifndef _SYSTEM_HEADER_INFO_
- #define _SYSTEM_HEADER_INFO_
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #define FLAG_LEN (12)
- #define TIMESTAMP_LEN (32)
- #define SVN_LEN (8)
- /**
- * Version definition.
- * @brief Define header infomation version.
- *
- * @note These macro defines the version of header infomation, any changes of
- * configuration will lead to version increased by 1.
- *
- */
- #define BOOTSYSINFO_VER (1)
- #define MAINSYSINFO_VER (1)
- /** Macro define to get offset of item in a data structure */
- #define SYSHEADER_ITEMOFFSET(type, field) ((UINT32)&(((type *)0)->field))
- /** Macro define to get the size of item in a given data structure */
- #define SYSHEADER_ITEMSIZE(type, field) (sizeof ((type *)0)->field)
- /**
- * struct MAIN_HEAD_t
- * @brief main header parameter.
- *
- * @note This structure is for V1.
- *
- * This structure defines the parameter of system information.
- */
- typedef struct MAIN_HEAD_t
- {
- unsigned int s_version; /**< MAIN_HEAD_t version, zero means bad magic. currently V1 is valid */
- unsigned int version; /**< main code version */
- unsigned char flag[FLAG_LEN]; /**< s2tek */
- unsigned char OUI[3];
- unsigned short sw_model;
- unsigned short sw_version;
- unsigned short hw_model;
- unsigned short hw_version;
- unsigned char timestamp[TIMESTAMP_LEN];
-
- unsigned short Chipid;
- unsigned short flash_size;
- unsigned char sw_svnversion[SVN_LEN];
- } MAIN_HEAD_t;
- /**
- * struct LOADER_HEAD_t
- * @brief Bootloader header parameter.
- *
- * @note This structure is for V1.
- *
- * This structure defines the parameter of bootloader header information.
- */
- typedef struct LOADER_HEAD_t
- {
- unsigned int s_version; /**< LOADER_HEAD_t version, zero means bad magic. currently V1 is valid */
- unsigned int version; /**< bootloader version */
- unsigned char flag[FLAG_LEN]; /**< boot */
- /**
- * The following items are the same as main header, when main code is
- * unfortunatly destroied, bootloader will use these fields to recover
- * the system.
- */
- unsigned char OUI[3];
- unsigned short sw_model;
- unsigned short sw_version;
- unsigned short hw_model;
- unsigned short hw_version;
- unsigned short Chipid;
- } LOADER_HEAD_t;
- #ifdef __cplusplus
- }
- #endif
- #endif /* _SYSTEM_HEADER_INFO_ */
|