Commit Graph

14 Commits

Author SHA1 Message Date
Ilya Guterman
6414f7901f hidpp20: Implement feature 0x8070: LED effects 2017-02-13 10:24:26 +10:00
Peter Hutterer
01876023bb hidpp10: fix fetching of serial number
Was off by one, the message content only includes one byte of extra information
before the serial number. And add a BE 32-bit helper while we're at it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-14 10:17:49 +10:00
Benjamin Tissoires
9cc323d80f hidpp: extract hidpp20_crc_ccitt into hidpp_generic
Looks like the hid++ 1.0 devices are also using the same crc computation,
so put it in the generic part.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2015-11-26 17:43:34 +01:00
Benjamin Tissoires
f9db1f4bb6 hidpp-generic: implement various BE/LE functions
Not used here, but better having them written once.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-11-06 18:48:50 +01:00
Benjamin Tissoires
c478b7a7d2 hidpp10: use generic BE/LE access
No functional changes.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-11-06 18:48:50 +01:00
Benjamin Tissoires
5c97492f44 hidpp20: fix LE/BE declarations, and move them to hidpp-generic.h
hidpp20_get_unaligned_be_u16 was LE, not BE.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2015-11-06 18:48:48 +01:00
Peter Hutterer
e769108bf6 Namespace the receiver/wired device idx defines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-23 13:45:33 +10:00
Peter Hutterer
2186dd90c6 hidpp: wrap the log handler init into a function
Almost a decent API now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-16 08:22:11 +10:00
Peter Hutterer
8a3222204e hidpp: add hidpp_device_init()
Make this into a somewhat more sensible API and default to printf as log
handler.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-16 08:22:11 +10:00
Peter Hutterer
498a2882df hidpp: disentangle hidpp from libratbag
We now only use libratbag for logging. Abstract that away so we can use
hidpp10 separate from libratbag where needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-16 08:21:59 +10:00
Peter Hutterer
a51cf76477 hidpp: move read/write to hidpp into the generic headers
Part 2 of disentangling libratbag from the hidpp10 library. Copy the hidraw_fd
into the hidpp_device struct and use that during read/write.

This temporarily disables logging, will be re-enabled with an upcoming commit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-10-16 08:21:41 +10:00
Peter Hutterer
5cb15524d4 hidpp: move the button lookup tables to the generic code
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-09-01 10:55:19 +10:00
Peter Hutterer
89728733bf hidpp: use a #define for the wired device index
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-25 14:13:17 +10:00
Peter Hutterer
872d522364 hidpp: move the shared defines into a generic header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-24 15:03:29 +10:00