[lkml]   [1996]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Sleeping

In article <>, Colten Edwards <> writes:
> I haven't been able to find this anywhere, but I need to know what a good
> way to sleep within a kernel module is. I found something called
> lcdpanel-0.50.tar.gz on sunsite and have made the LCD device and compiled
> the module, but I noticed that the module uses for (t=0; t <3000; t++) ;
> for sleeping which is not a good way to wait in the kernel, so I'd like
> to replace it. I tried usleep but that's a lib function so is unsuitable.
> The function is called thusly,
> static int lcd_write (struct inode *inode, struct file *file, const char
> *buf, int count)

I have done a lot of clean-ups on that code, I still have som trouble
to resolve conserning the 4-bit mode of the LCD display. But I think
it has gotten much better. I'm afraid the web page and documentation
(what little there is) is in Norwegian. If you need it I could translate
what you need. Take a look at :
There you will find the most recent version: lcd_drive-0.2.tgz.

BTW: I use the udelay() function to sleep...


 \ /
  Last update: 2005-03-22 13:38    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean