29 UCHAR NextLfsr = Lfsr >> 1;
31 NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7;
64 if (++
Card->LfsrCount == 32)
110 for (
j = 0;
j <
Card->LogicalDevices; ++
j)
119 Card->SelectNumberReg = 0;
155 Card->SerialIsolationIdx = 0;
163 Card->IsolationRead = 0;
180 ULONG CsnAssigned = 0;
190 ok(
Value != 0,
"The new CSN is zero\n");
191 ok(
Card->SelectNumberReg !=
Value,
"CSNs must be assigned sequentially");
212 ok(Value < IsapConfigureCard->LogicalDevices,
"Invalid write to a LDN register\n");
222 goto WriteDeviceRegister;
228 goto WriteDeviceRegister;
269 ULONG i, ResponseMap = 0, ListenMap = 0;
283 Card->IsolationRead ^= 1;
285 if (
Card->IsolationRead)
287 if (
Card->PnpRom[
Card->SerialIsolationIdx / 8] & (1 << (
Card->SerialIsolationIdx % 8)))
288 Card->SerialIdResponse = 0x55;
290 Card->SerialIdResponse = 0x00;
293 ++
Card->SerialIsolationIdx;
297 Card->SerialIdResponse <<= 1;
299 if (
Card->SerialIdResponse == 0xAA)
300 ResponseMap |= (1 <<
i);
302 ListenMap |= (1 <<
i);
310 if (ResponseMap != 0 && ListenMap != 0)
314 if (ListenMap & (1 <<
i))
365 goto ReadDeviceRegister;
432 Card->SelectNumberReg = 0;
445 Card->RomSize = RomSize;
446 Card->PnpRom = PnpRom;
449 Card->LogicalDevices = LogicalDevices;
#define ok_eq_ulong(value, expected)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define ISAPNP_IORANGECHECK
#define ISAPNP_CONFIG_RESET
#define ISAPNP_LOGICALDEVICENUMBER
#define ISAPNP_SERIALISOLATION
#define ISAPNP_RESOURCEDATA
#define ISAPNP_CARDSELECTNUMBER
#define ISAPNP_CONFIG_WAIT_FOR_KEY
#define ISAPNP_CONFIGCONTROL
#define ISAPNP_CONFIG_RESET_CSN
static UCHAR IsaBusNextLFSR(_In_ UCHAR Lfsr, _In_ UCHAR InputBit)
static VOID IsaBusPlugInCard(_Inout_ PISAPNP_CARD Card)
static UCHAR IsaBusPnpChecksum(_In_ PISAPNP_IDENTIFIER Identifier)
static UCHAR IsaBusReadDataPortRegister(_In_ PUCHAR Port)
VOID IsaBusCreateCard(_Inout_ PISAPNP_CARD Card, _In_ PVOID PnpRom, _In_ ULONG RomSize, _In_ ULONG LogicalDevices)
static PISAPNP_CARD IsapConfigureCard
static VOID IsaBusWriteDataRegister(_In_ UCHAR Value)
static UCHAR IsaBusResourceDataChecksum(_In_ PUCHAR PnpRom, _In_ ULONG RomSize)
static ULONG IsapCardCount
static UCHAR IsaBusReadSerialIsolationRegister(_In_ PUCHAR Port)
static VOID IsaBusWriteAddressRegister(_In_ UCHAR Value)
static UCHAR IsapAddressLatch
#define RTL_BITS_OF(sizeOfArg)
#define UNREFERENCED_PARAMETER(P)
#define READ_PORT_UCHAR(p)
#define WRITE_PORT_UCHAR(p, d)
ISAPNP_CARD_LOGICAL_DEVICE LogDev[TEST_MAX_SUPPORTED_DEVICES]
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO