mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[ISAPNP] Reformat files. No code change.
This commit is contained in:
parent
a8dbe6805a
commit
947b49aac3
6 changed files with 725 additions and 688 deletions
|
@ -14,7 +14,8 @@
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
WriteAddress(USHORT Address)
|
||||
WriteAddress(
|
||||
IN USHORT Address)
|
||||
{
|
||||
WRITE_PORT_UCHAR((PUCHAR)ISAPNP_ADDRESS, Address);
|
||||
}
|
||||
|
@ -22,7 +23,8 @@ WriteAddress(USHORT Address)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
WriteData(USHORT Data)
|
||||
WriteData(
|
||||
IN USHORT Data)
|
||||
{
|
||||
WRITE_PORT_UCHAR((PUCHAR)ISAPNP_WRITE_DATA, Data);
|
||||
}
|
||||
|
@ -30,7 +32,8 @@ WriteData(USHORT Data)
|
|||
static
|
||||
inline
|
||||
UCHAR
|
||||
ReadData(PUCHAR ReadDataPort)
|
||||
ReadData(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
return READ_PORT_UCHAR(ReadDataPort);
|
||||
}
|
||||
|
@ -38,7 +41,9 @@ ReadData(PUCHAR ReadDataPort)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
WriteByte(USHORT Address, USHORT Value)
|
||||
WriteByte(
|
||||
IN USHORT Address,
|
||||
IN USHORT Value)
|
||||
{
|
||||
WriteAddress(Address);
|
||||
WriteData(Value);
|
||||
|
@ -47,7 +52,9 @@ WriteByte(USHORT Address, USHORT Value)
|
|||
static
|
||||
inline
|
||||
UCHAR
|
||||
ReadByte(PUCHAR ReadDataPort, USHORT Address)
|
||||
ReadByte(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT Address)
|
||||
{
|
||||
WriteAddress(Address);
|
||||
return ReadData(ReadDataPort);
|
||||
|
@ -56,7 +63,9 @@ ReadByte(PUCHAR ReadDataPort, USHORT Address)
|
|||
static
|
||||
inline
|
||||
USHORT
|
||||
ReadWord(PUCHAR ReadDataPort, USHORT Address)
|
||||
ReadWord(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT Address)
|
||||
{
|
||||
return ((ReadByte(ReadDataPort, Address) << 8) |
|
||||
(ReadByte(ReadDataPort, Address + 1)));
|
||||
|
@ -65,7 +74,8 @@ ReadWord(PUCHAR ReadDataPort, USHORT Address)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
SetReadDataPort(PUCHAR ReadDataPort)
|
||||
SetReadDataPort(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
WriteByte(ISAPNP_READPORT, ((ULONG_PTR)ReadDataPort >> 2));
|
||||
}
|
||||
|
@ -97,7 +107,8 @@ ResetCsn(VOID)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
Wake(USHORT Csn)
|
||||
Wake(
|
||||
IN USHORT Csn)
|
||||
{
|
||||
WriteByte(ISAPNP_WAKE, Csn);
|
||||
}
|
||||
|
@ -105,7 +116,8 @@ Wake(USHORT Csn)
|
|||
static
|
||||
inline
|
||||
USHORT
|
||||
ReadResourceData(PUCHAR ReadDataPort)
|
||||
ReadResourceData(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
return ReadByte(ReadDataPort, ISAPNP_RESOURCEDATA);
|
||||
}
|
||||
|
@ -113,7 +125,8 @@ ReadResourceData(PUCHAR ReadDataPort)
|
|||
static
|
||||
inline
|
||||
USHORT
|
||||
ReadStatus(PUCHAR ReadDataPort)
|
||||
ReadStatus(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
return ReadByte(ReadDataPort, ISAPNP_STATUS);
|
||||
}
|
||||
|
@ -121,7 +134,8 @@ ReadStatus(PUCHAR ReadDataPort)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
WriteCsn(USHORT Csn)
|
||||
WriteCsn(
|
||||
IN USHORT Csn)
|
||||
{
|
||||
WriteByte(ISAPNP_CARDSELECTNUMBER, Csn);
|
||||
}
|
||||
|
@ -129,7 +143,8 @@ WriteCsn(USHORT Csn)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
WriteLogicalDeviceNumber(USHORT LogDev)
|
||||
WriteLogicalDeviceNumber(
|
||||
IN USHORT LogDev)
|
||||
{
|
||||
WriteByte(ISAPNP_LOGICALDEVICENUMBER, LogDev);
|
||||
}
|
||||
|
@ -137,7 +152,8 @@ WriteLogicalDeviceNumber(USHORT LogDev)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
ActivateDevice(USHORT LogDev)
|
||||
ActivateDevice(
|
||||
IN USHORT LogDev)
|
||||
{
|
||||
WriteLogicalDeviceNumber(LogDev);
|
||||
WriteByte(ISAPNP_ACTIVATE, 1);
|
||||
|
@ -146,7 +162,8 @@ ActivateDevice(USHORT LogDev)
|
|||
static
|
||||
inline
|
||||
VOID
|
||||
DeactivateDevice(USHORT LogDev)
|
||||
DeactivateDevice(
|
||||
IN USHORT LogDev)
|
||||
{
|
||||
WriteLogicalDeviceNumber(LogDev);
|
||||
WriteByte(ISAPNP_ACTIVATE, 0);
|
||||
|
@ -155,7 +172,9 @@ DeactivateDevice(USHORT LogDev)
|
|||
static
|
||||
inline
|
||||
USHORT
|
||||
ReadIoBase(PUCHAR ReadDataPort, USHORT Index)
|
||||
ReadIoBase(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT Index)
|
||||
{
|
||||
return ReadWord(ReadDataPort, ISAPNP_IOBASE(Index));
|
||||
}
|
||||
|
@ -163,7 +182,9 @@ ReadIoBase(PUCHAR ReadDataPort, USHORT Index)
|
|||
static
|
||||
inline
|
||||
USHORT
|
||||
ReadIrqNo(PUCHAR ReadDataPort, USHORT Index)
|
||||
ReadIrqNo(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT Index)
|
||||
{
|
||||
return ReadByte(ReadDataPort, ISAPNP_IRQNO(Index));
|
||||
}
|
||||
|
@ -179,7 +200,9 @@ HwDelay(VOID)
|
|||
static
|
||||
inline
|
||||
UCHAR
|
||||
NextLFSR(UCHAR Lfsr, UCHAR InputBit)
|
||||
NextLFSR(
|
||||
IN UCHAR Lfsr,
|
||||
IN UCHAR InputBit)
|
||||
{
|
||||
UCHAR NextLfsr = Lfsr >> 1;
|
||||
|
||||
|
@ -208,7 +231,8 @@ SendKey(VOID)
|
|||
|
||||
static
|
||||
USHORT
|
||||
PeekByte(PUCHAR ReadDataPort)
|
||||
PeekByte(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
USHORT i;
|
||||
|
||||
|
@ -225,21 +249,25 @@ PeekByte(PUCHAR ReadDataPort)
|
|||
|
||||
static
|
||||
VOID
|
||||
Peek(PUCHAR ReadDataPort, PVOID Buffer, ULONG Length)
|
||||
Peek(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN OUT PVOID Buffer,
|
||||
IN ULONG Length)
|
||||
{
|
||||
USHORT i, byte;
|
||||
USHORT i, Byte;
|
||||
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
byte = PeekByte(ReadDataPort);
|
||||
Byte = PeekByte(ReadDataPort);
|
||||
if (Buffer)
|
||||
*((PUCHAR)Buffer + i) = byte;
|
||||
*((PUCHAR)Buffer + i) = Byte;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
USHORT
|
||||
IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier)
|
||||
IsaPnpChecksum(
|
||||
IN PISAPNP_IDENTIFIER Identifier)
|
||||
{
|
||||
UCHAR i, j, Lfsr, Byte;
|
||||
|
||||
|
@ -259,7 +287,11 @@ IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier)
|
|||
|
||||
static
|
||||
BOOLEAN
|
||||
FindTag(PUCHAR ReadDataPort, USHORT WantedTag, PVOID Buffer, ULONG Length)
|
||||
FindTag(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT WantedTag,
|
||||
IN OUT PVOID Buffer,
|
||||
IN ULONG Length)
|
||||
{
|
||||
USHORT Tag, TagLen;
|
||||
|
||||
|
@ -297,7 +329,10 @@ FindTag(PUCHAR ReadDataPort, USHORT WantedTag, PVOID Buffer, ULONG Length)
|
|||
|
||||
static
|
||||
BOOLEAN
|
||||
FindLogDevId(PUCHAR ReadDataPort, USHORT LogDev, PISAPNP_LOGDEVID LogDeviceId)
|
||||
FindLogDevId(
|
||||
IN PUCHAR ReadDataPort,
|
||||
IN USHORT LogDev,
|
||||
IN OUT PISAPNP_LOGDEVID LogDeviceId)
|
||||
{
|
||||
USHORT i;
|
||||
|
||||
|
@ -312,7 +347,8 @@ FindLogDevId(PUCHAR ReadDataPort, USHORT LogDev, PISAPNP_LOGDEVID LogDeviceId)
|
|||
|
||||
static
|
||||
INT
|
||||
TryIsolate(PUCHAR ReadDataPort)
|
||||
TryIsolate(
|
||||
IN PUCHAR ReadDataPort)
|
||||
{
|
||||
ISAPNP_IDENTIFIER Identifier;
|
||||
USHORT i, j;
|
||||
|
@ -438,8 +474,9 @@ Isolate(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
DeviceActivation(PISAPNP_LOGICAL_DEVICE IsaDevice,
|
||||
BOOLEAN Activate)
|
||||
DeviceActivation(
|
||||
IN PISAPNP_LOGICAL_DEVICE IsaDevice,
|
||||
IN BOOLEAN Activate)
|
||||
{
|
||||
WaitForKey();
|
||||
SendKey();
|
||||
|
@ -456,7 +493,8 @@ DeviceActivation(PISAPNP_LOGICAL_DEVICE IsaDevice,
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ProbeIsaPnpBus(PISAPNP_FDO_EXTENSION FdoExt)
|
||||
ProbeIsaPnpBus(
|
||||
IN PISAPNP_FDO_EXTENSION FdoExt)
|
||||
{
|
||||
PISAPNP_LOGICAL_DEVICE LogDevice;
|
||||
ISAPNP_IDENTIFIER Identifier;
|
||||
|
|
|
@ -20,7 +20,6 @@ ForwardIrpCompletion(
|
|||
IN PIRP Irp,
|
||||
IN PVOID Context)
|
||||
{
|
||||
|
||||
UNREFERENCED_PARAMETER(DeviceObject);
|
||||
|
||||
if (Irp->PendingReturned)
|
||||
|
|
Loading…
Reference in a new issue