SLE4442卡_IC的51單片機(jī)驅(qū)動(dòng)程序
void WriteMainROM(uchar addr,uchar *t,uchar N) //寫主存區(qū)
{
while(N--)
{
Command(0x38,addr,*t);
Process();
addr++;
t++;
}
}本文引用地址:http://m.butianyuan.cn/article/201612/324690.htm
void ReadProROM(uchar addr,uchar *p,uchar N) //讀保護(hù)區(qū)
{
Command(0x34,addr,0xff);
while(N--)
{
*p=Byte_Read();
p++;
}
}
void WriteProROM(uchar addr,uchar *t,uchar N) //寫保護(hù)區(qū)
{
while(N--)
{
Command(0x3c,addr,*t);
Process();
addr++;
t++;
}
}
void ReadCode(uchar addr,uchar *p,uchar N) //讀密碼
{
Command(0x31,addr,0xff);
while(N--)
{
*p=Byte_Read();
p++;
}
}
void WriteCode(uchar addr,uchar *t,uchar N) //寫密碼
{
while(N--)
{
Command(0x39,addr,*t);
Process();
addr++;
t++;
}
}
}
評(píng)論