Skip to content

Commit

Permalink
Add support for HID over SPI (#486)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vaaronna authored Dec 20, 2022
1 parent 663f1a7 commit 987fd0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions linux/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 987fd0a

Please sign in to comment.