Results 1 to 3 of 3
Hi,
I've been playing with ways to drive a stepper motor by writing a device driver, which works well if I have a calling process that writes to a char ...
- 02-20-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
Stepper Motor Device Driver Development
Hi,
I've been playing with ways to drive a stepper motor by writing a device driver, which works well if I have a calling process that writes to a char type device one step at a time (with the delays and step numbers controleede by this process). But when I try to make the device handle the number of steps and the delays by passing this data from the calling process, the device works OK but blocks the calling process while the device is dealing with the port switching for the motor.
Is it possible to have a device that works like this? i.e send it instructions to run the motor for x mins at y speed, but that returns control back to the system once initiated?
thanks in advance
Rob
- 02-22-2008 #2Just Joined!
- Join Date
- Feb 2008
- Posts
- 7
try by scheduling a work (which handles the seding data to device).. search for "queue_work()" in any device driver code, you will come to know how to use that.. that should allow to you to make your process non-blocking.. other method is to create a kernel thread.. though i would not recomment the use of kernel thread.. hope this helps
- 02-22-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
Many thanks! - an initial search on your advice is certainly pointing me the right way.


Reply With Quote
