DC_SERIAL_OPEN(3)

πŸ“¦ version 0.9.0, in nixos 26.05, nixpkgs unstable

🌸 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 returns DC_STATUS_SUCCESS, that iostream pointer must be freed with dc_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 🌈


πŸ‘‘ 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