DC_USBHID_DEVICE_GET_VID(3)

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

✨ 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 type dc_usbhid_device_t β€” like, a real one. and where do you get one of those? from dc_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