PI8042_SYNCH_READ_PORT callback function

The PI8042_SYNCH_READ_PORT-typed callback routine does a synchronized read from an i8042 port. I8042prt supplies this callback.

Syntax


PI8042_SYNCH_READ_PORT SynchReadPort;

NTSTATUS SynchReadPort(
  _In_  PVOID   Context,
  _Out_ PUCHAR  Value,
  _In_  BOOLEAN WaitForACK
)
{ ... }

Parameters

Context [in]

Pointer to a context supplied by I8042prt.

Value [out]

Pointer to the UCHAR value returned by the routine.

WaitForACK [in]

Not used.

Return value

The PI8042_SYNCH_READ_PORT callback returns one of the following status values:

Return codeDescription
STATUS_SUCCESS

The routine successfully returned a byte.

STATUS_IO_TIMEOUT

The hardware was not ready for a read access.

 

Remarks

The PI8042_SYNCH_READ_PORT callback can only be used in a PI8042_KEYBOARD_INITIALIZATION_ROUTINE callback. I8042prt specifies the read port callback in the ReadPort parameter that I8042prt inputs to a keyboard initialization routine.

The routine polls the hardware until a read is returned by the hardware or an internal time-out occurs.

Requirements

Target platform

Header

Ntdd8042.h (include Ntdd8042.h)

IRQL

PASSIVE_LEVEL

See also

PI8042_KEYBOARD_INITIALIZATION_ROUTINE
PI8042_SYNCH_WRITE_PORT

 

 

Send comments about this topic to Microsoft

Show: