gallon
Tue May 13 08:47:17 CDT 2008
chris.aseltine@gmail.com a écrit :
> On May 12, 4:27 am, gallon sylvestre <ccna....@gmail.com> wrote:
>
>> My device load good. But when I open a hyperterminal the
>> first input is read, the second do nothing and when the
>> third appears hyperterminal loop on IOCTL_SERIAL_GET_COMMSTATUS
>> and freeze.
>
> Your code reads:
>
> ((SERIAL_STATUS*)buffer)->AmountInInQueue = 0;
>
> Why are you saying there is always zero bytes in your input buffer?
>
> I suspect you are completing a wait-on-mask IOCTL, and then
> Hyperterminal comes around and says, "okay, how many bytes do you
> have?", and you always say "zero", which is inconsistent.
I change my code to manage the AmountInDirQueue but there I have
the same problem.
Here is my new code :
http://pastebin.com/f38ae7c20
Here is my debug output:
http://pastebin.com/m3de139e3
For the debug output, the first key pressed on hyperterminal produce the
write, the second do nothing and when I pressed a third time a key the
IOCTL_SERIAL_GET_COMMSTATUS loop appears and dont stop.
The only solution to stop that is to kill hypertterminal with the task
manager.
Thans for you help :)
--
Gallon sylvestre
OpenBSD fan | Rathaxes Core Developper
LSE researcher | kernel developer for adeneo
http://devsyl.blogspot.com/ | www.rathaxes.org