Results 1 to 1 of 1
Thread: Device Driver Question
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jan 2009
Device Driver Question
I have been given a device (a piece of hardware) to write a Linux driver for (for kernel 2.6.17). It is a custom device for an embedded computer.
The device has a few intended functions, all using the parallel port:
1) Monitor Special Bits
a) Signal to the application (in user space) that a hardware interrupt has occurred, by the nAck bit interrupt
b) Allow the application to read the 'nError' and 'Paper Out' bits, by polling them, at the applications leisure
2) Communicate on a two wire interface (TWI, or I2C) bus via two parallel port data pins
3) Communicate / Operate a watchdog chip using some of the remaining parallel port data bits
I think I could signal to the user space application that an interrupt has occurred by having the application do a blocking read call on the device driver. When the interrupt happens, then the read call can return.
The rest of the data being read / written could be done using ioctl calls.
Am I wrong? Do you have any suggestions?