Fix serial mouse type detection
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 18 Dec 2005 23:00:00 +0000 (23:00 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 18 Dec 2005 23:00:00 +0000 (23:00 +0000)
Shut up some debug message

svn path=/trunk/; revision=20261

reactos/drivers/input/sermouse/detect.c
reactos/drivers/input/sermouse/fdo.c
reactos/drivers/input/sermouse/readmouse.c

index dbb3a63..e3db473 100644 (file)
@@ -186,7 +186,7 @@ SermouseDetectLegacyDevice(
                &Fcr, sizeof(Fcr), NULL, NULL);
        if (!NT_SUCCESS(Status)) goto ByeBye;
        /* Set serial port speed */
-       BaudRate = SERIAL_BAUD_1200;
+       BaudRate = 1200;
        Status = SermouseDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
                &BaudRate, sizeof(BaudRate), NULL, NULL);
        if (!NT_SUCCESS(Status)) goto ByeBye;
index a20fa5a..ec8b7bd 100644 (file)
@@ -115,8 +115,6 @@ cleanup:
        Fdo->Flags |= DO_BUFFERED_IO;
        Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
 
-       /* FIXME: create registry entry in HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP */
-
        ExFreePool(DeviceNameU.Buffer);
 
        return STATUS_SUCCESS;
@@ -124,6 +122,8 @@ cleanup:
 cleanupFDO:
        if (DeviceExtension)
        {
+               if (DeviceExtension->LowerDevice)
+                       IoDetachDevice(DeviceExtension->LowerDevice);
                ExFreePool(DeviceExtension->MouseInputData[0]);
                ExFreePool(DeviceExtension->MouseInputData[1]);
        }
@@ -177,7 +177,7 @@ SermouseStartDevice(
                /* Override the number of buttons */
                DeviceExtension->AttributesInformation.NumberOfButtons = DeviceExtension->DriverExtension->NumberOfButtons;
 
-       DeviceExtension->AttributesInformation.SampleRate = 1200 / 8;
+       DeviceExtension->AttributesInformation.SampleRate = DeviceExtension->DriverExtension->SampleRate / 8;
        DeviceExtension->AttributesInformation.InputDataQueueLength = DeviceExtension->DriverExtension->MouseDataQueueSize;
        DeviceExtension->MouseType = MouseType;
        DeviceExtension->PnpState = dsStarted;
index 479095e..4a52f92 100644 (file)
@@ -172,7 +172,7 @@ SermouseDeviceWorker(
                for (i = 0; i < ioStatus.Information; i++)
                {
                        ReceivedByte = Buffer[i];
-                       DPRINT1("ReceivedByte 0x%02x\n", ReceivedByte);
+                       DPRINT("ReceivedByte 0x%02x\n", ReceivedByte);
 
                        /* Synchronize */
                        if ((ReceivedByte & 0x40) == 0x40)