mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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
|
static
|
||||||
inline
|
inline
|
||||||
USHORT
|
UCHAR
|
||||||
NextLFSR(USHORT Lfsr, USHORT InputBit)
|
NextLFSR(UCHAR Lfsr, UCHAR InputBit)
|
||||||
{
|
{
|
||||||
ULONG NextLfsr = Lfsr >> 1;
|
UCHAR NextLfsr = Lfsr >> 1;
|
||||||
|
|
||||||
NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7;
|
NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7;
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ static
|
||||||
VOID
|
VOID
|
||||||
SendKey(VOID)
|
SendKey(VOID)
|
||||||
{
|
{
|
||||||
USHORT i, Lfsr;
|
UCHAR i, Lfsr;
|
||||||
|
|
||||||
HwDelay();
|
HwDelay();
|
||||||
WriteAddress(0x00);
|
WriteAddress(0x00);
|
||||||
|
@ -241,7 +241,7 @@ static
|
||||||
USHORT
|
USHORT
|
||||||
IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier)
|
IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier)
|
||||||
{
|
{
|
||||||
USHORT i,j, Lfsr, Byte;
|
UCHAR i, j, Lfsr, Byte;
|
||||||
|
|
||||||
Lfsr = ISAPNP_LFSR_SEED;
|
Lfsr = ISAPNP_LFSR_SEED;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
|
|
Loading…
Reference in a new issue