Add event_stack_size option to esp_hidh_config_t

Merges https://github.com/espressif/esp-idf/pull/6385
This commit is contained in:
Layne Bernardo
2021-01-11 07:43:22 -06:00
committed by Ivan Grokhotkov
parent 3dbafb9a13
commit d1c8c268d4
3 changed files with 3 additions and 2 deletions

View File

@@ -100,6 +100,7 @@ typedef union {
typedef struct {
esp_event_handler_t callback;
uint16_t event_stack_size;
} esp_hidh_config_t;
/**

View File

@@ -617,7 +617,7 @@ esp_err_t esp_ble_hidh_init(const esp_hidh_config_t *config)
.queue_size = 5,
.task_name = "esp_ble_hidh_events",
.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
};
ret = esp_event_loop_create(&event_task_args, &event_loop_handle);

View File

@@ -325,7 +325,7 @@ esp_err_t esp_bt_hidh_init(const esp_hidh_config_t *config)
.queue_size = 5,
.task_name = "esp_bt_hidh_events",
.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
};
esp_err_t ret = esp_event_loop_create(&event_task_args, &event_loop_handle);