void wirteEPROM()
{
//#include
unsigned short bufeprom[30],i,val;
FILE *fp;
fp = fopen("d:\\cpci6370.eep","rt+");
i=0;
i= PCI_eepromTest();
i= PCI_eepromSize();
//
fread(bufeprom,2,14,fp); fclose(fp);
val = 0;
val = 0xaaaa;
for(i=0;i<13;i++)
{
val = val ^ bufeprom;
PCI_eepromWrite(i,bufeprom);
// val = PCI_eepromRead(i);
}
bufeprom = val;
PCI_eepromWrite(i,bufeprom);//最后一个字是checksum
/////////////////////////////////////////////// }
|