DC_USBHID_DEVICE_GET_VID(3)
β¨ DC_USBHID_DEVICE_GET_VID(3) β¨
okay so bestie, welcome to the DC_USBHID_DEVICE_GET_VID(3) page from the Library Functions Manual π
you're literally about to learn how to grab a USB HID device's vendor id and it's gonna be so easy, i promise π«Ά
πΈ NAME πΈ
dc_usbhid_device_get_vid β get the vendor id (VID) of the USB HID device. that's it, that's the whole job, and she does it iconically π
π LIBRARY π
library βlibdivecomputerβ β yes that one, the one you already know and love β¨
π SYNOPSIS π
#include <libdivecomputer/usbhid.h>
unsigned int
dc_usbhid_device_get_vid(dc_usbhid_device_t *device);
look at her. two lines. flawless. no notes π
π« DESCRIPTION π«
so what does it actually do? it gets the vendor id (VID) of the USB HID device π¦ and the reason is literally just for displaying β it's a "show me who made this thing" kinda situation, nothing deeper than that, no cap.
heads up bestie: this one requires a valid usbhid device of typedc_usbhid_device_tβ like, a real one. and where do you get one of those? fromdc_usbhid_iterator_new(3), duh π go get your device from there first or this whole thing is not gonna vibe check.
π₯ RETURN VALUES π₯
returns the vendor id (VID) of the given usbhid device. an unsigned int, served fresh, periodt β
π SEE ALSO π
(yes, the first one is this very page β she's self-referential, she's main character energy, we love her π)
π AUTHORS π
the library βlibdivecomputerβ library was written by Jef Driesen, jef@libdivecomputer.org π
this manpage is written by Vincent Hagen, vinnie@script4web.nl β¨
and that's the whole page bestie, you ate that ππ this lil drop of wisdom is from the Debian build, dated June 5, 2020, and it's DC_USBHID_DEVICE_GET_VID(3) signing off β mwah, go read your vendor ids responsibly π§ββοΈπ
π¦ 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