DRV_WritePortByte

INT32S  DRV_WritePortByte (
   PTR_T DeviceHandle, 
   PT_WritePortByte *lpWritePortByte );

Purpose

On the device indicated by the DeviceHandle, it writes a byte to a specified I/O port. The port specifies the absolute I/O address, which is valid only within the range of space allocated by the system.

Parameters

Some parameters, such as specified I/O port address (port) and read back status (ByteData), are stored in the PT_WritePortByte structure pointed by the lpWritePortByte.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from the DRV_DeviceOpen which specifies the target device.
lpWritePortByte input / output default Pointer to the user-prepared structure PT_WritePortByte that stores the specified I/O port address (INT16U port) and read back status (INT16U ByteData).

Return

   1. 0 Successful.
   2. InvalidDeviceHandle The DeviceHandle is NULL.
   3. Other value Please reference ErrorCodes