InBuff8, InBuff16, and InBuff32

Takes a bus identifier, an I/O address in that bus's I/O address space, a destination buffer in the CPU's logical address space, and a count of transfer data units to perform whatever operations are necessary to acquire and return the requested number of data units into the destination buffer.

Thread Context:Non-Blocking

Syntax

    LONG InBuff8 (
       BYTE  *buffer,
       LONG   busTag,
       void  *ioAddress,
       LONG   count
    );
    
    
    LONG InBuff16 (
       BYTE  *buffer,
       LONG   busTag,
       void  *ioAddress,
       LONG   count);
    
    
    LONG InBuff32 (
       BYTE  *buffer,
       LONG   busTag,
       void  *ioAddress,
       LONG   count
    );
    
    

Parameters

buffer
(IN) The logical memory address of the destination buffer. This address is in the CPU's logical address space.
busTag
A value returned by NPAB_Search_Adapter or by parsing the Product ID option of the NPAOptionStruct. This value specifies the bus on which the operation is to be performed.
ioAddress
The I/O address in the bus architecture of the adapter where the input is to occur.
count
The number of transfer units in the specified data size.

Return Values

The following table lists return values and descriptions.

0

The requested operation was completed successfully.

1

Memory protection prevented the completion of the requested operation.

3

Memory error occurred while attempting to perform the requested operation.

4

One of the parameters was invalid.

5

The requested operation could not be completed.

Remarks

These functions are used only by HAMs written for adapters intended for bus architectures that have an I/O address space. The HAM is expected to use the function appropriate to the data width of the port where the input is to occur. A buffer is filled with data from the specified I/O address with the number of data units specified (count). The buffer address will fill forward.

The value of ioAddress should be the port address the HAM would normally expect for the given bus architecture. For example, if an ISA board with a base port address of 300h is placed on an EISA bus, the HAM sets ioAddress to 300h when it wants to input from that base port.