设置 串口 软 fifo
int UartBuffSizeSet(char dev_path,int size) {
int ret;
int fd = open(dev_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
if(fd < 0){
return -1;
}
struct serial_struct serial;
ret = ioctl(fd, TIOCGSERIAL, &serial);
if (ret != 0) {
close(fd);
return -2;
}+
serial.xmit_fifo_size = 10241024; //1M
ret = ioctl(fd, TIOCSSERIAL, &serial);
if(ret != 0) {
close(fd);
return -3;
}
close(fd);
return 0;