diff --git a/c2usb/port/zephyr/bluetooth/hid.cpp b/c2usb/port/zephyr/bluetooth/hid.cpp index 6b991e3..4f73b83 100644 --- a/c2usb/port/zephyr/bluetooth/hid.cpp +++ b/c2usb/port/zephyr/bluetooth/hid.cpp @@ -387,6 +387,7 @@ ::hid::result service::send_report(const std::span& data, report: return result::BUSY; } + pending_notify = data; auto ret = attr->notify( data.subspan(offset), [](::bt_conn*, void* user_data) @@ -396,7 +397,7 @@ ::hid::result service::send_report(const std::span& data, report: // get report selector / boot report info report::selector sel{report::type::INPUT}; protocol prot = protocol::BOOT; - if (*attr[1].uuid == *input_report_info().uuid) + if (attr[1].uuid == input_report_info().uuid) { sel = attr[report_reference_offset()].user_value(); prot = protocol::REPORT; @@ -413,7 +414,6 @@ ::hid::result service::send_report(const std::span& data, report: switch (ret) { case 0: - pending_notify = data; return result::OK; case -ENOENT: case -EINVAL: