Advantech ITA-8120 handleiding
Handleiding
Je bekijkt pagina 26 van 34

ITA-8100 / ITA-8120 User Manual 18
3.3 Watchdog Sample Code
#include <cstdlib>
#include <sys/io.h>
#include <unistd.h>
#include <iostream>
using namespace std;
int OBF=0x01, IBF=0x02;
int wait_OBF(int Port)
{
int icount;
for(icount=0;icount<0xFF;icount++)
{
int iValue = inb(Port);
if((iValue&OBF) == 0x01)
return true;
usleep(1000);
}
cout << "wait_OBF failed\n";
cout.flush();
return false;
}
int wait_IBF(int Port)
{
int icount;
for(icount=0;icount<0xFF;icount++)
{
int iValue = inb(Port);
if((iValue&IBF) == 0x00)
return true;
usleep(1000);
}
cout << "wait_IBF failed\n";
cout.flush();
return false;
}
void DummyPort()
{
int iRet = inb(0x299);
wait_IBF(0x29A);
}
Bekijk gratis de handleiding van Advantech ITA-8120, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
Merk | Advantech |
Model | ITA-8120 |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 3585 MB |