How do I read data from serial port in Linux using C?

前端 未结 2 1179
忘了有多久
忘了有多久 2020-12-08 12:02

I am new to serial programming in Linux using C. I have found a small piece of code to write data on serial port which I am sharing here. After running this code I may assum

2条回答
  •  感情败类
    2020-12-08 12:34

    The program posted makes a lot of assumptions about the state of the port. In a real world application you should do all the important setup explicitly. I think the best source for learning serial port programming under POSIX is the

    Serial Programming Guide for POSIX Operating Systems

    I'm mirroring it here: https://www.cmrr.umn.edu/~strupp/serial.html

提交回复
热议问题