输入条件:SysKind=0--->EasmChip的操作,SysKind=1-->CpuCard的操作,FileId二进制文件标识符
输出项目:RetData=0x00操作成功;RetData=0xFF此操作失败,数据放入CosBuf[0]。
unsigned char ReadRecord(bool SysKind,unsigned char FileId) { unsigned char i; CmdBuf[CLA] = 0x00; CmdBuf[INS] = 0xB2; CmdBuf[P01] = 0x01; FileId <<= 3; FileId += 0x04; CmdBuf[P02] = FileId; CmdBuf[P03] = 3; for(i = 0; i < 3; i++) { CosCommand(SysKind,3,3); if( (SwBuf[0] == 0x90) && (SwBuf[1] == 0x00) ) { break; } } if(i < 3) { return 0x00; } else { return 0xff; } }