mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Stack fixes
- Ignore boot mode change command or at least pass it through before taking action - Increase SDP padding size
This commit is contained in:
parent
7ae4bcb932
commit
c37523a06f
@ -1501,7 +1501,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SDP_MAX_PAD_LEN
|
#ifndef SDP_MAX_PAD_LEN
|
||||||
#define SDP_MAX_PAD_LEN 300
|
// HHL Custom Code we have to increase this to 500 to fit the full procon descriptor
|
||||||
|
#define SDP_MAX_PAD_LEN 500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The maximum length, in bytes, of an attribute. */
|
/* The maximum length, in bytes, of an attribute. */
|
||||||
|
@ -643,7 +643,7 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
|||||||
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->get_report.report_id, param->get_report.report_type,
|
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->get_report.report_id, param->get_report.report_type,
|
||||||
&map_index);
|
&map_index);
|
||||||
if (p_rpt == NULL) {
|
if (p_rpt == NULL) {
|
||||||
ESP_LOGE(TAG, "Can not find report!");
|
ESP_LOGE(TAG, "Can not find report EVT: %d", param->get_report.report_id);
|
||||||
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
|
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -684,7 +684,7 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
|||||||
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->set_report.report_id, param->set_report.report_type,
|
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->set_report.report_id, param->set_report.report_type,
|
||||||
&map_index);
|
&map_index);
|
||||||
if (p_rpt == NULL) {
|
if (p_rpt == NULL) {
|
||||||
ESP_LOGE(TAG, "Can not find report!");
|
ESP_LOGE(TAG, "Can not find report SET: %d", param->set_report.report_type);
|
||||||
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
|
esp_bt_hid_device_report_error(ESP_HID_PAR_HANDSHAKE_RSP_ERR_INVALID_REP_ID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -721,6 +721,9 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ESP_HIDD_SET_PROTOCOL_EVT: {
|
case ESP_HIDD_SET_PROTOCOL_EVT: {
|
||||||
|
ESP_LOGI(TAG, "Ignoring protocol mode change.");
|
||||||
|
break;
|
||||||
|
|
||||||
if (param->set_protocol.protocol_mode != ESP_HIDD_UNSUPPORTED_MODE) {
|
if (param->set_protocol.protocol_mode != ESP_HIDD_UNSUPPORTED_MODE) {
|
||||||
if (s_hidd_param.dev->protocol_mode == param->set_protocol.protocol_mode) {
|
if (s_hidd_param.dev->protocol_mode == param->set_protocol.protocol_mode) {
|
||||||
break;
|
break;
|
||||||
@ -730,7 +733,7 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
|||||||
osi_mutex_unlock(&s_hidd_param.mutex);
|
osi_mutex_unlock(&s_hidd_param.mutex);
|
||||||
cb_param.protocol_mode.dev = s_hidd_param.dev->dev;
|
cb_param.protocol_mode.dev = s_hidd_param.dev->dev;
|
||||||
cb_param.protocol_mode.protocol_mode = s_hidd_param.dev->protocol_mode;
|
cb_param.protocol_mode.protocol_mode = s_hidd_param.dev->protocol_mode;
|
||||||
cb_param.protocol_mode.map_index = 0;
|
//cb_param.protocol_mode.map_index = 0;
|
||||||
esp_event_post_to(s_hidd_param.dev->event_loop_handle, ESP_HIDD_EVENTS, ESP_HIDD_PROTOCOL_MODE_EVENT,
|
esp_event_post_to(s_hidd_param.dev->event_loop_handle, ESP_HIDD_EVENTS, ESP_HIDD_PROTOCOL_MODE_EVENT,
|
||||||
&cb_param, sizeof(esp_hidd_event_data_t), portMAX_DELAY);
|
&cb_param, sizeof(esp_hidd_event_data_t), portMAX_DELAY);
|
||||||
} else {
|
} else {
|
||||||
@ -743,7 +746,7 @@ void bt_hidd_cb(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
|
|||||||
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->intr_data.report_id, ESP_HID_REPORT_TYPE_OUTPUT,
|
p_rpt = get_report_by_id_and_type(s_hidd_param.dev, param->intr_data.report_id, ESP_HID_REPORT_TYPE_OUTPUT,
|
||||||
&map_index);
|
&map_index);
|
||||||
if (p_rpt == NULL) {
|
if (p_rpt == NULL) {
|
||||||
ESP_LOGE(TAG, "Can not find report!");
|
ESP_LOGE(TAG, "Can not find report INTR: %d", param->intr_data.report_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user