Skip to content

Commit

Permalink
Add event_stack_size option to esp_hidh_config_t
Browse files Browse the repository at this point in the history
Merges #6385
  • Loading branch information
LMBernardo authored and igrr committed May 5, 2021
1 parent 3dbafb9 commit d1c8c26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/esp_hid/include/esp_hidh.h
Expand Up @@ -100,6 +100,7 @@ typedef union {

typedef struct {
esp_event_handler_t callback;
uint16_t event_stack_size;
} esp_hidh_config_t;

/**
Expand Down
2 changes: 1 addition & 1 deletion components/esp_hid/src/ble_hidh.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/esp_hid/src/bt_hidh.c
Expand Up @@ -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);
Expand Down

0 comments on commit d1c8c26

Please sign in to comment.