HD系列关于接触式卡编程说明
8页1、HD系列关于接触式卡编程说明作者:技术支持部 胡富云标准支持及接口介绍HD系列的III型机与IV型机支持接触式IC读写ICC_memcard_atr() activates the designated Synchronous IC card and waits for itsATR.short ICC_memcard_atr(unsigned char * dbuf,unsigned char * len,unsigned short vol_index) ;1、4428接触式存储卡Read_4428_With_PB( )Read data bytes of 4428 and their associated protection bits.short Read_4428_With_PB(unsigned short StartPos,unsigned short NOB,char * Bfr,char * PB_Bfr) ;Read_4428_NO_PBRead data bytes of 4428 card.short Read_4428_NO_PB (unsigned shor
2、t StartPos,unsigned short NOB,char * Bfr) ;Write_4428( )Write one byte of data and associated protection bit (if required) into 4428.short Write_4428 (unsigned short StartPos,char DestByte,char PBSetFlag) ;Verify_4428_PSC( )Verify the 2-byte PSC of 4428short Verify_4428_PSC (char PSC1,char PSC2) ;详细介绍请参见基本API说明示例:if (ICC_sock_check(ICC_SOCK_MAIN) = ICC_SOCK_CARD_PRESENT)/检测到卡片ICC_interface_power(ICC_POWER_ON);/卡座上电ICC_select_sock(ICC_SOCK_MAIN);/选择主卡座rcode = ICC_memcard_atr(abuff, &alen, ICC_VOL
3、TAGE_5);/存储卡ATRif (!rcode)if (*(unsigned long *)abuff) = ATR_SLE4428)/4428卡if (Verify_4428_PSC(0xFF, 0xFF)/密码校验ErrorBeep(0);DispStr_CE(0, 1, 卡片密码校验错误, DISP_POSITION | DISP_CLRSCR);goto Card4428Error;elsememset(crwBuf, 0, 64);Read_4428_With_PB(0x20, 0x30, crwBuf, stmp); /从起始地址20H读30H字节到crwBuf中set_console_english();clear_console();move_cursor(0, 0);for (m = 0; m 6; m+)/显示读取的内容for (n = 0; n 8; n+)goto_xy(n * 16, m);printf(%02X, crwBufm * 8 + n);for(m = 0; m 48; m +)if(Write_4428(0x20 + m, crwBufm,
4、0) /单字节取反回写ErrorBeep(0);DispStr_CE(0, 1, 写卡失败, DISP_POSITION | DISP_CLRSCR);goto Card4428Error;RightBeep();goto_xy(0, 7);printf(press any to return);goto Card4428OK;elseErrorBeep(0);DispStr_CE(0, 1, 非4428接触卡, DISP_POSITION | DISP_CLRSCR);goto Card4428Error;2、4442接触式存储卡Read_4442_NO_PB( )This function reads data bytes of 4442 card without protection bits.short Read_4442_NO_PB (unsigned short StartPos,unsigned short NOB,char * Bfr) ;Read_4442_PB( )Read all the protection bits of 4442.short Read_444
《HD系列关于接触式卡编程说明》由会员大米分享,可在线阅读,更多相关《HD系列关于接触式卡编程说明》请在金锄头文库上搜索。
《扇形统计图》教学案例.doc
最新语文版三年级语文(下册)二单元试卷及答案一.doc
车辆GPS监控平台用户手册.docx
高考物理天体运动公式.docx
英语六级听不懂180分照样拿.doc
浅谈加油站建设施工现场安全管理措施.docx
新部编人教版三年级语文下册三单元考试题汇编.doc
孩子任性的行为.doc
影视剧照使用许可合同新整理版.docx
趋利避害突出特色规模经营
初中英语完形填空中考全攻略.doc
2磨床使用维护规程
罗贯中三国演义读后感经典例文
三国群英传7 装备物品制作篇.doc
电信工程及管理专业介绍及描述通信工程施工.docx
初中语文文摘历史地质学家的爱情
烛光里的微笑.doc
8 已亥杂诗10.docx
梦想在线考试和作业答案.docx
热门小产权房房屋租赁合同样书.doc
2023-09-04 3页
2023-09-27 7页
2023-08-14 3页
2023-08-05 2页
2022-08-11 2页
2023-06-18 15页
2023-08-19 6页
2022-10-29 3页
2023-03-02 17页
2023-09-27 7页