sub_open

Top  Previous  Next
Got to SUB-20 page

Synopsis

sub_handle sub_open( sub_device dev )

 

Open SUB-20 device. If parameter dev is NULL function will try to open first available SUB-20 device. In this case it will call internally sub_find_devices(0). Otherwise function will try to open SUB-20 device referenced by dev. If your application intended to work with single SUB-20 device you can always call sub_open with dev=NULL.

Return value

On success function returns non zero handler that should be used in all subsequent calls to SUB-20 API functions. In case of error function returns NULL and set sub_errno

Example

   handle = sub_open( 0 );

  if( !handle )

   {

       printf("sub_open: %s\n", sub_strerror(sub_errno));

      return -1;

   }