1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2025-12-30 10:03:03 +00:00

Switch to hidapi

This commit is contained in:
2017-01-21 22:45:48 +01:00
parent cdaae30aa2
commit bcdcee88f1
6 changed files with 273 additions and 148 deletions

View File

@@ -6,21 +6,29 @@
* make
## Dependencies :</br>
* libusb
* systemd
* hidapi or libusb
## hidapi vs libusb :</br>
hidapi is the new implementation but need to be tested.</br>
hidapi is very more speed than libusb (~20ms vs ~150ms).</br>
hidapi seem not work on CentOS, writing on hidraw is not allowed.</br>
hidapi is recommended but if you encounter problem on your system, switch to libusb.</br>
## Installation of dependencies :</br>
ArchLinux :</br>
`sudo pacman -S git gcc make libusb`</br>
`sudo pacman -S git gcc make hidapi` (for hidapi)</br>
`sudo pacman -S git gcc make libusb` (for libusb)</br>
Debian :</br>
`sudo apt-get install git g++ make libusb-1.0-0-dev`</br>
`sudo apt-get install git g++ make libhidapi-dev` (for hidapi)</br>
`sudo apt-get install git g++ make libusb-1.0-0-dev` (for libusb)</br>
Fedora :</br>
`sudo dnf install git make gcc-c++ libusb-devel`</br>
`sudo dnf install git make gcc-c++ hidapi-devel` (for hidapi)</br>
`sudo dnf install git make gcc-c++ libusbx-devel` (for libusb)</br>
## Installation :</br>
`git clone https://github.com/MatMoul/g810-led.git`</br>
`cd g810-led`</br>
`make`</br>
`make` or `make LIB=libusb`</br>
`sudo make install`</br>
## Update :</br>
@@ -30,8 +38,8 @@ Same as install, but your profile and reboot files are preserved.</br>
`sudo make uninstall`</br>
## Boot profiles :</br>
g810-led has 2 systemd units (g810-led and g810-led-reboot).</br>
If your system use systemd, g810-led has 2 systemd units (g810-led and g810-led-reboot).</br>
These 2 units set the keyboard profile on boot and reboot.</br>
Profiles are stored in /etc/g810 :</br>
* /etc/g810/profile
* /etc/g810/reboot
Profiles are stored in /etc/g810-led :</br>
* /etc/g810-led/profile
* /etc/g810-led/reboot