DC_IRDA_OPEN(3)
okay so bestie, welcome to dc_irda_open(3) from the libdivecomputer Library Functions Manual β this is the page that explains how to open an iostream for an IrDA device, and weβre gonna get into it. π¦β¨
π NAME π
dc_irda_open β opens an iostream for an IrDA device. no cap, thatβs the whole name section. π
π LIBRARY π
the library is libdivecomputer, periodt. β¨
πΈ SYNOPSIS πΈ
#include <libdivecomputer/irda.h>
dc_status_t
dc_irda_open(dc_iostream_t **iostream, dc_context_t *context,
unsigned int address, unsigned int lsap);
π§ DESCRIPTION π§
okay so hereβs the vibe: dc_irda_open() opens an iostream for an IrDA (Infra Red) device. π«Ά it accepts a context opened with dc_context_new(3), an address given through dc_irda_iterator_new(3) together with dc_irda_device_get_address(3), and the last argument, lsap, is a port number used during the communication. π¬
currently only Uwatec computers use IrDA communication, and for those the lsap can be hardcoded to 1. π¬
okay so important: upon returningDC_STATUS_SUCCESS, theiostreampointer must be freed withdc_iostream_close(3). do not ghost that pointer, bestie. ππ
π₯ RETURN VALUES π₯
it 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. slay. π
π SEE ALSO π
dc_context_new(3)dc_iostream_close(3)dc_serial_open(3)dc_usbhid_open(3)dc_bluetooth_open(3)dc_irda_iterator_new(3)dc_irda_device_get_address(3)
π AUTHORS π
the library libdivecomputer was written by Jef Driesen, jef@libdivecomputer.org. π«Ά
this manpage is written by Vincent Hagen, vinnie@script4web.nl. β¨
bye bestie! this page is from Debian, dated June 5, 2020 β DC_IRDA_OPEN(3) signing off! ππβ¨
π¦ 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