Parse USB interface number from device Hardware IDs. #360

Merged
DJm00n merged 1 commit from win_interface_number into master 2021-12-22 16:01:42 -06:00
DJm00n commented 2021-12-20 05:05:27 -06:00 (Migrated from github.com)

Strickly speaking we cannot parse interface string at all and only allowed to parse Hardware ID string.

Strickly speaking we cannot parse interface string at all and only allowed to parse Hardware ID string.
Youw (Migrated from github.com) reviewed 2021-12-20 07:04:59 -06:00
@ -415,0 +418,4 @@
and https://docs.microsoft.com/windows-hardware/drivers/install/standard-usb-identifiers
hardware_id is always expected to be uppercase.
*/
Youw (Migrated from github.com) commented 2021-12-20 07:02:36 -06:00

    hardware_id is always expected to be uppercase.
*/
```suggestion hardware_id is always expected to be uppercase. */ ```
@ -487,6 +534,7 @@ static void hid_internal_get_info(struct hid_device_info* dev)
end:
free(interface_path);
Youw (Migrated from github.com) commented 2021-12-20 07:00:07 -06:00

are we sure this is the best decision?
in case if we fail to read HardwareId why don't we just skip reading the interface_number and get to the next property

are we sure this is the best decision? in case if we fail to read `HardwareId` why don't we just skip reading the `interface_number` and get to the next property
Youw (Migrated from github.com) commented 2021-12-20 07:03:26 -06:00

the alignment "before" is intentional, please revert

the alignment "before" is intentional, please revert
Youw (Migrated from github.com) commented 2021-12-20 07:03:30 -06:00

revert

revert
DJm00n (Migrated from github.com) reviewed 2021-12-20 09:15:36 -06:00
@ -487,6 +534,7 @@ static void hid_internal_get_info(struct hid_device_info* dev)
end:
free(interface_path);
DJm00n (Migrated from github.com) commented 2021-12-20 09:15:35 -06:00

DEVPKEY_Device_HardwareIds is mandatory property of any device node in Windows device tree. I think this check should be there just for consistency.

`DEVPKEY_Device_HardwareIds` is mandatory property of any device node in Windows device tree. I think this check should be there just for consistency.
DJm00n (Migrated from github.com) reviewed 2021-12-20 09:16:52 -06:00
DJm00n (Migrated from github.com) commented 2021-12-20 09:16:52 -06:00

fixed

fixed
DJm00n (Migrated from github.com) reviewed 2021-12-20 09:16:55 -06:00
DJm00n (Migrated from github.com) commented 2021-12-20 09:16:55 -06:00

fixed

fixed
DJm00n (Migrated from github.com) reviewed 2021-12-20 09:16:59 -06:00
@ -415,0 +418,4 @@
and https://docs.microsoft.com/windows-hardware/drivers/install/standard-usb-identifiers
hardware_id is always expected to be uppercase.
*/
DJm00n (Migrated from github.com) commented 2021-12-20 09:16:59 -06:00

fixed

fixed
Youw (Migrated from github.com) approved these changes 2021-12-20 09:38:21 -06:00
@ -412,10 +412,35 @@ static void hid_internal_get_ble_info(struct hid_device_info* dev, DEVINST dev_n
}
Youw (Migrated from github.com) commented 2021-12-20 09:38:16 -06:00
	const wchar_t *interface_token = L"&MI_";
```suggestion const wchar_t *interface_token = L"&MI_"; ```
DJm00n (Migrated from github.com) reviewed 2021-12-20 10:24:09 -06:00
@ -412,10 +412,35 @@ static void hid_internal_get_ble_info(struct hid_device_info* dev, DEVINST dev_n
}
DJm00n (Migrated from github.com) commented 2021-12-20 10:24:09 -06:00

fixed

fixed
Youw (Migrated from github.com) reviewed 2021-12-22 16:01:19 -06:00
@ -487,6 +534,7 @@ static void hid_internal_get_info(struct hid_device_info* dev)
end:
free(interface_path);
Youw (Migrated from github.com) commented 2021-12-22 16:01:19 -06:00

ok, at least it is consistent with the other parts in the same function

ok, at least it is consistent with the other parts in the same function
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!360
No description provided.