Re: Better polling solution in wince driver



Hi,
I am implementing a touchpad driver (that has no interrupts) using polling mechanism. This device is connected to i2c lines. So the only way to get the data is to poll the device every fixed time interval. In our case it should be every 40-50 ms.This is the only pointing device on the system.

Thanks,
Shiju

Henrik Viklund wrote:
shiju skrev:

Hi,
Sometime back I asked a question regarding implementation of polling in
wince-5 device drivers. The answer to my question was to use Sleep()
function. So I implemented this in my driver by creatiing a thread. In
the thread process I have an infinite while loop with a Sleep()
function. The device I am polling is a pointer device and I need to poll
this device every 40 millisec-50 millisec. Is there a better way to poll
this device.

Um, no? Why do you think you need a better way? Without knowing
anything about your application I'd say that a 40-50ms deadline usually
is no match to meet using Sleep() -provided you've got the thread
priorities set up correctly.

Henrik Viklund
http://www.addlogic.se

Thanks,
Shiju

.



Relevant Pages

  • Re: [PATCH/RFC] I/O-check interface for drivers error handling
    ... a device driver author should have the opportunity ... > to poll the pci bus status if they so desire. ... Polling for bus status ... transactions for certain types of I/O (even if those transactions are ...
    (Linux-Kernel)
  • Re: Better polling solution in wince driver
    ... I can't really see what the problem is running a 25Hz polling cycle ... Henrik Viklund wrote: ... The answer to my question was to use Sleep() ... So I implemented this in my driver by creatiing a thread. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: poll() in 2.6 and beyond
    ... When a open fd called poll() or select, ... the driver would return to the caller with the new poll- ... changeover in 2.1 development, been a non-sleeping, immediately returning ... This, also, cannot possibly sleep. ...
    (Linux-Kernel)
  • Re: Tracking service status
    ... QueryServiceStatus(). ... I do that with some sleep when stopping the driver ... > continuously poll the status. ...
    (microsoft.public.win32.programmer.kernel)
  • tty_ldisc_try_get(): BUG kmalloc-8: Poison overwritten
    ... some sort of slab corruption going on in tty data structures: ... It's a single bit corruption - but the hardware in question has a ... 5f0878a: tty: Fix oops when scanning the polling list for kgdb ... # Generic Driver Options ...
    (Linux-Kernel)

Quantcast