概述
最近研究网口转虚拟串口驱动程序。通过查看DDK的例子,发现需要处理 IOCTL_SERIAL_GET_WAIT_MASK 。但是一些相关的掩码定义比较少见到,相关的资料说明也少。这里列举出来,以便自己更好的理解,同时用于编写的虚拟串口驱动程序中。
相关掩码的定义在 C:WinDDK7600.16385.1incapintddser.h 文件中。 原本的内容注释已经非常清晰了,我就不画蛇添足了。
//
// Defines the bitmask that the driver can used to notify
// app of various changes in the state of the UART.
//
#define SERIAL_EV_RXCHAR 0x0001 // Any Character received
#define SERIAL_EV_RXFLAG 0x0002 // Received certain character
#define SERIAL_EV_TXEMPTY 0x0004 // Transmitt Queue Empty
#define SERIAL_EV_CTS 0x0008 // CTS changed state
#define SERIAL_EV_DSR 0x0010 // DSR changed state
#define SERIAL_EV_RLSD 0x0020 // RLSD changed state
#define SERIAL_EV_BREAK 0x0040 // BREAK received
#define SERIAL_EV_ERR 0x0080 // Line status error occurred
#define SERIAL_EV_RING 0x0100 // Ring signal detected
#define SERIAL_EV_PERR 0x0200 // Printer error occured
#define SERIAL_EV_RX80FULL 0x0400 // Receive buffer is 80 percent full
#define SERIAL_EV_EVENT1 0x0800 // Provider specific event 1
#define SERIAL_EV_EVENT2 0x1000 // Provider specific event 2
最后
以上就是拉长雨为你收集整理的串口设备驱动相关事件的掩码定义(IOCTL_SERIAL_GET_WAIT_MASK)的全部内容,希望文章能够帮你解决串口设备驱动相关事件的掩码定义(IOCTL_SERIAL_GET_WAIT_MASK)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复