#include #include #include"..\..\lib\8000e.h"//I-8000 Series Function Call Definition /* This demo program is the basic function. Let you know how to get the card information in the MCU(main control unit) of I-8000 series. including : 1.card module name -> 8051 == 51 2.card module type -> serial(87051) or parallel(8051) different type module have different control method. 3.How many slots -> 4 or 8 slots 4.Net ID // The *NameOfModule and *ModuleType are the Global variable. // They are defined in the "8000.h". */ void main() { int Addr8000,addr,data,SlotType; unsigned count; Addr8000 = GetNetId();//Get Module Net ID Print("NET ID Value = %d\n\r",Addr8000); SlotType = GetNumberOfSlot();//Slot Type ,slot4 or slot8 if (SlotType==4) { Print("Current Module Type => I-84xx , 4 slots \n\r"); } else { Print("Current Module Type => I-88xx , 8 slots \n\r"); } for(addr=0;addr< SlotType;addr++) { // Find a module if(NameOfModule[addr] != 0xff) { //8k or 87k ? if((ModuleType[addr]&0x80) == 0x80) { Print("Slot(%d) Find 80%02d -- Parallel\n\r",addr,NameOfModule[addr]); } else { Print("Slot(%d) Find 870%02d -- Series\n\r",addr,NameOfModule[addr]); } } else { Print("Slot(%d) No Find\n\r",addr); } } }