LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   writing printer device driver in linux (https://www.linuxquestions.org/questions/programming-9/writing-printer-device-driver-in-linux-200973/)

sidbash 07-04-2004 07:49 AM

writing printer device driver in linux
 
hi ! i am a student of system programming course. I am making a device driver for printer in linux using C language. So far i only know that i have to use 'outb' and 'inb' functions for accessing port. I am quite confused now and dont know what to do next??? I need guidance for making the device driver. PLZ, plz tell me from the begining, where to start making it. Can anybody help???

infamous41md 07-04-2004 12:08 PM

http://www.beyondlogic.org/spp/parallel.htm

sidbash 07-04-2004 09:25 PM

still facing problems
 
hi! i am sidbash again. I think u have tried to help me out. The web page on parallel port is no doubt good, but unfortunately i have read it before. Sir the problem is, i dont know what steps i should follow in order to program the device driver. So far i am able to send some data to the printer. The printer recieves the characters i send, but prints them not completely. If u want i can send u the code, kindly solve this problem. May God bless u!!!!

infamous41md 07-04-2004 11:16 PM

well have u looked at the source for the lp driver yet? [/drivers/char/lp.c] i've never written a driver for a printer, but if i was going to, that is where i would start. i know that the parallel printer driver is layered, ie it utilizes the parport module to actually perform the low level i/o, and it just worries about managing the printer. the parport driver can be found in [/drivers/parport/parport_pc.c].


All times are GMT -5. The time now is 11:30 AM.