lkml.org 
[lkml]   [1999]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectneed docs: using parport & console system
Date
Hello!

My first kernel programming experience is writing a driver that needs the
parallel port and the console system.

parport:
parport.h is quite well documented. However, I missed some information about
the flags that can be passed to parport_register_device(). What does
PARPORT_DEV_COMA mean? Also, when should I call parport_claim()?
At the moment, I'm using exclusive mode. Do I then have to use
parport_claim() at all? (It works without) If yes, when should I call it?
After parport_register_device(), or just before I'm doing real parport work?

console system:
My driver registers as a virtual terminal. I used mdacon as a template, which
helped me a lot.
Unfortunately, I couldn't find much information about the functions I have to
implement there. Most of the arguments are of course very descriptive, but
some are not. Same for the return values.
Where can I get more information? (Or shall I just ask here?)

Misc:
Currently, for each character output on the parport, I'm calling usleep(40).
This doesn't hurt me much, because normally, not many characters will be
output. (But if there are many, all the CPU time is consumed by the
system just waiting.)
This is not very elegant. How can I do this in a better way?
Can I tell the kernel that it shall wait at least 40us
(let's say 1ms < t < 40us)?
Or can I tell the kernel that the next call of function xyz must not be
within the next 40us?

Thanks for your help!

In case you are wondering what i'm doing:
Together with a friend, I began to write a kernel driver for a Hitachi-style
LC-display which can display 40 columns and 4 rows. The display is connected
to the parallel port and shall register itself as a console device, so we can
log into the system without having a big monitor.
It already works to some degree. (Editing a file with vi is possible :-)))) If
you want to get the code, go to
http://www.uni-ulm.de/~s_fkusch/lcd

cu
//flo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.024 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site