Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event stack size option to esp_hidh_config_t and increase default event stack size in esp_hid_host example (IDFGH-4568) #6385

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/esp_hid/include/esp_hidh.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
1 change: 1 addition & 0 deletions examples/bluetooth/esp_hid_host/main/esp_hid_host_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ void app_main(void)
ESP_ERROR_CHECK( esp_ble_gattc_register_callback(esp_hidh_gattc_event_handler) );
esp_hidh_config_t config = {
.callback = hidh_callback,
.event_stack_size = 4096
};
ESP_ERROR_CHECK( esp_hidh_init(&config) );

Expand Down