Each hidpp10 device should have a udev property named either
RATBAG_HIDPP10_DPI or RATBAG_HIDPP10_DPI_LIST. These properties ensure
that we know the mapping between the raw value of the dpi reported by the
mouse and the actual value.
Older devices (using the scheme 1 or 2 of hidpp10_get_current_resolution)
have to use the DPI_LIST to be able to map 0x80+.
Newer devices (using scheme 3) use the DPI setting with min, max, step.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
No real reason to keep the two separate, and if we do and need to include both
libraries, we get double-defined symbols (all the ones in hidpp-generic.c).
This is a helper lib only anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
For protocol debugging, it's a lot easier to go have a simple helper than
having to go through the whole of libratbag.
And remove the page-dump helper from the main code.
Note that this tool needs a /dev/hidraw device directly, not an event node. It
is a debugging tool after all.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This driver is basically a duplicate of the Etekcity.
After the copy-paste, I renamed all the the "etekcity"
by "roccat" and then rev-engineered the various constants.
Still a WIP, but it is getting usable.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Two components are added here: a test driver that takes a struct
ratbag_test_device and sets that device up as a ratbag device.
That device is returned to the tests and then checked for sanity.
The ratbag_device_new_test_device() requires the environment variable
RATBAG_TEST set, otherwise we abort. It's also 'hidden' in a separate source
file, so it won't show up in doxygen. And if the test are disabled, this
function does nothing and the test driver never gets registered.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Still not hooked up in the library, but re-assigning back a different
hard-coded macro works.
This also re-introduce the dependency on libevdev for the lib.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This driver is really a driver for HID++ 2.0 devices, not just for devices on
the unifying receiver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The Logitech devices talk HID++, and we need a lib to handle that.
The first implemented command is the get protocol version which allows
to know if the device is using hid++ 1.0 or 2.0.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Note that this doesn't do anything yet, it's stubbed out everywhere except for
the button mapping bit where we already had some testing code from uLogitech.
This also adds the ID for the m570 trackball - a device I have available here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Most gaming mice use a specific HID protocol to configure the device.
Allow to retrieve the hidraw node associated to the mouse so we can talk
to it.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>