2.3.2.3  I/O Port Functions

The NDIS library provides a set of I/O functions that a miniport NIC driver calls to access I/O ports. These calls provide a standard portable interface that supports the various operating environments for NDIS drivers. Functions are provided for mapping ports, for claiming I/O resources and for reading from and writing to the mapped and unmapped I/O ports.

Function Definition
NdisMRegisterIoPortRange Sets up access to I/O ports for using NdisRawReadPortXxx and NdisRawWritePortXxx.
NdisMDeregisterIoPortRange Removes access to I/O ports previously registered with NdisMRegisterIoPortRange.
NdisMMapIoSpace Maps a range of device memory for subsequent PIO operations.
NdisMUnmapIoSpace Releases a region mapped by a call to NdisMMapIoSpace.
NdisImmediateReadSharedMemory Reads a single buffer of data from a shared memory address before the driver has called NdisMMapIoSpace.
NdisImmediateWriteSharedMemory Writes a single buffer of data to a shared memory address before the driver has called NdisMMapIoSpace.
NdisRawReadPortXxx Read a single piece of data from an I/O port. Specific functions include:

  NdisRawReadPortUchar
NdisRawReadPortUlong
NdisRawReadPortUshort

NdisRawReadPortBufferXxx Read a buffer of data a piece at a time from an I/O port. Specific functions include:

  NdisRawReadPortBufferUchar
NdisRawReadPortBufferUlong
NdisRawReadPortBufferUshort

NdisRawWritePortXxx Writes a single piece of data to an I/O port. Specific functions include:

  NdisRawWritePortUchar
NdisRawWritePortUlong
NdisRawWritePortUshort

NdisRawWritePortBufferXxx Writes a buffer of data to I/O port. Specific functions include:

  NdisRawWritePortBufferUchar
NdisRawWritePortBufferUlong
NdisRawWritePortBufferUshort

NdisImmediateReadPortXxx Reads a piece of data from an I/O port before the driver has mapped the port by calling NdisMRegisterIoPortRange. Specific functions include:

  NdisImmediateReadPortUchar
NdisImmediateReadPortUshort
NdisImmediateReadPortUlong

NdisImmediateWritePortXxx Writes a piece of data from an I/O port before the driver has mapped the port by calling NdisMRegisterIoPortRange. Specific functions include:

  NdisImmediateWritePortUchar
NdisImmediateWritePortUshort
NdisImmediateWritePortUlong