119{
130
131 TRACE_(SERMOUSE,
"SermouseDetectLegacyDevice(LowerDevice %p)\n", LowerDevice);
132
134
135
137 LowerDevice,
140 0,
145
146
147 TRACE_(SERMOUSE,
"Reset UART\n");
148 Mcr = 0;
152
153
154 TRACE_(SERMOUSE,
"Set communications parameters\n");
155
156 Fcr = 0;
160
161 BaudRate = 1200;
163 &BaudRate,
sizeof(BaudRate),
NULL,
NULL);
165
172
173
174 TRACE_(SERMOUSE,
"Flush receive buffer\n");
179
181
182
183 TRACE_(SERMOUSE,
"Enable DTR/RTS\n");
190
191
192 TRACE_(SERMOUSE,
"Set timeout to 500 microseconds\n");
198 &Timeouts,
sizeof(Timeouts),
NULL,
NULL);
200
201
202 TRACE_(SERMOUSE,
"Fill the read buffer\n");
205
207 {
209 {
210
211 ERR_(SERMOUSE,
"Microsoft Ballpoint device detected. THIS DEVICE IS NOT YET SUPPORTED");
213 goto ByeBye;
214 }
216 {
217
219 {
220
221 goto ByeBye;
222 }
224 {
225 case '3':
226 INFO_(SERMOUSE,
"Microsoft Mouse with 3-buttons detected\n");
228 break;
229 case 'Z':
230 INFO_(SERMOUSE,
"Microsoft Wheel Mouse detected\n");
232 break;
233 default:
234 INFO_(SERMOUSE,
"Microsoft Mouse with 2-buttons detected\n");
236 break;
237 }
238 goto ByeBye;
239 }
240 }
241
242ByeBye:
243
246 return MouseType;
247}
#define NT_SUCCESS(StatCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define OBJ_KERNEL_HANDLE
#define SERIAL_PURGE_RXCLEAR
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
#define IOCTL_SERIAL_SET_LINE_CONTROL
#define IOCTL_SERIAL_SET_TIMEOUTS
#define IOCTL_SERIAL_SET_MODEM_CONTROL
#define IOCTL_SERIAL_SET_FIFO_CONTROL
#define IOCTL_SERIAL_SET_BAUD_RATE
#define IOCTL_SERIAL_SET_DTR
#define IOCTL_SERIAL_SET_RTS
NTSTATUS NTAPI ObOpenObjectByPointer(IN PVOID Object, IN ULONG HandleAttributes, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PHANDLE Handle)
ULONG WriteTotalTimeoutMultiplier
ULONG ReadTotalTimeoutConstant
ULONG WriteTotalTimeoutConstant
ULONG ReadTotalTimeoutMultiplier
ULONG ReadIntervalTimeout
#define RtlZeroMemory(Destination, Length)
_In_ WDFDPC _In_ BOOLEAN Wait