From 987fd0ac0350abd706b21f57ad1620254b8210db Mon Sep 17 00:00:00 2001 From: vaaronna <86444194+vaaronna@users.noreply.github.com> Date: Tue, 20 Dec 2022 09:16:23 -0800 Subject: [PATCH] Add support for HID over SPI (#486) This adds (or more accurately completes, since it was already started) support for HID over SPI devices. Handling is almost identical to HID over I2C. --- linux/hid.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/linux/hid.c b/linux/hid.c index c9ddec071..1866ee4f0 100644 --- a/linux/hid.c +++ b/linux/hid.c @@ -593,6 +593,7 @@ static struct hid_device_info * create_device_info_for_device(struct udev_device case BUS_BLUETOOTH: case BUS_I2C: case BUS_USB: + case BUS_SPI: break; default: @@ -681,6 +682,14 @@ static struct hid_device_info * create_device_info_for_device(struct udev_device break; + case BUS_SPI: + cur_dev->manufacturer_string = wcsdup(L""); + cur_dev->product_string = utf8_to_wchar_t(product_name_utf8); + + cur_dev->bus_type = HID_API_BUS_SPI; + + break; + default: /* Unknown device type - this should never happen, as we * check for USB and Bluetooth devices above */