mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
Fix some warnings
svn path=/trunk/; revision=26127
This commit is contained in:
parent
889d81aa97
commit
2d8e002457
14 changed files with 54 additions and 95 deletions
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
#define IO_METHOD_FROM_CTL_CODE(ctlCode) (ctlCode&0x00000003)
|
||||
|
@ -52,7 +51,7 @@ SerialSetBaudRate(
|
|||
{
|
||||
ULONG BaudRate;
|
||||
USHORT divisor;
|
||||
PUCHAR ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
PUCHAR ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
if (NewBaudRate == 0)
|
||||
|
@ -61,7 +60,7 @@ SerialSetBaudRate(
|
|||
divisor = (USHORT)(BAUD_CLOCK / (CLOCKS_PER_BIT * NewBaudRate));
|
||||
BaudRate = BAUD_CLOCK / (CLOCKS_PER_BIT * divisor);
|
||||
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
UCHAR Lcr;
|
||||
|
@ -75,7 +74,7 @@ SerialSetBaudRate(
|
|||
/* Switch back to normal registers */
|
||||
WRITE_PORT_UCHAR(SER_LCR(ComPortBase), Lcr);
|
||||
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
|
@ -141,15 +140,15 @@ SerialSetLineControl(
|
|||
}
|
||||
|
||||
/* Update current parameters */
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (!NT_SUCCESS(Status))
|
||||
return Status;
|
||||
WRITE_PORT_UCHAR(SER_LCR(ComPortBase), Lcr);
|
||||
|
||||
/* Read junk out of RBR */
|
||||
READ_PORT_UCHAR(SER_RBR(ComPortBase));
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
DeviceExtension->SerialLineControl = *NewSettings;
|
||||
|
@ -295,7 +294,7 @@ SerialDeviceControl(
|
|||
LengthIn = Stack->Parameters.DeviceIoControl.InputBufferLength;
|
||||
LengthOut = Stack->Parameters.DeviceIoControl.OutputBufferLength;
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
IoControlCode = Stack->Parameters.DeviceIoControl.IoControlCode;
|
||||
SerialGetUserBuffers(Irp, IoControlCode, &BufferIn, &BufferOut);
|
||||
|
||||
|
@ -318,12 +317,12 @@ SerialDeviceControl(
|
|||
DPRINT("IOCTL_SERIAL_CLR_DTR\n");
|
||||
/* FIXME: If the handshake flow control of the device is configured to
|
||||
* automatically use DTR, return STATUS_INVALID_PARAMETER */
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DeviceExtension->MCR &= ~SR_MCR_DTR;
|
||||
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -332,12 +331,12 @@ SerialDeviceControl(
|
|||
DPRINT("IOCTL_SERIAL_CLR_RTS\n");
|
||||
/* FIXME: If the handshake flow control of the device is configured to
|
||||
* automatically use RTS, return STATUS_INVALID_PARAMETER */
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DeviceExtension->MCR &= ~SR_MCR_RTS;
|
||||
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -557,11 +556,11 @@ SerialDeviceControl(
|
|||
if (DeviceExtension->UartType >= Uart16550A)
|
||||
{
|
||||
/* Clear also Uart FIFO */
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), SR_FCR_CLEAR_RCVR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
KeReleaseSpinLock(&DeviceExtension->InputBufferLock, Irql);
|
||||
|
@ -574,11 +573,11 @@ SerialDeviceControl(
|
|||
if (DeviceExtension->UartType >= Uart16550A)
|
||||
{
|
||||
/* Clear also Uart FIFO */
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), SR_FCR_CLEAR_XMIT);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
|
||||
|
@ -634,12 +633,12 @@ SerialDeviceControl(
|
|||
DPRINT("IOCTL_SERIAL_SET_DTR\n");
|
||||
if (!(DeviceExtension->MCR & SR_MCR_DTR))
|
||||
{
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DeviceExtension->MCR |= SR_MCR_DTR;
|
||||
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,11 +652,11 @@ SerialDeviceControl(
|
|||
Status = STATUS_INVALID_PARAMETER;
|
||||
else
|
||||
{
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
WRITE_PORT_UCHAR(SER_FCR(ComPortBase), (UCHAR)((*(PULONG)BufferIn) & 0xff));
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -688,13 +687,13 @@ SerialDeviceControl(
|
|||
Status = STATUS_INVALID_PARAMETER;
|
||||
else
|
||||
{
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
pMCR = (PULONG)BufferIn;
|
||||
DeviceExtension->MCR = (UCHAR)(*pMCR & 0xff);
|
||||
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -732,12 +731,12 @@ SerialDeviceControl(
|
|||
DPRINT("IOCTL_SERIAL_SET_RTS\n");
|
||||
if (!(DeviceExtension->MCR & SR_MCR_RTS))
|
||||
{
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DeviceExtension->MCR |= SR_MCR_RTS;
|
||||
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* Mark Junker (mjscod@gmx.de)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
UART_TYPE
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
*/
|
||||
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion;
|
||||
|
||||
static NTSTATUS NTAPI
|
||||
ForwardIrpAndWaitCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
|
@ -36,7 +37,7 @@ ForwardIrpAndWait(
|
|||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||
|
||||
DPRINT("Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName);
|
||||
DPRINT("Calling lower device %p\n", LowerDevice);
|
||||
IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE);
|
||||
|
||||
Status = IoCallDriver(LowerDevice, Irp);
|
||||
|
@ -78,7 +79,7 @@ SerialReceiveByte(
|
|||
NTSTATUS Status;
|
||||
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)pDeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
KeAcquireSpinLock(&DeviceExtension->InputBufferLock, &Irql);
|
||||
while (READ_PORT_UCHAR(SER_LSR(ComPortBase)) & SR_LSR_DATA_RECEIVED)
|
||||
|
@ -115,7 +116,7 @@ SerialSendByte(
|
|||
NTSTATUS Status;
|
||||
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)pDeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
KeAcquireSpinLock(&DeviceExtension->OutputBufferLock, &Irql);
|
||||
while (!IsCircularBufferEmpty(&DeviceExtension->OutputBuffer)
|
||||
|
@ -164,7 +165,7 @@ SerialInterruptService(
|
|||
|
||||
DeviceObject = (PDEVICE_OBJECT)ServiceContext;
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
Iir = READ_PORT_UCHAR(SER_IIR(ComPortBase));
|
||||
if (Iir == 0xff)
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
|
||||
|
||||
#define INITGUID
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
@ -216,7 +215,7 @@ SerialPnpStartDevice(
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
if (!Dirql)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
/* Test if we are trying to start the serial port used for debugging */
|
||||
DPRINT1("KdComPort: %p\n", KdComPortInUse);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
NTSTATUS NTAPI
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
static IO_WORKITEM_ROUTINE SerialReadWorkItem;
|
||||
|
||||
static PVOID
|
||||
SerialGetUserBuffer(IN PIRP Irp)
|
||||
{
|
||||
|
@ -40,7 +41,7 @@ ReadBytes(
|
|||
ASSERT(WorkItemData);
|
||||
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
Length = IoGetCurrentIrpStackLocation(Irp)->Parameters.Read.Length;
|
||||
Buffer = SerialGetUserBuffer(Irp);
|
||||
|
||||
|
@ -228,7 +229,7 @@ SerialRead(
|
|||
|
||||
/* insufficient resources, we can't pend the Irp */
|
||||
CHECKPOINT;
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePoolWithTag(WorkItemData, SERIAL_TAG);
|
||||
|
@ -237,7 +238,7 @@ SerialRead(
|
|||
ReadBytes(DeviceObject, Irp, WorkItemData);
|
||||
Status = Irp->IoStatus.Status;
|
||||
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
|
||||
ByeBye:
|
||||
Irp->IoStatus.Status = Status;
|
||||
|
@ -268,7 +269,7 @@ SerialWrite(
|
|||
Length = Stack->Parameters.Write.Length;
|
||||
Buffer = SerialGetUserBuffer(Irp);
|
||||
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
|
||||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
if (Stack->Parameters.Write.ByteOffset.QuadPart != 0 || Buffer == NULL)
|
||||
{
|
||||
|
@ -276,7 +277,7 @@ SerialWrite(
|
|||
goto ByeBye;
|
||||
}
|
||||
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
if (!NT_SUCCESS(Status))
|
||||
goto ByeBye;
|
||||
|
||||
|
@ -304,7 +305,7 @@ SerialWrite(
|
|||
Information++;
|
||||
}
|
||||
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
|
||||
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, ULongToPtr(DeviceExtension->ComPort));
|
||||
|
||||
/* send bytes */
|
||||
SerialSendByte(NULL, DeviceExtension, NULL, NULL);
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
*/
|
||||
|
||||
//#define NDEBUG
|
||||
#include "serial.h"
|
||||
|
||||
static DRIVER_UNLOAD DriverUnload;
|
||||
DRIVER_INITIALIZE DriverEntry;
|
||||
|
||||
static VOID NTAPI
|
||||
DriverUnload(IN PDRIVER_OBJECT DriverObject)
|
||||
{
|
||||
|
|
|
@ -227,31 +227,19 @@ IncreaseCircularBufferSize(
|
|||
|
||||
/************************************ cleanup.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialCleanup(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialCleanup;
|
||||
|
||||
/************************************ close.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialClose(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialClose;
|
||||
|
||||
/************************************ create.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialCreate(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialCreate;
|
||||
|
||||
/************************************ devctrl.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialDeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialDeviceControl;
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialSetBaudRate(
|
||||
|
@ -265,10 +253,7 @@ SerialSetLineControl(
|
|||
|
||||
/************************************ info.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialQueryInformation(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialQueryInformation;
|
||||
|
||||
/************************************ legacy.c */
|
||||
|
||||
|
@ -283,10 +268,7 @@ ForwardIrpAndWait(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
ForwardIrpAndForget(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH ForwardIrpAndForget;
|
||||
|
||||
VOID NTAPI
|
||||
SerialReceiveByte(
|
||||
|
@ -309,10 +291,7 @@ SerialCompleteIrp(
|
|||
IN PVOID pIrp, // real type PIRP
|
||||
IN PVOID Unused);
|
||||
|
||||
BOOLEAN NTAPI
|
||||
SerialInterruptService(
|
||||
IN PKINTERRUPT Interrupt,
|
||||
IN OUT PVOID ServiceContext);
|
||||
KSERVICE_ROUTINE SerialInterruptService;
|
||||
|
||||
/************************************ pnp.c */
|
||||
|
||||
|
@ -324,10 +303,7 @@ SerialAddDeviceInternal(
|
|||
IN PULONG pComPortNumber OPTIONAL,
|
||||
OUT PDEVICE_OBJECT* pFdo OPTIONAL);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialAddDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT Pdo);
|
||||
DRIVER_ADD_DEVICE SerialAddDevice;
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialPnpStartDevice(
|
||||
|
@ -335,26 +311,13 @@ SerialPnpStartDevice(
|
|||
IN PCM_RESOURCE_LIST ResourceList,
|
||||
IN PCM_RESOURCE_LIST ResourceListTranslated);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialPnp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialPnp;
|
||||
|
||||
/************************************ power.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialPower(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialPower;
|
||||
|
||||
/************************************ rw.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialRead(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
SerialWrite(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp);
|
||||
DRIVER_DISPATCH SerialRead;
|
||||
DRIVER_DISPATCH SerialWrite;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<module name="serial" type="kernelmodedriver" installbase="system32/drivers" installname="serial.sys">
|
||||
<define name="__USE_W32API" />
|
||||
<define name="NDEBUG" />
|
||||
<library>ntoskrnl</library>
|
||||
<library>hal</library>
|
||||
<file>circularbuffer.c</file>
|
||||
|
|
Loading…
Reference in a new issue