[uart]设置linux 串口的block方式

 

1. 如果设置为非block模式: open(device, O_RDWR | O_NDELAY | O_NONBLOCK);

2. 如果设置为block模式,且读固定字节数返回则termios.c_cc[VTIME]=0, termios.c_cc[VMIN]=nbytes. 且open设备设置为非O_NDELAY和非O_NONBLOCK模式

原文地址:https://www.cnblogs.com/aaronLinux/p/7751641.html