Programming
BUF-PCI(PC), BUF-PCI(98)
54
BufPciInPortB
Function
Inputs data from a specified port. The data to be input is byte data.
Format
(C)
HANDLE
hDevice
;
WORD
wIoAddress
;
BYTE
bInData
;
DWORD
dwRet
;
dwRet
= BufPciInPortB(
hDevice, bIoWait, wIoAddress, &bInData
);
(Visual Basic)
Dim
hDevice
As Long
Dim
wIoAddress
As Integer
Dim
bInData
As Byte
Dim
dwRet
As Long
dwRet
= BufPciInPortB(
hDevice, bIoWait, wIoAddress, bInData
)
Argument
hDevice
:
Specify the device handle.
Acquire this device handle with BufPciOpen.
wIoAddress
:
Specify the I/O port address to input data to.
bInData
:
Specify the area to store input data by passing its
pointer.
Return value
dwRet
:
Termination information
Normal termination :
0
Error
:
other than 0
(For more information, see the section, "List of
Return Values.")
Supplement
After implementing the termination process, each function of the
BUF-PCI driver software cannot be run until reinitialized.
Description of accessing I/O ports on the BUS-PCI(PCI) board
Use the BufPciIoAddress secured during execution of BufPciOpen.
Actual operations are as follows:
outp( BufPciIoA 0xfd, ( wIoAddress >> 8 ) & 0xff );
bInData = inp( BufPciIoA ( wIoAddress & 0xff ) );
For more information, see the section on I/O port addresses.