|
#define MATCH_ROM 0x55 //匹配ROM
const unsigned char code ROMData1[8] = {0x28, 0x33, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0xD7}; //U1
const unsigned char code ROMData2[8] = {0x28, 0x30, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0x8E}; //U2
const unsigned char code ROMData3[8] = {0x28, 0x31, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0xB9}; //U3
const unsigned char code ROMData4[8] = {0x28, 0x32, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0xE0}; //U4
const unsigned char code ROMData5[8] = {0x28, 0x34, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0x52}; //U5
const unsigned char code ROMData6[8] = {0x28, 0x35, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0x65}; //U6
const unsigned char code ROMData7[8] = {0x28, 0x36, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0x3C}; //U7
const unsigned char code ROMData8[8] = {0x28, 0x37, 0xC5, 0xB8, 0x00, 0x00, 0x00, 0x0B}; //U8
void MatchROM(const unsigned char *pMatchData)
{
unsigned char i;
Initialization();
WriteByte(MATCH_ROM);
for (i = 0; i < 8; i++)
WriteByte(*(pMatchData + i));
}
switch (i)
{
case 1 : MatchROM(ROMData1); break; //匹配1
case 2 : MatchROM(ROMData2); break; //匹配2
case 3 : MatchROM(ROMData3); break; //匹配3
case 4 : MatchROM(ROMData4); break; //匹配4
case 5 : MatchROM(ROMData5); break; //匹配5
case 6 : MatchROM(ROMData6); break; //匹配6
case 7 : MatchROM(ROMData7); break; //匹配7
case 8 : MatchROM(ROMData8); break; //匹配8
}
请大家详解下"WriteByte(*(pMatchData + i));"和"const unsigned char *pMatchData",这个值是怎么读出来的,谢谢!!! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|