mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Assign provider-specific fields in IOCTL_SERIAL_GET_PROPERTIES
Big clean up in serial.h header Fix header text (remove $Id...) svn path=/trunk/; revision=16250
This commit is contained in:
parent
13c65b3f47
commit
130a036ab2
13 changed files with 67 additions and 81 deletions
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/circularbuffer.c
|
||||
* PURPOSE: Operations on a circular buffer
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/cleanup.c
|
||||
* PURPOSE: Serial IRP_MJ_CLEANUP operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/close.c
|
||||
* PURPOSE: Serial IRP_MJ_CLOSE operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/create.c
|
||||
* PURPOSE: Serial IRP_MJ_CREATE operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/devctrl.c
|
||||
* PURPOSE: Serial IRP_MJ_DEVICE_CONTROL operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -196,12 +195,13 @@ SerialGetCommProp(
|
|||
|
||||
RtlZeroMemory(pCommProp, sizeof(SERIAL_COMMPROP));
|
||||
|
||||
pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
|
||||
if (!(pCommProp->ProvSpec1 & COMMPROP_INITIALIZED))
|
||||
pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
|
||||
pCommProp->PacketVersion = 2;
|
||||
pCommProp->ServiceMask = SERIAL_SP_SERIALCOMM;
|
||||
pCommProp->MaxTxQueue = pCommProp->CurrentTxQueue = DeviceExtension->OutputBuffer.Length - 1;
|
||||
pCommProp->MaxRxQueue = pCommProp->CurrentRxQueue = DeviceExtension->InputBuffer.Length - 1;
|
||||
pCommProp->ProvSubType = 1; // PST_RS232;
|
||||
pCommProp->ProvSubType = PST_RS232;
|
||||
pCommProp->ProvCapabilities = SERIAL_PCF_DTRDSR | SERIAL_PCF_INTTIMEOUTS | SERIAL_PCF_PARITY_CHECK
|
||||
| SERIAL_PCF_RTSCTS | SERIAL_PCF_SETXCHAR | SERIAL_PCF_SPECIALCHARS | SERIAL_PCF_TOTALTIMEOUTS
|
||||
| SERIAL_PCF_XONXOFF;
|
||||
|
@ -227,6 +227,8 @@ SerialGetCommProp(
|
|||
pCommProp->SettableStopParity = SERIAL_STOPBITS_10 | SERIAL_STOPBITS_15 | SERIAL_STOPBITS_20
|
||||
| SERIAL_PARITY_NONE | SERIAL_PARITY_ODD | SERIAL_PARITY_EVEN | SERIAL_PARITY_MARK | SERIAL_PARITY_SPACE;
|
||||
|
||||
pCommProp->ProvSpec2 = 0; /* Size of provider-specific data */
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/info.c
|
||||
* PURPOSE: Serial IRP_MJ_QUERY_INFORMATION operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/bus/serial/legacy.c
|
||||
* PURPOSE: Legacy serial port enumeration
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
* Mark Junker (mjscod@gmx.de)
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/misc.c
|
||||
* PURPOSE: Misceallenous operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/pnp.c
|
||||
* PURPOSE: Serial IRP_MJ_PNP operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/power.c
|
||||
* PURPOSE: Serial IRP_MJ_POWER operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial port driver
|
||||
* FILE: drivers/dd/serial/create.c
|
||||
* PURPOSE: Serial IRP_MJ_READ/IRP_MJ_WRITE operations
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
/* $Id:
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PROJECT: Serial driver
|
||||
* FILE: drivers/dd/serial/serial.c
|
||||
* PURPOSE: Serial driver loading/unloading
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (poussine@freesurf.fr)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
//#define NDEBUG
|
||||
|
|
|
@ -1,47 +1,42 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: Serial driver
|
||||
* FILE: drivers/dd/serial/serial.h
|
||||
* PURPOSE: Serial driver header
|
||||
*
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.com)
|
||||
*/
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <ntddser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
/* FIXME: these prototypes MUST NOT be here! */
|
||||
NTSTATUS STDCALL
|
||||
IoAttachDeviceToDeviceStackSafe(
|
||||
IN PDEVICE_OBJECT SourceDevice,
|
||||
IN PDEVICE_OBJECT TargetDevice,
|
||||
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#include <ntddk.h>
|
||||
#include <ntddser.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define STDCALL
|
||||
|
||||
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
|
||||
#define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
|
||||
|
||||
NTSTATUS STDCALL
|
||||
IoAttachDeviceToDeviceStackSafe(
|
||||
IN PDEVICE_OBJECT SourceDevice,
|
||||
IN PDEVICE_OBJECT TargetDevice,
|
||||
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
|
||||
|
||||
#ifdef NDEBUG2
|
||||
#define DPRINT
|
||||
#define CHECKPOINT
|
||||
#else
|
||||
#define DPRINT DPRINT1
|
||||
#define CHECKPOINT CHECKPOINT1
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
#define DPRINT
|
||||
#define CHECKPOINT
|
||||
#else
|
||||
#error Unknown compiler!
|
||||
#endif
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
||||
/* See winbase.h */
|
||||
#define PST_RS232 1
|
||||
#define COMMPROP_INITIALIZED 0xE73CF52E
|
||||
|
||||
/* FIXME: I don't know why it is not defined anywhere... */
|
||||
NTSTATUS STDCALL
|
||||
IoAttachDeviceToDeviceStackSafe(
|
||||
IN PDEVICE_OBJECT SourceDevice,
|
||||
IN PDEVICE_OBJECT TargetDevice,
|
||||
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
dsStopped,
|
||||
|
|
Loading…
Reference in a new issue