摘要
为实现基于嵌入式Linux系统的PC/104与上位机或其它设备之间的串口通信,文中以PC/104为硬件基础,利用Linux虚拟机,搭建了嵌入式Linux系统开发平台;分别使用串口终端设备文件和端口寄存器读写的方式实现了串口通信,解决了在基于QT/E的图形化多线程串口应用程序中,数据传输时易出现段错误的问题,并在QT/E图形化多线程程序中实现了诊断仪与监测中心安全、可靠的通信。得出结论,在QT/E的图形化多线程程序中操作串口时,应该避免使用终端文件方式操作串口,可选用文中串口寄存器读写的方法。
In order to realize serial data communication between PC/104 and other devices, embedded Linux development platform was build up by using Linux virtual machine as software and PC/104 model as hardware. Serial data communication was achieved by the way of both serial terminal device file and segmentation fault, which led to system crash during QT/E graphical multi-thread program communication with the host computer,was solved. Secure and reliable QT/E graphical multi-thread serial communication application was designed based on the platform. At last, it came to the conclusion that, in order to achieve secure and reliable data transmission, when using serial data communication in QT/E graphical multi-thread program,it is better to use the way port register access other than serial terminal device file.
出处
《计算机技术与发展》
2012年第6期254-257,共4页
Computer Technology and Development
基金
武汉理工大学自主创新研究基金(2011-IV-020)