1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
void RFID::InitRFID()
{
//Chargement de la DLL
hLib=LoadLibrary("inpout32.dll");
if(hLib)
{
if(inportb=(inpfuncPtr) GetProcAddress(hLib, "Inp32"))
cout<<"Chargement de Inp32 reussi !"<<endl;
else
cout<<"Echec du chargement de Inp32 !"<<endl;
if(outportb=(oupfuncPtr) GetProcAddress(hLib, "Out32"))
cout<<"Chargement de Out32 reussi !"<<endl;
else
cout<<"Echec du chargement de Out32 !"<<endl;
//Initialisationh des ports
outportb(CTRL_ADDR, 0xCC);
cout<<"Port CTRL initialise !"<<endl;
outportb(DATA_ADDR, 0x26);
cout<<"Port DATA initialise !"<<endl;
byte test =inportb(DATA_ADDR);
cout<<" test byte = "<<test<<endl;
}
else
cout<<"Echec du chargement de la DLL !"<<endl;
} |