Deditec USB-TTL-32 데이터 시트
DELIB API reference | Seite
31
4. DELIB API reference
4.1. Management functions
4.1.1. DapiOpenModule
Description
This function opens a particular module.
This function opens a particular module.
Definition
ULONG DapiOpenModule(ULONG moduleID, ULONG nr);
Parameters
moduleID=Specifies the module, which is to be opened (see delib.h)
nr=Indicates No of module which is to be opened.
nr=0 -> 1. module
nr=1 -> 2. module
moduleID=Specifies the module, which is to be opened (see delib.h)
nr=Indicates No of module which is to be opened.
nr=0 -> 1. module
nr=1 -> 2. module
Return value
handle=handle to the corresponding module
handle=0 -> Module was not found
handle=handle to the corresponding module
handle=0 -> Module was not found
Remarks
The handle returned by this function is needed to identify the module for all other
functions.
The handle returned by this function is needed to identify the module for all other
functions.
Example program
// USB-Modul öffnen
handle = DapiOpenModule(RO_USB1, 0);
printf("handle = %x\n", handle);
if (handle==0)
{
// USB Modul wurde nicht gefunden
printf("Modul konnte nicht geöffnet werden\n");
return;
}