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>
We'll use this to access Logitech unifying devices
Permission from Benjamin Tissoires and Olivier Gay to relicense this under the
MIT license.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Etekcity mice have volume up/down mapped on the 2 buttons on the right
side of the mouse. They get easily pressed by the hand and can annoy the
user. This command switches on and off these buttons.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
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>
This allows to test ratbag_device_set_active_profile() and the
.write_profile() callback from the drivers.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>