瑞芯微 TTL串口或者USB转TTL串口应用读取数据换行问题

瑞芯微 TTL串口或者USB转TTL串口应用读取数据换行问题
xr2144串口修改:
drivers/usb/serial/xr_usb_serial_common.c
xr_usb_serial_tty_set_termios函数
xr_usb_serial->trans9 = 0;

  •    //Rx line feed problem
    
  •    tty->termios.c_cc[VMIN]=0;//读取最小字符返回
    
  •    tty->termios.c_cc[VTIME]=1;//1*(1/10*1000 ms)100ms超时返回
    
  •   //Rx line feed problem
      switch (termios->c_cflag & CSIZE)
    

瑞芯微系列 CPU ttl串口
xxxx-set_termios函数中

  •   termios->termios.c_cc[VMIN]=0;//读取最小字符返回
    
  •    termios->termios.c_cc[VTIME]=1;//1*(1/10*1000 ms)100ms超时返回
    

猜你喜欢

转载自blog.csdn.net/xiaoxiaowu520/article/details/128346433