Re: Better polling solution in wince driver
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Thu, 14 Dec 2006 14:11:50 -0700
You could call WaitForSingleObject(), WaitForMultipleObjects(), not call
wait at all. All will affect performance in some way or another...
Paul T.
"shiju" <mshiju@xxxxxxxxx> wrote in message
news:4581BBB5.1090906@xxxxxxxxxxxx
Hi,
I am new to wince and was just worried whether the Sleep() function would
affect the performance of the system. Is this the only way to implement
polling in wince 5.0 drivers.
Thanks,
Shiju
Henrik Viklund wrote:
shiju skrev:
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.
I can't really see what the problem is running a 25Hz polling cycle
using Sleep(), but since you keep asking for alternatives, what about
it do you find unsatisfying?
Henrik Viklund
http://www.addlogic.se
Thanks,
Shiju
Henrik Viklund wrote:
shiju skrev:
Hi,Um, no? Why do you think you need a better way? Without knowing
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.
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
.
- References:
- Better polling solution in wince driver
- From: shiju
- Re: Better polling solution in wince driver
- From: Henrik Viklund
- Re: Better polling solution in wince driver
- From: shiju
- Re: Better polling solution in wince driver
- From: Henrik Viklund
- Re: Better polling solution in wince driver
- From: shiju
- Better polling solution in wince driver
- Prev by Date: Re: Trusted environment in CE 6.0
- Next by Date: Re: ndis minport driver question.
- Previous by thread: Re: Better polling solution in wince driver
- Next by thread: Re: Better polling solution in wince driver
- Index(es):
Relevant Pages
|