问题
I want to communicate between an Embedded device and my PC using C codes for serial-port.
Anyone can suggest me how can I send and receive Serial or UART data using COM ports of my computer in Windows Environment(Windows7 or Windows8 64bit).
Please give me any link or any codes for suggestion ... Thanks ...
回答1:
To connect to the COM port, use CreateFile():
http://support.microsoft.com/kb/115831
Then use ReadFile() or WriteFile() to access the port.
来源:https://stackoverflow.com/questions/25013935/c-program-to-send-and-receive-serialuart-data-using-com-ports