📄 oseep.h
字号:
/*
Operating System
--------------------------------------------------------------------------
FILE oseep.h
--------------------------------------------------------------------------
INTRODUCTION
============
Created : 2002-10-03 Xiaoxi Jiang
Last modified : 2002-10-03 Xiaoxi Jiang
Module :
Purpose :
Header file.
List of routines in file :
File history :
*/
#ifndef __OSEEP_H
#define __OSEEP_H
/* MAXIMUM NUMBER OF APPLICATIONS */
#define MAX_APPLI 16
/* --- DECLARATION DE STRUCTURES GLOBALES --- */
/* STRUTURE MEMORY BLOCK */
struct s_donbloc { /* 1 memory page description */
uchar app_nr; /* application number using the memory page */
uchar type; /* bit 7 : 0 = data */
/* : 1 = code */
/* bit 6 : 0 = page ok */
/* 1 = page not ok */
/* bit 5-0 : logical page number */
};
/********************/
/* manufactory data */
/********************/
struct s_donprod {
uchar numser[4]; /* Serial number of device */
uchar typeep; /* EEPROM qualifier */
/* Pf : Size of EEPROM ( N * 128 bytes )*/
/* PF : Data structure of EEPROM */
uchar lotfab[2]; /* Manufactory identification number */
uchar sitpro; /* Hardware version number */
uchar vermat; /* Release hardware version number */
uchar indmat; /* Terminal functionalities */
uchar modter[2]; /* Terminal achitecture */
uchar prodoc[12]; /* Device manufacturing reference */
uchar sizemem[2]; /* Define capacity of each memory chip */
/* Binary attribution 2 bit by chip */
/* (00) 1 Mbit chip */
/* (01) 2 Mbit chip */
/* (10) 4 Mbit chip */
/* (11) 8 Mbit chip */
uchar typemem[2]; /* Define technology of each memory chip*/
/* Binary attribution 2 bit by chip */
/* (00) Static RAM */
/* (01) Flash RAM */
uchar disprint[7]; /* Type of display */
uchar iccspeed; /* maximum speed authorised for ICC readers */
uchar codpro[5]; /* Customer password */
uchar rfu[6]; /* R.F.U. */
uint crcprod; /* CRC of manufactoring data */
uchar tbattery[4]; /* Remainder time life of battery in minutes */
uchar miserv[3]; /* Date of installation (Size=3) */
};
/*****************/
/* security data */
/*****************/
struct s_donsecu {
uchar keytlv[300]; /* TLV structure for keys */
uint crckey; /* Checksum (Size=2) */
};
/**********************/
/* configuration data */
/**********************/
struct s_donconf {
uchar rampre; /* Size of memory ( N * 128 Kbytes ) */
struct s_donbloc bloc_mem[127]; /* Memory blocks state */
uchar famlog; /* Family software */
uchar iccnbr; /* Number of ICC readers */
uchar loadprofile[15]; /* Loading profile */
uchar flashpre; /* Flash memory size */
uchar nbrpins; /* Number of contacts on the ICC */
uchar rfu[12]; /* R.F.U. */
uint crcconf; /* CRC of configuration data (Size=2) */
};
/*********************/
/* flash memory data */
/*********************/
struct s_donflash {
uchar flashpage; /* Page location */
uchar manflash[8]; /* FLASH manufacturers ID */
uchar idflash[8]; /* FLASH chips ID */
uchar RFU1; /* unused (only for 16 bits address) */
uint bootflash; /* Start adress of FLASH software */
uchar RFU2; /* unused (only for 16 bits address) */
uint endflash; /* First adress free after FLASH software */
uint conflash; /* Chacksum of FLASH software */
uchar rfu[5]; /* R.F.U. */
uint crcflash; /* Checksum (Size=2) */
};
/**************/
/* modem data */
/**************/
struct s_donmodem {
uchar confreg[24]; /* Registers associate to built material */
uchar sitereg[50]; /* Registers associate to site implementation */
uchar hostreg[52]; /* Registers associate to host connection */
uint crcmodem; /* Checksum (Size=2) */
};
/*************/
/* bios data */
/*************/
struct s_donbios {
uchar idebios[2]; /* BIOS identification number */
uchar RFU1; /* unused ( only for 16 bits address) */
uint finbios; /* Free address after BIOS */
uchar extebios; /* Block number to extend BIOS software */
uint conbios; /* Checksum to control BIOS software */
uchar etabios; /* State of BIOS in memory */
uchar RFU2; /* unused ( only for 16 bits address) */
uint indbios; /* Start address of BIOS indirection's */
uchar eepbios; /* EEPROM structure managed */
uchar rfu[1]; /* R.F.U. */
uint crcbios; /* CRC of BIOS data (Size=2) */
};
/************/
/* icc data */
/************/
struct s_donicc {
uchar iccpage; /* Page location */
uchar ideicc; /* I.C.C software identification */
uchar RFU1; /* unused ( only for 16 bits address) */
uint booticc; /* Starting adress of I.C.C. software */
uchar RFU2; /* unused ( only for 16 bits address) */
uint endicc; /* Free adress after I.C.C. software */
uint conicc; /* Checksum to control I.C.C. software */
uchar stateicc; /* State of I.C.C. software in memory */
uchar rfu[3]; /* R.F.U. */
uint crcicc; /* CRC of I.C.C data (Size=2) */
};
/***********/
/* os data */
/***********/
struct s_doncdos {
uchar idenos[2]; /* OS identification number */
uchar RFU1; /* unused ( only for 16 bits address) */
uint bootos; /* Start address of OS */
uchar RFU2; /* unused ( only for 16 bits address) */
uint fincos; /* Last address of OS */
uchar exteos; /* Block number for OS extension */
uchar thirdos; /* Application number associate to OS */
uint contos; /* CRC of OS software */
uchar etatos; /* State of OS in memory */
uchar RFU3; /* unused ( only for 16 bits address) */
uint fronos; /* Start address for OS write protect memory */
uchar backos; /* Block number of bios/os backup */
/* 0 - No backup */
/* FF - Backup done */
/* others - block number */
uchar dataos; /* Block number of os data extension */
/* 0 - No extension */
/* ;other - Memory block number */
uchar rfu[12]; /* R.F.U. */
uint crcnos; /* CRC of OS data (Size=2) */
};
/********************/
/* application data */
/********************/
struct s_donapp {
uchar app_nr; /* application number */
uchar version; /* application version */
uchar page; /* bit 7 : section 0 ou 1 */
/* bit 6 : 0 = appli ok */
/* 1 = appli not ok */
/* bit 5 : 0 = no download requested */
/* 1 = download requested */
/* bit 4-0 : number of memory pages used by the application */
uint controle;
};
struct s_donprio {
uchar prioappli[16];
uint conprioapp;
};
struct s_map_eeprom { /* EEPROM mapping */
struct s_donprod donprod;
struct s_donsecu donsecu;
struct s_donconf donconf;
struct s_donflash donflash;
struct s_donmodem donmodem;
struct s_donbios donbios;
struct s_donicc donicc;
struct s_doncdos doncdos;
struct s_donapp donapp[MAX_APPLI];
struct s_donprio donprio;
};
typedef struct s_map_eeprom MAP_EEPROM;
/* --- MASKs DECLARATION (bit-for monos) --- */
#define PAGE_CODE 0x80 /* bit type of page 0:data 1:code */
#define INCOHERENCE 0x40 /* bit appli status 0:ok 1:nok */
#define DEM_TELEC 0x20 /* bit download request 0:no 1:yes */
#define MAS_NBR_BLOC 0x1F /* 5 bit of number of pages */
#define MAS_NUM_LOGIQ 0x1F /* 5 bit of logical page nr */
/* --- DECLARATION OF OFFSETS IN TABAPPLI --- */
#define MAX_BLOC 127 /* max nr of memory pages */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -