Merge pull request #9943 from Staars/esp32_solo

NimBLE-lib: support single core ESP32 variants
This commit is contained in:
Theo Arends 2020-11-22 09:46:57 +01:00 committed by GitHub
commit f3594a46c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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);
}