Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!mcnc!ncsuvx!news From: kdarling@hobbes.ncsu.edu (Kevin Darling) Newsgroups: comp.realtime Subject: Re: Is polling possible with OS9000 device drivers Message-ID: <1991Jan17.070502.16206@ncsuvx.ncsu.edu> Date: 17 Jan 91 07:05:02 GMT References: <1991Jan16.174652.10867@computing-maths.cardiff.ac.uk> Sender: news@ncsuvx.ncsu.edu (USENET News System) Organization: NCSU Computing Center Lines: 23 | A friend of mine who is new to OS9000 wants to write a device driver | for a programmable I/O controller which does not raise an interrupt on | the host PC. He says that OS9000 doesn't directly support device | drivers that poll devices. I haven't programmed under OS-9000, but assume OS-9 is close enough :-). It might help to know more about the controller (SCF device? RBF?)... this can make a huge difference in polling techniques. For example: RBF I/O: do request, then loop for done status, sleeping a tick in loop. SCF I/O: this is much harder; my first suggestion is to ask if there's a hardware timer somewhere he can use to trigger a polling irq routine. Alternatively, a system Alarm could be used (altho I had no luck when I gave that method a quick shot under OS-9). A dirtier (but ok) method would be to directly hook into the os9 clock tick vector and poll the port. | While i'm talking OS9000, can anyone recommend a good book on writing | device drivers. Lots of people have talked about writing such a book. The best so far is still the "OS-9 Insights" book from Microware (altho it is mostly 68K, I'd think that much crosses over). best - kevin