Writing some C code for USB mouse.
More specifically writing configuration and information to mouse like poll, sensitivity, button actions, colors (light), tactile alters, OLED etc.
Started out with this old article where libhid
is recommended over libusb
.
Looking at libhid it seems to since have died. Last commit on that project is from 2012, - and it is C++. But I found some links saying one should go over to hidapi
.
However, hidapi also seems to be fairly dead. Last commit from 2016. Or perhaps it is simply stable?
It could look like one is better off using libusb
after all. Starting out with a 15 year old article - it is not that much of a stretch.
Question is if I am missing something? Is libusb
the way to go?
Have done some quick tests with libusb-1.0.0-dev
#include <libusb-1.0/libusb.h>
and it works nice - at least for the quick tests I have done. But a HID library would perhaps be better?
From native package options I have at least:
libhidapi-dev
libhidapi-libusb0
libhidrd0-dbg
libhidapi-hidraw0
libhidrd0
libhidrd0-dev
And
libusb-0.1-4 libusbmuxd4
libusb-1.0-0 libusbmuxd-dev
libusb-1.0-0-dev libusbmuxd-tools
libusb-1.0-doc libusb-ocaml
libusbauth-configparser1 libusb-ocaml-dev
libusbauth-configparser-dev libusbprog0v5
libusb-dev libusbprog-dev
libusbguard0 libusbredirhost1
libusbhid-common libusbredirhost-dev
libusb-java libusbredirparser1
libusb-java-dbg libusbredirparser-dev
libusb-java-doc libusbtc08-1
libusb-java-lib libusbtc08-dev