|
发表于 2004-3-8 11:20:32
|
显示全部楼层
2,只要打开那个终端文件就可以了。open(a_terminal_device,mode)
有以下的控制函数:
tcgetattr()
get the current terminal control settings
tcsetattr()
set the current terminal congtrol settings for a device
set and get the terminal baud rate:
cfgetispeed()
Return the input baud rate that is stored in a termios structure
cfgetospeed()
Return the output baud rate that is stored in a termios structure
cfsetispeed()
Set the input baud rate in a termios structure
cfsetospeed()
Set the output baud rate in a termios structure
可能还有更多。
详细看《UNIX环境高级编程》
写就用标准IO函数。 |
|