mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'bugfix/hid_stack_size' into 'master'
esp_hid: allow setting stack size for the event task, increase stack size in the example (Github PR) Closes IDFGH-4568 and IDFGH-4563 See merge request espressif/esp-idf!13438
This commit is contained in:
@@ -100,6 +100,7 @@ typedef union {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
esp_event_handler_t callback;
|
esp_event_handler_t callback;
|
||||||
|
uint16_t event_stack_size;
|
||||||
} esp_hidh_config_t;
|
} esp_hidh_config_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -617,7 +617,7 @@ esp_err_t esp_ble_hidh_init(const esp_hidh_config_t *config)
|
|||||||
.queue_size = 5,
|
.queue_size = 5,
|
||||||
.task_name = "esp_ble_hidh_events",
|
.task_name = "esp_ble_hidh_events",
|
||||||
.task_priority = uxTaskPriorityGet(NULL),
|
.task_priority = uxTaskPriorityGet(NULL),
|
||||||
.task_stack_size = 2048,
|
.task_stack_size = config->event_stack_size > 0 ? config->event_stack_size : 2048,
|
||||||
.task_core_id = tskNO_AFFINITY
|
.task_core_id = tskNO_AFFINITY
|
||||||
};
|
};
|
||||||
ret = esp_event_loop_create(&event_task_args, &event_loop_handle);
|
ret = esp_event_loop_create(&event_task_args, &event_loop_handle);
|
||||||
|
@@ -325,7 +325,7 @@ esp_err_t esp_bt_hidh_init(const esp_hidh_config_t *config)
|
|||||||
.queue_size = 5,
|
.queue_size = 5,
|
||||||
.task_name = "esp_bt_hidh_events",
|
.task_name = "esp_bt_hidh_events",
|
||||||
.task_priority = uxTaskPriorityGet(NULL),
|
.task_priority = uxTaskPriorityGet(NULL),
|
||||||
.task_stack_size = 2048,
|
.task_stack_size = config->event_stack_size > 0 ? config->event_stack_size : 2048,
|
||||||
.task_core_id = tskNO_AFFINITY
|
.task_core_id = tskNO_AFFINITY
|
||||||
};
|
};
|
||||||
esp_err_t ret = esp_event_loop_create(&event_task_args, &event_loop_handle);
|
esp_err_t ret = esp_event_loop_create(&event_task_args, &event_loop_handle);
|
||||||
|
@@ -127,6 +127,7 @@ void app_main(void)
|
|||||||
ESP_ERROR_CHECK( esp_ble_gattc_register_callback(esp_hidh_gattc_event_handler) );
|
ESP_ERROR_CHECK( esp_ble_gattc_register_callback(esp_hidh_gattc_event_handler) );
|
||||||
esp_hidh_config_t config = {
|
esp_hidh_config_t config = {
|
||||||
.callback = hidh_callback,
|
.callback = hidh_callback,
|
||||||
|
.event_stack_size = 4096
|
||||||
};
|
};
|
||||||
ESP_ERROR_CHECK( esp_hidh_init(&config) );
|
ESP_ERROR_CHECK( esp_hidh_init(&config) );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user