Low latency serial communication on Linux

后端 未结 7 2061
清歌不尽
清歌不尽 2020-12-13 07:46

I\'m implementing a protocol over serial ports on Linux. The protocol is based on a request answer scheme so the throughput is limited by the time it takes to send a packet

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 08:45

    Here's what setserial does to set low latency on a file descriptor of a port:

    ioctl(fd, TIOCGSERIAL, &serial);
    serial.flags |= ASYNC_LOW_LATENCY;
    ioctl(fd, TIOCSSERIAL, &serial);
    

提交回复
热议问题