您不能更改波特率,我想它与硬件有关。因此,弄乱模块不会对您有任何好处。在您的第三点中,您仅谈论提出的用于设置自定义波特率的第一种方法,您需要在其中访问
tty->alt_speed。似乎没有接口可以直接从用户空间设置tty结构,至少没有使用ftdi_sio驱动程序。
但是,注释中还解释了另一种方法:
* 3. You can also set baud rate by setting custom divisor as follows * - set tty->termios->c_cflag speed to B38400 * - call TIOCSSERIAL ioctl with (struct serial_struct) set as * follows: * o flags & ASYNC_SPD_MASK == ASYNC_SPD_CUST * o custom_divisor set to baud_base / your_new_baudrate
你试过了吗?



