fix(bt/bluedroid): Fix HID Device connection failed bug

Closes https://github.com/espressif/esp-idf/issues/13671
This commit is contained in:
liqigan
2024-04-23 15:08:27 +08:00
parent bc6f4b7e31
commit 21df723fca
8 changed files with 69 additions and 26 deletions

View File

@@ -379,7 +379,6 @@ tHID_STATUS HID_HostAddDev ( BD_ADDR addr, UINT16 attr_mask, UINT8 *handle )
if (!hh_cb.devices[i].in_use) {
hh_cb.devices[i].in_use = TRUE;
hh_cb.devices[i].delay_remove = FALSE;
hh_cb.devices[i].is_orig = FALSE;
memcpy( hh_cb.devices[i].addr, addr, sizeof( BD_ADDR ) ) ;
hh_cb.devices[i].state = HID_DEV_NO_CONN;
hh_cb.devices[i].conn_tries = 0 ;
@@ -487,7 +486,6 @@ tHID_STATUS HID_HostOpenDev ( UINT8 dev_handle )
}
hh_cb.devices[dev_handle].conn_tries = 1;
hh_cb.devices[dev_handle].is_orig = TRUE;
return hidh_conn_initiate( dev_handle );
}
@@ -666,7 +664,7 @@ BOOLEAN HID_HostConnectOrig(UINT8 dev_handle)
break;
}
ret = hh_cb.devices[dev_handle].is_orig;
ret = hidh_conn_is_orig(dev_handle);
} while (0);
return ret;