📄 simueep.h
字号:
#ifndef SIMUEEP__H/* ============================================================================ Project Name : jayaCard Module Name : proto/hal/simu/simueep.h Version : $Id: simueep.h,v 1.14 2004/04/23 20:29:16 dgil Exp $ Description: simulator eeprom specific API The Original Code is jayaCard code. The Initial Developer of the Original Code is Gilles Dumortier. Portions created by the Initial Developer are Copyright (C) 2002-2004 the Initial Developer. All Rights Reserved. Contributor(s): This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see http://www.gnu.org/licenses/gpl.html History Rev Description 072102 dgil wrote it from scratch ============================================================================*/#define SIMUEEP__H/* ========================================================================= eeprom file numbering ========================================================================= */#define EEPROM_FILE_LIVE -1#define EEPROM_FILE_START 0#define EEPROM_FILE_LATEST 999/* ========================================================================= Simulator EEPROM (blank / load / save) input files: eepromXXX.bin current state of the EEPROM content in binary format msk.bin optional file with master key value (16 bytes) mdata.bin optional file with manufacturing data (up to 48 bytes) uuid.bin optional file with chip uuid (8 bytes) ========================================================================= *//* start with a blank eeprom content */jbool __simu_blank_eeprom(void);/* load eeprom.bin into EEPROM content */jbool __simu_load_eeprom(int num);/* save EEPROM content to eepromXXX.bin */jbool __simu_save_eeprom(int num);/* ========================================================================= gEEPROM - array to store the EEPROM bytes ========================================================================= */#define SIMU_EEPROM_SIZE 65536Lextern jbyte gEEPROM[SIMU_EEPROM_SIZE];#if defined(JAYACFG_EEPROM_INVERSED)#define DEFAULT_CELL_VALUE 0xFF#else#define DEFAULT_CELL_VALUE 0x00#endif/* ========================================================================= Eeprom file header sizeof == 128 ========================================================================= */typedef struct tagEepromFileHeader { /* endianess of the file (compatibility checking) */ jword wEndianess; /* version of the COS which has generated the file (information only) */ jbyte byCOSVersion; jbyte byCOSSubversion; jword wCOSBuild; /* version of the Eeprom File Structure (compatibility checking) */ jbyte byHdrVersion; /* reserved for header extension */ jbyte reserved[122];} EEPROM_FILE_HEADER;/* increment this value when EEPROM structure change ... */#define EEPROM_FILE_HEADER_HDR_VERSION 6#define EEPROM_PLATFORM_LITTLE_ENDIAN 0x3412#define EEPROM_PLATFORM_BIG_ENDIAN 0x1234/* ========================================================================= */#endif/* defined SIMUEEP__H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -