mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(esp_hid): Fixed protocol mode mapping bug
Closes https://github.com/espressif/esp-idf/issues/14232
This commit is contained in:
parent
4459865257
commit
7f297af892
@ -716,11 +716,9 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
||||
}
|
||||
case ESP_HIDD_SET_PROTOCOL_EVT: {
|
||||
if (param->set_protocol.protocol_mode != ESP_HIDD_UNSUPPORTED_MODE) {
|
||||
if (s_hidd_param.dev->protocol_mode == param->set_protocol.protocol_mode) {
|
||||
break;
|
||||
}
|
||||
osi_mutex_lock(&s_hidd_param.mutex, OSI_MUTEX_MAX_TIMEOUT);
|
||||
s_hidd_param.dev->protocol_mode = param->set_protocol.protocol_mode;
|
||||
s_hidd_param.dev->protocol_mode =
|
||||
param->set_protocol.protocol_mode ? ESP_HID_PROTOCOL_MODE_BOOT : ESP_HID_PROTOCOL_MODE_REPORT;
|
||||
osi_mutex_unlock(&s_hidd_param.mutex);
|
||||
cb_param.protocol_mode.dev = s_hidd_param.dev->dev;
|
||||
cb_param.protocol_mode.protocol_mode = s_hidd_param.dev->protocol_mode;
|
||||
|
Loading…
Reference in New Issue
Block a user