Device Drivers & Real-Time Systems

By Robert Krten

Dr. Dobb's Journal October 1998

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

Example 1: Soundcard driver main polling loop.

Back to Article


Copyright © 1998, Dr. Dobb's Journal