mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 18:28:36 -07:00
USB HID report timeout
This commit is contained in:
@@ -436,7 +436,11 @@ static bool hid_send_report(uint8_t report_id) {
|
|||||||
if((hid_semaphore == NULL) || (hid_connected == false)) return false;
|
if((hid_semaphore == NULL) || (hid_connected == false)) return false;
|
||||||
if((boot_protocol == true) && (report_id != ReportIdKeyboard)) return false;
|
if((boot_protocol == true) && (report_id != ReportIdKeyboard)) return false;
|
||||||
|
|
||||||
furi_check(furi_semaphore_acquire(hid_semaphore, FuriWaitForever) == FuriStatusOk);
|
FuriStatus status = furi_semaphore_acquire(hid_semaphore, HID_INTERVAL * 2);
|
||||||
|
if(status == FuriStatusErrorTimeout) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
furi_check(status == FuriStatusOk);
|
||||||
if(hid_connected == false) {
|
if(hid_connected == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user