Re: Non-polling serial I/O
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Wed, 3 Jan 2007 08:57:50 -0700
Sorry. You can set the timeout to infinite if you never want the call to
come back until it has some bytes for you...
Paul T.
"J.Spraul" <JSpraul@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B5209E7E-794C-4ACF-A673-3BA6E0A2B14E@xxxxxxxxxxxxxxxx
I didn't say asking for 0 bytes, I said returning 0 bytes (eg. after a
timeout).
But thanks for your input!
"Paul G. Tobey [eMVP]" wrote:
Call ReadFile() with a non-zero number of bytes. Call WaitCommEvent().
There are several ways to attack it. I'm finding it troubling that
everything you've read said to call ReadFile() and ask for zero bytes.
That's a really stupid way to do things. Serial I/O is essentially
copied
directly from the desktop, so any sample code found for that platform
should
work, possibly with a few modifications, on CE.
Paul T.
"J.Spraul" <J.Spraul@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:74FAF28C-D3AE-407A-A485-65411361D13B@xxxxxxxxxxxxxxxx
Is there a standard method of performing non-polling serial I/O under
Windows
CE? Everything I've seen works out to a ReadFile() returning 0 bytes
until
there's something to read.
1) Is there any way to get WaitForSingleObject() to block on a serial
port
"file" handle until something can be read?
2) Is there any way to modify (or monitor) the default Windows CE
serial
driver to set a named event which can take the place of the file handle
above?
Thanks for any insight into how we can cut down CPU time spent waiting
for
serial input.
.
- References:
- Re: Non-polling serial I/O
- From: Paul G. Tobey [eMVP]
- Re: Non-polling serial I/O
- Prev by Date: Re: fixed byte[] array
- Next by Date: Re: Instruction for Booting a Window CE Image from a Compact Flash
- Previous by thread: Re: Non-polling serial I/O
- Next by thread: Re: Non-polling serial I/O
- Index(es):
Relevant Pages
|