那位大侠知道

我想知道怎样

1.设置波特率:
struct termios termios_p;
tcgetattr( fd, &termios_p );
cfsetispeed( &termios_p, baud );
cfsetospeed( &termios_p, baud );
tcsetattr( fd, TCSADRAIN, &termios_p );

其中fd是用open返回的一个句柄
2.既然有photon干吗要自己搞, :stuck_out_tongue: