There is no gain at declaring the PID of the mice we support in
libratbag-private.h
Make it per driver, and remove the extra declarations.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Lokks like the G500 needs a device_idx of 0x00, and the MX Master while on
Bluetooth only answers to report longs
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
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>
The M705 talks HID++ 1.0 but the actual button toggle is not persistent.
So there is no real need to support this in libratbag for now.
This will allow to properly address the other devices.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Starting with kernel v3.19, the hidraw node associated to the input node
talks the the actual device, no matter which device index is given.
There is no need to really know which device has which index thus.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
There is not much available now, but the mouse should provide configurable
DPI and buttons, which is a perfect test for libratbag.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
hidraw_devinfo.product is 16-bit signed, input_id.product is 16 bit unsigned.
Move the hidraw info over to a input_id, then compare.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
The vid/pid combo for the hidraw device is that of the receiver, not that of
the device (which we get from the event node).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In file included from hidpp10.c:43:0:
hidpp10.c: In function 'hidpp10_get_device_info':
./libratbag-util.h:76:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define min(a, b) (((a) < (b)) ? (a) : (b))
^
hidpp10.c:251:12: note: in expansion of macro 'min'
dev->name[min(name_size, sizeof(dev->name) - 1)] = '\0';
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This might not be part of the final API, but it is rather convenient
to use right now.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Now that we are actually using a verbose option, it does not make sense
to output the debug messages by default.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
The macros are currently not supported.
2 buttons are not supported too: double left click and "fire" (autorepeat
on left clic).
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>