This is the codebase for my implementation of a Human Interface Device (HID) host program in C. It was created using Plover stenography and UltiSnips snippets, for the following media:
git clone https://github.com/paulfioravanti/hid_host_example.git
cd hid_host_example
The HIDAPI library is required to open up HID communication channels, so install it with your operating system's package manager. HIDAPI provides some minimal information about this in their Installing HIDAPI section, but if you are using macOS, you can install it with Homebrew:
brew install hidapi
Feel free to compile the host as you see fit, but I use pkg-config (repo) to provide an easier interface to include libraries. You can install it via your operating system package manager, or use Homebrew if you use macOS:
brew install pkg-config
If you use pkg-config
, you can use the included build file:
./build.sh
Otherwise, feel free to use it as a guide to make your own.
./host
For a more robust example of a HID host that I use often, see my HID Hosts repo.