refactor(esp_hid): Create one common event loop

After this change, only one event loop is created.
It is reused by all transport layers (BT, BLE, USB).
This commit is contained in:
Tomas Rezucha
2024-03-06 21:26:29 +01:00
parent c539b7cde5
commit 868d375c1d
6 changed files with 176 additions and 267 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
@@ -8,13 +8,16 @@
#include <string.h>
#include <stdbool.h>
#include <inttypes.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_bt_device.h"
#include "esp_hid_gap.h"
#if CONFIG_BT_BLUEDROID_ENABLED
#include "esp_bt_device.h"
#endif
#if CONFIG_BT_NIMBLE_ENABLED
#include "host/ble_hs.h"
#include "nimble/nimble_port.h"