DC_SERIAL_OPEN(3)
πΈ NAME πΈ
okay bestie, welcome to dc_serial_open(3) β header tag DC_SERIAL_OPEN(3), from the Library Functions Manual β and this one opens an iostream for a serial device. π
π«Ά LIBRARY π«Ά
The library is libdivecomputer β iconic, no cap. π
β¨ SYNOPSIS β¨
#include <libdivecomputer/serial.h>
dc_status_t
dc_serial_open(dc_iostream_t **iostream, dc_context_t *context,
const char *name);
π¦ DESCRIPTION π¦
Okay so this function opens an iostream for a serial device. It takes a context that was opened with dc_context_new(3), plus a name β the device name β usually found through dc_serial_iterator_new(3) together with dc_serial_device_get_name(3). π
β οΈ bestie, listen: when this returnsDC_STATUS_SUCCESS, that iostream pointer must be freed withdc_iostream_close(3). Not βmaybeβ, not βlaterβ β must. π
π« RETURN VALUES π«
It returns DC_STATUS_SUCCESS on success, or one of several error values on error. On success, the iostream pointer gets 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_serial_device_get_name(3)
π AUTHORS π
The libdivecomputer library was written by Jef Driesen, jef@libdivecomputer.org. π«Ά
This manpage is written by Vincent Hagen, vinnie@script4web.nl. π
π thatβs the page, bestie β footer vibes: Debian, June 5, 2020, tag DC_SERIAL_OPEN(3). periodt. π
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2020 Vincent Hagen <vinnie@script4web.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms