13.6.6 串口关闭函数的实现

2013-10-07 14:37:22 · 作者: · 浏览: 59

13.6.6  串口关闭函数的实现

关闭串口函数ClosePort(),调用SetEvent()函数设置关闭串口事件的状态为有标记,实现如下:

  1. 01  void CMySerial::ClosePort()  
  2. 02  {  
  3. 03      SetEvent(m_hShutdownEvent);  
  4. 04  }