Quote:
|
does the comment in that code mean for all the stuff you say to do before, to be placed in that function? i'm asking, because it's a bit unclear on that part.
|
Sorry about that. Only the code that does the actual reading from the serial port and the code that processes the data goes in here. Everything else goes wherever you do the rest of your init stuff. Just make sure you call your init routine before _beginthread. Otherwise, Windows will not be happy.
Basically, it should look like:
void SerialThread(PVOID pvoid){
while(true){
ReadFile(...);
//data-processing code
}
}
If you try something and it doesn't work, feel free to email me the code, and I'd be happy to take a look at it.