Skip to content

Commit 384056c

Browse files
committed
zephyr: fix hogp busy handling by releasing busy flag if transfer fails
1 parent cf2ae01 commit 384056c

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

c2usb/port/zephyr/bluetooth/hid.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -420,18 +420,11 @@ ::hid::result service::send_report(const std::span<const uint8_t>& data, report:
420420
this_->app_.in_report_sent(buf);
421421
},
422422
attr, active_conn_.load());
423-
switch (ret)
423+
if (ret != 0)
424424
{
425-
case 0:
426-
return result::OK;
427-
case -ENOENT:
428-
case -EINVAL:
429-
return result::INVALID;
430-
case -ENOMEM:
431-
return result::NO_MEMORY;
432-
default:
433-
return result::NO_CONNECTION;
425+
pending_notify = {};
434426
}
427+
return result(ret);
435428
}
436429

437430
::hid::result service::receive_report(const std::span<uint8_t>& data, ::hid::report::type type)

0 commit comments

Comments
 (0)