tck_bios_trans.c

来自「一个免费的SMART CARD OS系统。」· C语言 代码 · 共 132 行

C
132
字号
/* ============================================================================   Project Name : jayaCard TCK   Module Name  : proto/tck/bios/stream/tck_bios_trans.c   Version : $Id: tck_bios_trans.c,v 1.6 2004/01/11 09:56:34 dgil Exp $	Description: BIOS TRANSACTION    The Original Code is jayaCard TCK 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):	Permission is granted to any individual to use, copy, or redistribute	this software so long as all of the original files are included	unmodified, that it is not sold for profit, and that this copyright	notice is retained.    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.   History Rev	Description   050803 dgil	wrote it from scratch   ============================================================================*/#include "precomp.h"/* ============================================================================	globals   ========================================================================= *//* ============================================================================	__bios_send(byte)   ========================================================================= */void __bios_send( jbyte b){	/* just return ... */}/* ============================================================================	__bios_send_Iins()   ========================================================================= */void __bios_send_Iins(){	/* just return ... */}/* ============================================================================	__bios_receive() -> byte   ========================================================================= */static jbyte gN = 0;jbyte __bios_receive(){	/* just return ... */	return gN++;}/* ============================================================================	__hal_halt()   ========================================================================= */void __hal_halt(void){	/* just return ... */}/* ============================================================================	init flash/RAM for tests   ========================================================================= */jbyte	buf[128];void initTest(void){	jword	n;	for (n=0;n<0x400;n++) {		gEEPROM[BASE_EEPROM+n]=0xAA;	}	for (n=0;n<sizeof(buf);n++) {		buf[n] = 0xAA;	}}/* ============================================================================	Report errors   ========================================================================= */jword gTest = 1;void report(jbyte err,jbyte errn,jword line){	if (err==errn) {		printf(".");	} else {		printf("\n\t#%.2d FAILED in line %d!\n",gTest,line);		/* dump(&stream1); */	}	gTest++;}#define REPORT(a,b)	{ report(a,b,__LINE__); }/* ============================================================================	main()   ========================================================================= */int main(void){/*	jword	n; */	printf("Start of bios::transaction\n");	LOG_DISABLE("HAL");	LOG_DISABLE("BIOS");	LOG_DISABLE("EEPROM");	LOG_DISABLE("ERROR");	printf("\nEnd of bios::transaction\n");	return 0;}

⌨️ 快捷键说明

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