flat assembler
Message board for the users of flat assembler.

Index > Windows > Serial Communications

Author
Thread Post new topic Reply to topic
msmith



Joined: 22 Jun 2003
Posts: 40
Location: Missouri
msmith 30 Dec 2005, 05:05
Is there any way to receive an event when a character arrives in the UART?

The discontinued WMCOMMNOTIFY event apparently did this before it was discontinued.
Post 30 Dec 2005, 05:05
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 30 Dec 2005, 05:30
I use WaitCommEvent and threads
Post 30 Dec 2005, 05:30
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
msmith



Joined: 22 Jun 2003
Posts: 40
Location: Missouri
msmith 30 Dec 2005, 07:14
Hi Comrade,

I am using a thread with status testing (ClearCommError) and looking at cbInQue, which works fine.

I would rather use events.

Thanks,

Mike
Post 30 Dec 2005, 07:14
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 06 Mar 2013, 17:04
comrade wrote:
I use WaitCommEvent and threads


comrade,

Could you post an example using "WaitCommEvent"

I have an app using WaitCommEvent to monitor for incoming serial data, < 100 characters, and it is working. But I've had to use some ugly code to get the notification of the next event. I don't send any serial data, just monitor for incoming.

Anything could be helpful.

Thanks in advance,

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 06 Mar 2013, 17:04
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 07 Mar 2013, 08:43
It might take me a while to dig it up if it's on a backup CD.

So is your app working or do you need assistance with it? From what you said it sounds like it's working.
Post 07 Mar 2013, 08:43
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 07 Mar 2013, 14:21
comrade,

My program does work! But, it makes me feel "dirty" to look at everything after the invoke ReadFile line. I start a thread to handle the serial "interrupt" It is triggered, I read the serial port and was not sure what the best way to reestablish the "waiting" state for the serial port. I just kept trying things, until it worked. Now I reset the event, create a new event, and WaitCommEvent, WaitForSingleObject, for the next data.


If you can find the code, great. But don't go to too much trouble.

Thanks,

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 07 Mar 2013, 14:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.