Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DC_DEVICE_OPEN(3)	    Library Functions Manual	     DC_DEVICE_OPEN(3)

NAME
       dc_device_open -- open a	dive computer device

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #include	<libdivecomputer/device.h>

       dc_status_t
       dc_device_open(dc_device_t **device,		dc_context_t *context,
	   dc_descriptor_t *descriptor,	dc_iostream_t *iostream);

DESCRIPTION
       Open a dive computer device for processing.  Accepts a  context	opened
       with  dc_context_new(3),	 a  dive  computer descriptor usually found by
       searching through dc_descriptor_iterator(3), and	a iostream opened with
       a   transport   specific	  open	 function   like    dc_usbhid_open(3),
       dc_irda_open(3),	dc_serial_open(3), or dc_bluetooth_open(3)
       ).

       Upon returning DC_STATUS_SUCCESS, the device pointer must be freed with
       dc_device_close(3).

RETURN VALUES
       Returns	DC_STATUS_SUCCESS on success or	one of several error values on
       error.  On success, the device pointer is filled	in with	an  open  han-
       dle.

SEE ALSO
       dc_context_new(3), dc_descriptor_iterator(3), dc_device_close(3)

AUTHORS
       The  library  "libdivecomputer"	library	 was  written  by Jef Driesen,
       jef@libdivecomputer.org.
       The manpages were written by
       Kristaps	Dzonsons, kristaps@bsd.lv.  and
       Vincent Hagen, vinnie@script4web.nl

FreeBSD	Ports 14.quarterly	 June 5, 2020		     DC_DEVICE_OPEN(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dc_device_open&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help