2.2 examples
2.2.1 Detect
// detect i8090,i8091,i8092 card
#include "8000.h" #include "i8090.h"
#define i8090 0x0d #define i8091 0x0e #define i8092 0x0f #define NOCARD 0x00 #define MAX_SLOT_NO 8
unsigned int PortAddress[8]={0x080, 0x0a0, 0x0c0, 0x0e0, 0x140, 0x160, 0x180, 0x1a0};
void main ()
{
unsigned char slot,temp;
for (slot=0; slot<MAX_SLOT_NO; slot++)
{
temp=inportb(PortAddress[slot]); switch (temp)
{
case i8090: //i8090
case i8091: //i8091
case i8092: //i8092
Print("Slot %d = i8092\r\n",SlotNum);
http://www.icpdas.com | ICPDAS |