Fixed building of Serial Mouse driver (still broken)

svn path=/trunk/; revision=3099
This commit is contained in:
Steven Edwards 2002-06-16 04:47:56 +00:00
parent 7c25d62093
commit 4d831f2242
6 changed files with 138 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.7 2001/08/21 20:13:15 chorns Exp $
# $Id: makefile,v 1.8 2002/06/16 04:47:56 sedwards Exp $
PATH_TO_TOP = ../../..
@ -7,9 +7,10 @@ TARGET_TYPE = driver
TARGET_NAME = sermouse
TARGET_OBJECTS = \
mouse.o
sermouse.o
#mouse.o - Old Serial mouse driver
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View file

@ -9,6 +9,8 @@
** Known Limitations:
** Only supports mice on COM port 1
** Old Driver, We done build it. Just keep for History. (S.E.)
*/
#include <ddk/ntddk.h>

View file

@ -0,0 +1,12 @@
typedef struct _DEVICE_EXTENSION {
PDEVICE_OBJECT DeviceObject;
ULONG InputDataCount;
PMOUSE_INPUT_DATA MouseInputData;
CLASS_INFORMATION ClassInformation;
PKINTERRUPT MouseInterrupt;
KDPC IsrDpc;
KDPC IsrDpcRetry;
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;

View file

@ -14,6 +14,7 @@
#include <ddk/ntddk.h>
#include "../include/mouse.h"
#include "sermouse.h"
#include "mouse.h"
#define MOUSE_IRQ_COM1 4
#define MOUSE_IRQ_COM2 3
@ -24,7 +25,7 @@
#define max_screen_x 79
#define max_screen_y 24
static unsigned int MOUSE_IRQ=MOUSE_IRQ_COM1;
//static unsigned int MOUSE_IRQ=MOUSE_IRQ_COM1;
static unsigned int MOUSE_COM=COM1_PORT;
static unsigned int bytepos=0, coordinate;

View file

@ -0,0 +1,80 @@
// All or parts of this file are from CHAOS (http://www.se.chaosdev.org/).
// CHAOS is also under the GNU General Public License.
/* Mouse commands. */
/* Set resolution. */
#define MOUSE_SET_RESOLUTION 0xE8
/* Set 1:1 scaling. */
#define MOUSE_SET_SCALE11 0xE6
/* Set 2:1 scaling. */
#define MOUSE_SET_SCALE21 0xE7
/* Get scaling factor. */
#define MOUSE_GET_SCALE 0xE9
/* Set stream mode. */
#define MOUSE_SET_STREAM 0xEA
/* Set sample rate (number of times the controller will poll the port
per second). */
#define MOUSE_SET_SAMPLE_RATE 0xF3
/* Enable mouse device. */
#define MOUSE_ENABLE_DEVICE 0xF4
/* Disable mouse device. */
#define MOUSE_DISABLE_DEVICE 0xF5
/* Reset aux device. */
#define MOUSE_RESET 0xFF
/* Command byte ACK. */
#define MOUSE_ACK 0xFA
#define MOUSE_INTERRUPTS_OFF (CONTROLLER_MODE_KCC | \
CONTROLLER_MODE_DISABLE_MOUSE | \
CONTROLLER_MODE_SYS | \
CONTROLLER_MODE_KEYBOARD_INTERRUPT)
#define MOUSE_INTERRUPTS_ON (CONTROLLER_MODE_KCC | \
CONTROLLER_MODE_SYS | \
CONTROLLER_MODE_MOUSE_INTERRUPT | \
CONTROLLER_MODE_KEYBOARD_INTERRUPT)
/* Used with mouse buttons */
#define GPM_B_LEFT 4
#define GPM_B_MIDDLE 2
#define GPM_B_RIGHT 1
/* Some aux operations take long time. */
#define MAX_RETRIES 60
/* Hardware defines. */
#define MOUSE_IRQ 12
#define MOUSE_WRAP_MASK 0x1F
static PIRP CurrentIrp;
static ULONG MouseDataRead;
static ULONG MouseDataRequired;
static BOOLEAN AlreadyOpened = FALSE;
static KDPC MouseDpc;
static VOID MouseDpcRoutine(PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2);

View file

@ -0,0 +1,39 @@
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "Serial Mouse Device Driver\0"
VALUE "FileVersion", "0.0.1\0"
VALUE "InternalName", "sermouse\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "sermouse.sys\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END