d/hdk: Use 100 ms hid read timeout

Avoids burning cpu cycles with busy looping
This commit is contained in:
Christoph Haag 2023-01-12 14:22:48 +01:00
parent c9405e946f
commit 4030b474ad

View file

@ -124,7 +124,7 @@ hdk_device_update(struct hdk_device *hd)
{
uint8_t buffer[MSG_LEN_LARGE];
auto bytesRead = os_hid_read(hd->dev, buffer, sizeof(buffer), 0);
auto bytesRead = os_hid_read(hd->dev, buffer, sizeof(buffer), 100);
if (bytesRead == -1) {
if (!hd->disconnect_notified) {
HDK_ERROR(hd,