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