Device Drivers & Real-Time Systems
by Robert Krten



Example 1: 

while (!done) {
    if (inpw (FIFOport) & S_FIFOFull) {
        delay (1);
    } else {
        outpw (FIFOport, buf [bufptr++]);
        if (bufptr >= BlockSize) {
            done = 1;
        }
    }
}










 



1


