Author: hpoussin
Date: Sun Aug 6 19:37:21 2006
New Revision: 23498
URL:
http://svn.reactos.org/svn/reactos?rev=23498&view=rev
Log:
STDCALL -> NTAPI
Update my mail address
Modified:
trunk/reactos/drivers/base/serial/circularbuffer.c
trunk/reactos/drivers/base/serial/cleanup.c
trunk/reactos/drivers/base/serial/close.c
trunk/reactos/drivers/base/serial/create.c
trunk/reactos/drivers/base/serial/devctrl.c
trunk/reactos/drivers/base/serial/info.c
trunk/reactos/drivers/base/serial/legacy.c
trunk/reactos/drivers/base/serial/misc.c
trunk/reactos/drivers/base/serial/pnp.c
trunk/reactos/drivers/base/serial/power.c
trunk/reactos/drivers/base/serial/rw.c
trunk/reactos/drivers/base/serial/serial.c
trunk/reactos/drivers/base/serial/serial.h
Modified: trunk/reactos/drivers/base/serial/circularbuffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/circul…
==============================================================================
--- trunk/reactos/drivers/base/serial/circularbuffer.c (original)
+++ trunk/reactos/drivers/base/serial/circularbuffer.c Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/dd/serial/circularbuffer.c
* PURPOSE: Operations on a circular buffer
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
Modified: trunk/reactos/drivers/base/serial/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/cleanu…
==============================================================================
--- trunk/reactos/drivers/base/serial/cleanup.c (original)
+++ trunk/reactos/drivers/base/serial/cleanup.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/cleanup.c
* PURPOSE: Serial IRP_MJ_CLEANUP operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialCleanup(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/close.…
==============================================================================
--- trunk/reactos/drivers/base/serial/close.c (original)
+++ trunk/reactos/drivers/base/serial/close.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/close.c
* PURPOSE: Serial IRP_MJ_CLOSE operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/create…
==============================================================================
--- trunk/reactos/drivers/base/serial/create.c (original)
+++ trunk/reactos/drivers/base/serial/create.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/create.c
* PURPOSE: Serial IRP_MJ_CREATE operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/devctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/devctr…
==============================================================================
--- trunk/reactos/drivers/base/serial/devctrl.c (original)
+++ trunk/reactos/drivers/base/serial/devctrl.c Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/dd/serial/devctrl.c
* PURPOSE: Serial IRP_MJ_DEVICE_CONTROL operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
@@ -45,7 +45,7 @@
}
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialSetBaudRate(
IN PSERIAL_DEVICE_EXTENSION DeviceExtension,
IN ULONG NewBaudRate)
@@ -54,6 +54,9 @@
USHORT divisor;
PUCHAR ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
NTSTATUS Status = STATUS_SUCCESS;
+
+ if (NewBaudRate == 0)
+ return STATUS_INVALID_PARAMETER;
divisor = (USHORT)(BAUD_CLOCK / (CLOCKS_PER_BIT * NewBaudRate));
BaudRate = BAUD_CLOCK / (CLOCKS_PER_BIT * divisor);
@@ -80,7 +83,7 @@
return Status;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialSetLineControl(
IN PSERIAL_DEVICE_EXTENSION DeviceExtension,
IN PSERIAL_LINE_CONTROL NewSettings)
@@ -272,7 +275,7 @@
return STATUS_SUCCESS;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/info.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/info.c…
==============================================================================
--- trunk/reactos/drivers/base/serial/info.c (original)
+++ trunk/reactos/drivers/base/serial/info.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/info.c
* PURPOSE: Serial IRP_MJ_QUERY_INFORMATION operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialQueryInformation(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/legacy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/legacy…
==============================================================================
--- trunk/reactos/drivers/base/serial/legacy.c (original)
+++ trunk/reactos/drivers/base/serial/legacy.c Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/bus/serial/legacy.c
* PURPOSE: Legacy serial port enumeration
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
* Mark Junker (mjscod(a)gmx.de)
*/
Modified: trunk/reactos/drivers/base/serial/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/misc.c…
==============================================================================
--- trunk/reactos/drivers/base/serial/misc.c (original)
+++ trunk/reactos/drivers/base/serial/misc.c Sun Aug 6 19:37:21 2006
@@ -4,14 +4,14 @@
* FILE: drivers/dd/serial/misc.c
* PURPOSE: Misceallenous operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
#define NDEBUG
#include "serial.h"
-static NTSTATUS STDCALL
+static NTSTATUS NTAPI
ForwardIrpAndWaitCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -50,7 +50,7 @@
return Status;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
ForwardIrpAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
@@ -63,7 +63,7 @@
return IoCallDriver(LowerDevice, Irp);
}
-VOID STDCALL
+VOID NTAPI
SerialReceiveByte(
IN PKDPC Dpc,
IN PVOID pDeviceExtension, // real type PSERIAL_DEVICE_EXTENSION
@@ -100,7 +100,7 @@
WRITE_PORT_UCHAR(SER_IER(ComPortBase), IER | SR_IER_DATA_RECEIVED);
}
-VOID STDCALL
+VOID NTAPI
SerialSendByte(
IN PKDPC Dpc,
IN PVOID pDeviceExtension, // real type PSERIAL_DEVICE_EXTENSION
@@ -138,7 +138,7 @@
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
}
-BOOLEAN STDCALL
+BOOLEAN NTAPI
SerialInterruptService(
IN PKINTERRUPT Interrupt,
IN OUT PVOID ServiceContext)
@@ -179,6 +179,14 @@
KeInsertQueueDpc(&DeviceExtension->ReceivedByteDpc, NULL, NULL);
else
; /* FIXME: stop reception */
+ }
+ if (MSR & SR_MSR_RI_CHANGED)
+ {
+ DPRINT("SR_MSR_RI_CHANGED changed: now %d\n", MSR & SI_MSR_RI);
+ }
+ if (MSR & SR_MSR_DCD_CHANGED)
+ {
+ DPRINT("SR_MSR_DCD_CHANGED changed: now %d\n", MSR & SR_MSR_DCD);
}
IER = READ_PORT_UCHAR(SER_IER(ComPortBase));
WRITE_PORT_UCHAR(SER_IER(ComPortBase), IER | SR_IER_MSR_CHANGE);
Modified: trunk/reactos/drivers/base/serial/pnp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/pnp.c?…
==============================================================================
--- trunk/reactos/drivers/base/serial/pnp.c (original)
+++ trunk/reactos/drivers/base/serial/pnp.c Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/dd/serial/pnp.c
* PURPOSE: Serial IRP_MJ_PNP operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
@@ -12,7 +12,7 @@
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialAddDeviceInternal(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo,
@@ -104,7 +104,7 @@
return Status;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo)
@@ -122,7 +122,7 @@
return SerialAddDeviceInternal(DriverObject, Pdo, UartUnknown, NULL, NULL);
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPnpStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PCM_RESOURCE_LIST ResourceList,
@@ -294,7 +294,7 @@
return STATUS_SUCCESS;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/power.…
==============================================================================
--- trunk/reactos/drivers/base/serial/power.c (original)
+++ trunk/reactos/drivers/base/serial/power.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/power.c
* PURPOSE: Serial IRP_MJ_POWER operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
#include "serial.h"
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPower(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/rw.c?r…
==============================================================================
--- trunk/reactos/drivers/base/serial/rw.c (original)
+++ trunk/reactos/drivers/base/serial/rw.c Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/dd/serial/create.c
* PURPOSE: Serial IRP_MJ_READ/IRP_MJ_WRITE operations
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#define NDEBUG
@@ -113,7 +113,7 @@
Irp->IoStatus.Status = STATUS_SUCCESS;
}
-static VOID STDCALL
+static VOID NTAPI
SerialReadWorkItem(
IN PDEVICE_OBJECT DeviceObject,
IN PVOID pWorkItemData /* real type PWORKITEM_DATA */)
@@ -134,7 +134,7 @@
ExFreePoolWithTag(pWorkItemData, SERIAL_TAG);
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialRead(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
@@ -245,7 +245,7 @@
return Status;
}
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
Modified: trunk/reactos/drivers/base/serial/serial.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/serial…
==============================================================================
--- trunk/reactos/drivers/base/serial/serial.c (original)
+++ trunk/reactos/drivers/base/serial/serial.c Sun Aug 6 19:37:21 2006
@@ -4,13 +4,13 @@
* FILE: drivers/dd/serial/serial.c
* PURPOSE: Serial driver loading/unloading
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
//#define NDEBUG
#include "serial.h"
-static VOID STDCALL
+static VOID NTAPI
DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
// nothing to do here yet
@@ -19,7 +19,7 @@
/*
* Standard DriverEntry method.
*/
-NTSTATUS STDCALL
+NTSTATUS NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath)
Modified: trunk/reactos/drivers/base/serial/serial.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/serial/serial…
==============================================================================
--- trunk/reactos/drivers/base/serial/serial.h (original)
+++ trunk/reactos/drivers/base/serial/serial.h Sun Aug 6 19:37:21 2006
@@ -4,7 +4,7 @@
* FILE: drivers/dd/serial/serial.h
* PURPOSE: Serial driver header
*
- * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.com)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
*/
#include <ntddk.h>
@@ -15,8 +15,6 @@
#if defined(__GNUC__)
#include <debug.h>
#elif defined(_MSC_VER)
- #define STDCALL
-
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
#define DPRINT
@@ -31,12 +29,14 @@
#define PST_RS232 1
#define COMMPROP_INITIALIZED 0xE73CF52E
-/* FIXME: I don't know why it is not defined anywhere... */
-NTSTATUS STDCALL
+#ifndef _NTIFS_
+/* Why is it only defined in ntifs.h file? */
+NTSTATUS NTAPI
IoAttachDeviceToDeviceStackSafe(
IN PDEVICE_OBJECT SourceDevice,
IN PDEVICE_OBJECT TargetDevice,
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
+#endif
typedef enum
{
@@ -129,45 +129,45 @@
#define SER_THR(x) ((x)+0) /* Transmit Register */
#define SER_DLL(x) ((x)+0) /* Baud Rate Divisor LSB */
#define SER_IER(x) ((x)+1) /* Interrupt Enable Register */
-#define SR_IER_DATA_RECEIVED 0x01
-#define SR_IER_THR_EMPTY 0x02
-#define SR_IER_LSR_CHANGE 0x04
-#define SR_IER_MSR_CHANGE 0x08
-#define SR_IER_SLEEP_MODE 0x10 /* Uart >= 16750 */
-#define SR_IER_LOW_POWER 0x20 /* Uart >= 16750 */
+#define SR_IER_DATA_RECEIVED 0x01
+#define SR_IER_THR_EMPTY 0x02
+#define SR_IER_LSR_CHANGE 0x04
+#define SR_IER_MSR_CHANGE 0x08
+#define SR_IER_SLEEP_MODE 0x10 /* Uart >= 16750 */
+#define SR_IER_LOW_POWER 0x20 /* Uart >= 16750 */
#define SER_DLM(x) ((x)+1) /* Baud Rate Divisor MSB */
#define SER_IIR(x) ((x)+2) /* Interrupt Identification Register */
-#define SR_IIR_SELF 0x00
-#define SR_IIR_ID_MASK 0x07
-#define SR_IIR_MSR_CHANGE SR_IIR_SELF
+#define SR_IIR_SELF 0x00
+#define SR_IIR_ID_MASK 0x07
+#define SR_IIR_MSR_CHANGE SR_IIR_SELF
#define SR_IIR_THR_EMPTY (SR_IIR_SELF | 2)
#define SR_IIR_DATA_RECEIVED (SR_IIR_SELF | 4)
#define SR_IIR_ERROR (SR_IIR_SELF | 6)
#define SER_FCR(x) ((x)+2) /* FIFO Control Register (Uart >= 16550A) */
-#define SR_FCR_ENABLE_FIFO 0x01
-#define SR_FCR_CLEAR_RCVR (0x02 | SR_FCR_ENABLE_FIFO)
-#define SR_FCR_CLEAR_XMIT (0x04 | SR_FCR_ENABLE_FIFO)
-#define SR_FCR_1_BYTE (0x00 | SR_FCR_ENABLE_FIFO)
-#define SR_FCR_4_BYTES (0x40 | SR_FCR_ENABLE_FIFO)
-#define SR_FCR_8_BYTES (0x80 | SR_FCR_ENABLE_FIFO)
-#define SR_FCR_14_BYTES (0xC0 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_ENABLE_FIFO 0x01
+#define SR_FCR_CLEAR_RCVR (0x02 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_CLEAR_XMIT (0x04 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_1_BYTE (0x00 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_4_BYTES (0x40 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_8_BYTES (0x80 | SR_FCR_ENABLE_FIFO)
+#define SR_FCR_14_BYTES (0xC0 | SR_FCR_ENABLE_FIFO)
#define SER_LCR(x) ((x)+3) /* Line Control Register */
-#define SR_LCR_CS5 0x00
-#define SR_LCR_CS6 0x01
-#define SR_LCR_CS7 0x02
-#define SR_LCR_CS8 0x03
-#define SR_LCR_ST1 0x00
-#define SR_LCR_ST2 0x04
-#define SR_LCR_PNO 0x00
-#define SR_LCR_POD 0x08
-#define SR_LCR_PEV 0x18
-#define SR_LCR_PMK 0x28
-#define SR_LCR_PSP 0x38
-#define SR_LCR_BRK 0x40
-#define SR_LCR_DLAB 0x80
+#define SR_LCR_CS5 0x00
+#define SR_LCR_CS6 0x01
+#define SR_LCR_CS7 0x02
+#define SR_LCR_CS8 0x03
+#define SR_LCR_ST1 0x00
+#define SR_LCR_ST2 0x04
+#define SR_LCR_PNO 0x00
+#define SR_LCR_POD 0x08
+#define SR_LCR_PEV 0x18
+#define SR_LCR_PMK 0x28
+#define SR_LCR_PSP 0x38
+#define SR_LCR_BRK 0x40
+#define SR_LCR_DLAB 0x80
#define SER_MCR(x) ((x)+4) /* Modem Control Register */
-#define SR_MCR_DTR 0x01
-#define SR_MCR_RTS 0x02
+#define SR_MCR_DTR SERIAL_DTR_STATE
+#define SR_MCR_RTS SERIAL_RTS_STATE
#define SER_LSR(x) ((x)+5) /* Line Status Register */
#define SR_LSR_DATA_RECEIVED 0x01
#define SR_LSR_OVERRUN_ERROR 0x02
@@ -182,11 +182,11 @@
#define SR_MSR_DSR_CHANGED 0x02
#define SR_MSR_RI_CHANGED 0x04
#define SR_MSR_DCD_CHANGED 0x08
-#define SR_MSR_CTS 0x10 /* Clear To Send */
-#define SR_MSR_DSR 0x20 /* Data Set Ready */
-#define SI_MSR_RI 0x40 /* Ring Indicator */
-#define SR_MSR_DCD 0x80 /* Data Carrier Detect */
-#define SER_SCR(x) ((x)+7) /* Scratch Pad Register */
+#define SR_MSR_CTS SERIAL_CTS_STATE /* Clear To Send */
+#define SR_MSR_DSR SERIAL_DSR_STATE /* Data Set Ready */
+#define SI_MSR_RI SERIAL_RI_STATE /* Ring Indicator */
+#define SR_MSR_DCD SERIAL_DCD_STATE /* Data Carrier Detect */
+#define SER_SCR(x) ((x)+7) /* Scratch Pad Register, Uart >= Uart16450 */
/************************************ circularbuffer.c */
@@ -221,45 +221,45 @@
/************************************ cleanup.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialCleanup(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ close.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ create.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ devctrl.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialSetBaudRate(
IN PSERIAL_DEVICE_EXTENSION DeviceExtension,
IN ULONG NewBaudRate);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialSetLineControl(
IN PSERIAL_DEVICE_EXTENSION DeviceExtension,
IN PSERIAL_LINE_CONTROL NewSettings);
/************************************ info.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialQueryInformation(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
@@ -277,33 +277,33 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
ForwardIrpAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-VOID STDCALL
+VOID NTAPI
SerialReceiveByte(
IN PKDPC Dpc,
IN PVOID pDeviceExtension, // real type PSERIAL_DEVICE_EXTENSION
IN PVOID pByte, // real type UCHAR
IN PVOID Unused);
-VOID STDCALL
+VOID NTAPI
SerialSendByte(
IN PKDPC Dpc,
IN PVOID pDeviceExtension, // real type PSERIAL_DEVICE_EXTENSION
IN PVOID Unused1,
IN PVOID Unused2);
-BOOLEAN STDCALL
+BOOLEAN NTAPI
SerialInterruptService(
IN PKINTERRUPT Interrupt,
IN OUT PVOID ServiceContext);
/************************************ pnp.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialAddDeviceInternal(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo,
@@ -311,44 +311,37 @@
IN PULONG pComPortNumber OPTIONAL,
OUT PDEVICE_OBJECT* pFdo OPTIONAL);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPnpStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PCM_RESOURCE_LIST ResourceList,
IN PCM_RESOURCE_LIST ResourceListTranslated);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ power.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialPower(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ rw.c */
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialRead(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-NTSTATUS STDCALL
+NTSTATUS NTAPI
SerialWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-
-/************************************ serial.c */
-
-NTSTATUS STDCALL
-DriverEntry(
- IN PDRIVER_OBJECT DriverObject,
- IN PUNICODE_STRING RegPath);