DC_USBHID_OPEN(3) | FreeBSD Library Functions Manual | DC_USBHID_OPEN(3) |
dc_usbhid_open
—
Opens an iostream for a USB HID device
library “libdivecomputer”
#include
<libdivecomputer/usbhid.h>
dc_status_t
dc_usbhid_open
(dc_iostream_t
**iostream, dc_context_t *context,
dc_usbhid_device_t *device);
Opens an iostream for a USB HID device. Accepts a context opened with dc_context_new(3) and a device usually found by searching through dc_usbhid_iterator_new(3).
Upon returning DC_STATUS_SUCCESS
, the
iostream pointer must be freed with
dc_iostream_close(3).
Returns DC_STATUS_SUCCESS
on success or
one of several error values on error. On success, the
iostream pointer is filled in with an open handle.
dc_context_new(3), dc_usbhid_iterator_new(3), dc_iostream_close(3), dc_serial_open(3), dc_irda_open(3), dc_bluetooth_open(3).
The library
“libdivecomputer” library was written by
Jef Driesen,
jef@libdivecomputer.org.
This manpage is written by
Vincent Hagen,
vinnie@script4web.nl.
June 5, 2020 | FreeBSD 14.3-RELEASE |