Basic example of serial communication with Windows XP/win32

后端 未结 5 1899
遇见更好的自我
遇见更好的自我 2021-02-08 23:30

I am working with a peripheral device that needs to be communicated through serial. I can send it commands using HyperTerminal, but now I need to write programs that will let m

5条回答
  •  抹茶落季
    2021-02-09 00:27

    Boost:asio may be able to help as a serial device was added recently.

    Fair warning though; the serial port documentation is light, presumably since it's quite new (it was added in asio 1.1.1 which was included in boost 1.36).

    But working your way through asio is, IMHO, a better solution than using the raw Win32 API. Why? It'll be easier to read and maintain (it's a higher level API) and it'll be cross platform (except where you need to specify the OS-specific device name).

    The Boost - Users and asio.user mailing lists are quite active and friendly and ought to be able to help you out if you get stuck.

提交回复
热议问题