mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ISAPNP] Correctly calculate checksum
See appendix B.2 of "Plug and Play ISA Specification 1.0a"
This commit is contained in:
parent
645c77335c
commit
40b2f65f0c
1 changed files with 5 additions and 5 deletions
|
@ -178,10 +178,10 @@ HwDelay(VOID)
|
|||
|
||||
static
|
||||
inline
|
||||
USHORT
|
||||
NextLFSR(USHORT Lfsr, USHORT InputBit)
|
||||
UCHAR
|
||||
NextLFSR(UCHAR Lfsr, UCHAR InputBit)
|
||||
{
|
||||
ULONG NextLfsr = Lfsr >> 1;
|
||||
UCHAR NextLfsr = Lfsr >> 1;
|
||||
|
||||
NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7;
|
||||
|
||||
|
@ -192,7 +192,7 @@ static
|
|||
VOID
|
||||
SendKey(VOID)
|
||||
{
|
||||
USHORT i, Lfsr;
|
||||
UCHAR i, Lfsr;
|
||||
|
||||
HwDelay();
|
||||
WriteAddress(0x00);
|
||||
|
@ -241,7 +241,7 @@ static
|
|||
USHORT
|
||||
IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier)
|
||||
{
|
||||
USHORT i,j, Lfsr, Byte;
|
||||
UCHAR i, j, Lfsr, Byte;
|
||||
|
||||
Lfsr = ISAPNP_LFSR_SEED;
|
||||
for (i = 0; i < 8; i++)
|
||||
|
|
Loading…
Reference in a new issue