From b11f1b5483a9baa264adb1ef49688d471f6fea80 Mon Sep 17 00:00:00 2001 From: Staars Date: Sun, 22 Nov 2020 09:35:09 +0100 Subject: [PATCH] support single core ESP32 variants --- .../NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libesp32/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c b/lib/libesp32/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c index 0494f0a18..0ba15e9c3 100644 --- a/lib/libesp32/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c +++ b/lib/libesp32/NimBLE-Arduino/src/esp-hci/src/esp_nimble_hci.c @@ -30,7 +30,9 @@ #include "esp_bt.h" #include "freertos/semphr.h" #include "esp_compiler.h" +#ifndef CONFIG_FREERTOS_UNICORE #include "esp_ipc.h" +#endif #define NIMBLE_VHCI_TIMEOUT_MS 2000 @@ -98,7 +100,9 @@ int ble_hci_trans_hs_cmd_tx(uint8_t *cmd) if (xSemaphoreTake(vhci_send_sem, NIMBLE_VHCI_TIMEOUT_MS / portTICK_PERIOD_MS) == pdTRUE) { if (xPortGetCoreID() != 0) { +#ifndef CONFIG_FREERTOS_UNICORE esp_ipc_call_blocking(0, ble_hci_trans_hs_cmd_tx_on_core_0, cmd); +#endif } else { ble_hci_trans_hs_cmd_tx_on_core_0(cmd); } @@ -147,7 +151,9 @@ int ble_hci_trans_hs_acl_tx(struct os_mbuf *om) if (xSemaphoreTake(vhci_send_sem, NIMBLE_VHCI_TIMEOUT_MS / portTICK_PERIOD_MS) == pdTRUE) { if (xPortGetCoreID() != 0) { +#ifndef CONFIG_FREERTOS_UNICORE esp_ipc_call_blocking(0, ble_hci_trans_hs_acl_tx_on_core_0, om); +#endif } else { ble_hci_trans_hs_acl_tx_on_core_0(om); }