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

NAME
     dc_serial_open -- Opens an iostream for a serial device

LIBRARY
     libdivecomputer

SYNOPSIS
     #include <libdivecomputer/serial.h>

     dc_status_t
     dc_serial_open(dc_iostream_t **iostream, dc_context_t *context,
	 const char *name);

DESCRIPTION
     Opens  an	iostream  for  a  serial  device.  Accepts a context opened with
     dc_context_new(3) and a name device name,	usually  found	through  dc_ser-
     ial_iterator_new(3) with dc_serial_device_get_name(3).

     Upon  returning  DC_STATUS_SUCCESS, the iostream pointer must be freed with
     dc_iostream_close(3).

RETURN VALUES
     Returns DC_STATUS_SUCCESS on success or one of several error values on  er-
     ror.  On success, the iostream pointer is filled in with an open handle.

SEE ALSO
     dc_context_new(3), 	dc_iostream_close(3),	      dc_usbhid_open(3),
     dc_irda_open(3), dc_bluetooth_open(3),  dc_serial_iterator_new(3),  dc_ser-
     ial_device_get_name(3).

AUTHORS
     The  libdivecomputer  library  was  written by Jef Driesen, jef@libdivecom-
     puter.org.
     This manpage is written by
     Vincent Hagen, vinnie@script4web.nl.

FreeBSD ports 15.quarterly	  June 5, 2020		       DC_SERIAL_OPEN(3)

home | help