输入条件:SysKind=0--->EasmChip的操作,SysKind=1-->CpuCard的操作,FileId二进制文件标识符,Length:要读取的长度
输出项目:RetData=0x00操作成功;RetData=0xFF此操作失败。
unsigned char ReadBinary(bool SysKind,unsigned char FileId, unsigned char OffSet, unsigned char Length) { unsigned char i; CmdBuf[CLA] = 0x00; CmdBuf[INS] = 0xb0; CmdBuf[P01] = 0x80 + FileId; CmdBuf[P02] = OffSet; CmdBuf[P03] = Length; for(i = 0; i < 3; i ++) { CosCommand(SysKind,3,Length); if( (SwBuf[0] == 0x90) && (SwBuf[1] == 0x00) ) { break; } } if(i < 3) { return 0x00; } else { return 0xff; } }