SetCommMask

王朝百科·作者佚名  2011-02-01
窄屏简体版  字體: |||超大  

BOOL SetCommMask(

HANDLE hFile, //标识通信端口的句柄

DWORD dwEvtMask //能够使能的通信事件

);

串口上可能发生的事件如下表所示:

事件描述

EV_BREAK

A break was detected on input.

EV_CTS

The CTS (clear-to-send) signal changed state.

EV_DSR

The DSR(data-set-ready) signal changed state.

EV_ERR

A line-status error occurred. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY.

EV_RING

A ring indicator was detected.

EV_RLSD

The RLSD (receive-line-signal-detect) signal changed state.

EV_RXCHAR

A character was received and placed in the input buffer.

EV_RXFLAG

The event character was received and placed in the input buffer. The event character is specified in the device's DCB structure, which is applied to a serial port by using the SetCommState function.

EV_TXEMPTY

The last character in the output buffer was sent.

EV_RXCHAR:接收到一个字节并放入输入缓冲区。

EV_RXFLAG:接收到事件字符放入输入缓冲区。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航