![Tews Technologies TDRV006-SW-82 User Manual Download Page 8](http://html1.mh-extra.com/html/tews-technologies/tdrv006-sw-82/tdrv006-sw-82_user-manual_1093641008.webp)
TDRV006-SW-82 - Linux Device Driver
Page 8 of 31
3 API Documentation
General Functions
3.1
3.1.1 tdrv006Open
NAME
tdrv006Open – open a device.
SYNOPSIS
TDRV006_HANDLE tdrv006Open
(
char
*DeviceName
)
DESCRIPTION
Before I/O can be performed to a device, a device descriptor must be opened by a call to this function.
PARAMETERS
DeviceName
This parameter points to a null-terminated string that specifies the name of the device. The first
TDRV006 device is named /dev/tdrv006_0, the second /dev/tdrv006_1, and so on.
EXAMPLE
#include <tdrv006api.h>
TDRV006_HANDLE
hdl;
/*
** open the specified device
*/
hdl = tdrv006Open(“/dev/tdrv006_0”);
if (hdl == NULL)
{
/* handle open error */
}