DRV_DeviceOpen

INT32S DRV_DeviceOpen (
   char * DeviceFile,
   PRT_T * DeviceHandle );

Purpose

Opens the corresponding installed device by its device file(DeviceFile) and gets the DeviceHandle for later operations. This function must be called before any other methods that perform I/O operations.

Parameters

Name Direction Rage Description
DeviceFile input default It is the device file associated with special device by advdevice_bind utility.
DeviceHandle output default The pointer retrieved from the DRV_DeviceOpen which specifies the target device.

Return

   1. 0 Successful.
   2. other value error occured, please refer to ErrorCode

Notes

1. After the operation of any function, such as DIO, AO and AI, that relates to the device allocated resources, the user must call the DRV_DeviceClose to release the device (allocated by using DRV_DeviceOpen) resources.