Yaroslav Chvanov
11fa70ad5c
hidpp20: remove unused LED type mappings
2023-02-25 13:28:52 +03:00
Yaroslav Chvanov
6e3011d64f
hidpp20: remove unused physical mapping button type
...
The `name` field does seem useful for debugging, so I left it in place.
2023-02-25 13:27:17 +03:00
Filipe Laíns
8a476a8724
hidpp: fix supported_report_types data type
...
Signed-off-by: Filipe Laíns <lains@archlinux.org >
2020-01-03 22:40:03 +00:00
Filipe Laíns
26c534cc74
hidpp20: check supported report types
...
Fixes #854
Signed-off-by: Filipe Laíns <lains@archlinux.org >
2019-12-18 19:23:31 +00:00
Filipe Laíns
02ec2442d3
hidpp20: add support for RGB Effects feature (0x8071)
...
Signed-off-by: Filipe Laíns <lains@archlinux.org >
2019-07-30 15:12:10 +10:00
Peter Hutterer
22a6ac1c7e
hidpp10: make raw debugging messages a bit easier to read
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2019-07-30 12:01:42 +10:00
Filipe Laíns
df5742ebfe
libratbag-util: move data manipulation functions out of hidpp-generic
...
Signed-off-by: Filipe Laíns <lains@archlinux.org >
2019-07-24 19:17:21 +10:00
Clément Vuchener
49b7029506
hidpp: Fix error string array size
...
Extend error strings array so reading 0xFF as an error code would not overflow.
2017-08-18 04:26:50 +10:00
Clément Vuchener
468787601e
hidpp: Distinguish 1.0 and 2.0 error codes
2017-08-18 04:26:50 +10:00
Peter Hutterer
698d8ab365
Replace ifndef include guards with pragma once
...
Now that we use meson exclusively and meson uses this for its config.h, you
wouldn't get around it anyway. Besides, the main compilers support it and
libratbag is too niche to worry about others.
This also *adds* the pragma to tools/shared.h where it was previously missing,
and changes it to be the top statement in hidpp-generic.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-05-05 09:02:15 +02:00
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