URL: https://www.overclockers.at/coding-stuff/serielle-schnittstelle-unter-c-waitcommevents_222661/page_1 - zur Vollversion wechseln!
Hallo allerseits
Mein 1.Post im include nach 8 Jahren in diesem Forum... 
Ok, folgendes. Ich plag mich grad mit der Programmierung einer seriellen Schnittstelle unter C++ herum und brauch ein WaitCommEvent um auf die Antwort eines µC zu warten.
Mein Code ist prinzipiell 1:1 von MSDN kopiert:
Code: PHPwhile (hComm != INVALID_HANDLE_VALUE) {WaitCommEvent (hComm, &dwCommModemStatus, NULL); SetCommMask (hComm, EV_RXCHAR); Sleep(500); if (dwCommModemStatus & EV_RXCHAR) {do {ReadFile (hComm, InBuffer, 1, &BytesRead, NULL); } while (BytesRead==1);
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025