Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-05-2005, 07:34 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
Char driver: what's the best way to do...

Hello fellow linux friends!
I am writing a char driver for a stepper motor controller where I need to read an optical encoder and then tell the motor which way to turn. I am using the parallel port and have the basic driver written, but I'm still a little green when it comes to C.
So here's the situation... I need to read the parallel port using interrupts, which I've tested and it works - but the motor will be spinning at 2000 rpm, that means 2000 pulses per second. I've got a 2.4 GHz pentium4 processor so I don't think that'll be an issue. My main question is, since this is a char driver, my main gui application will be accessing the driver as a file using standard file i/o - so whats the best way to read/write to the driver to accomplish this task?

Continuously poll the driver in some kind of loop or is there some better way?

Any help would be greatly appreciated.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
char driver on linux-kernel-2.6.10 prashy Programming 2 05-09-2005 01:44 PM
C pointers confusion - char ** = char [][] ?? saravkrish Programming 12 12-02-2004 10:06 AM
invalid conversion from `char' to `const char* bru Programming 6 05-09-2004 03:07 PM
sprintf not working in char driver module snigglyfox Programming 2 04-27-2004 01:25 PM
convert from char* to unsigned char* D J Linux - Software 2 02-20-2004 04:09 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration