Hi all,
I want to use this function instead of ReadFile in my application because of
performance considerations. The problem is that this function doesn't update
the port address. I tried to get 16 bytes from the COM2 port. The first 4
bytes i get are true but then it repeats the fifth byte.

How can i get around this issue? Do you know of any function other than
ReadFile to read from the port? Or can anyone show me how can i use this
function to read 16 bytes from the port?

Thanks for any help..

Re: READ_PORT_BUFFER_UCHAR usage... by voidcoder

voidcoder
Fri Aug 25 07:45:48 CDT 2006


I don't think you can get a significant performance
increase by reading the FIFO directly. Are you sure
that receiving data through the serial driver is
much more slowly? How do you read data using the
standard serial driver? Post some code.


> The problem is that this function doesn't update
> the port address.

Why do you think it should update the address? FIFOs are
mapped to a constant I/O PORT or CPU register, there is
no need to update address. You must always read from
a single address.


On Fri, 25 Aug 2006 14:12:03 +0200, bunymn <bunymn@discussions.microsoft.com> wrote:

> Hi all,
> I want to use this function instead of ReadFile in my application because of
> performance considerations. The problem is that this function doesn't update
> the port address. I tried to get 16 bytes from the COM2 port. The first 4
> bytes i get are true but then it repeats the fifth byte.
>
> How can i get around this issue? Do you know of any function other than
> ReadFile to read from the port? Or can anyone show me how can i use this
> function to read 16 bytes from the port?
>
> Thanks for any help..
>


Re: READ_PORT_BUFFER_UCHAR usage... by Bruce

Bruce
Fri Aug 25 08:22:32 CDT 2006

Are you checking to see that there is data in the FIFO?

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"bunymn" <bunymn@discussions.microsoft.com> wrote in message
news:6E7922A8-5769-40EE-9369-80888C5E7007@microsoft.com...
> Hi all,
> I want to use this function instead of ReadFile in my application because
> of
> performance considerations. The problem is that this function doesn't
> update
> the port address. I tried to get 16 bytes from the COM2 port. The first 4
> bytes i get are true but then it repeats the fifth byte.
>
> How can i get around this issue? Do you know of any function other than
> ReadFile to read from the port? Or can anyone show me how can i use this
> function to read 16 bytes from the port?
>
> Thanks for any help..



Re: READ_PORT_BUFFER_UCHAR usage... by Steve

Steve
Fri Aug 25 09:20:00 CDT 2006

When using ReadFile Are you reading a single byte at a time? If so then
that's a terrible way to do it. Call it with the a pointer to a buffer the
size you want. Internally the driver will use READ_PORT_BUFFER to extract as
many bytes as it can from the FIFO and keep doing so until all the data you
requested is provided or the timeout you specified is exceeded. It's all
rather efficient when used correctly.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com