ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
port_esp_hosted_host_bt_config.h File Reference

esp-hosted port header: which Bluetooth host runs above HCI. More...

Go to the source code of this file.

Macros

#define H_BT_HOST_ESP_NIMBLE   (1)
 Route esp-hosted HCI traffic to the Apache NimBLE host.
#define H_BT_HOST_ESP_BLUEDROID   (0)
 Route esp-hosted HCI traffic to Espressif's Bluedroid host.
#define H_BT_ENABLE_LL_INIT   (0)
 Whether the host initialises a local Bluetooth link-layer.

Detailed Description

esp-hosted port header: which Bluetooth host runs above HCI.

Tag
[Ring 4 / PORT] {World: NS}

One of the ten port headers the vendored esp-hosted core includes by name (see docs/SOUP/esp-hosted-host.md). The esp-hosted HCI drivers (host/drivers/bt/vhci_drv.c and hci_stub_drv.c) are written for two possible Bluetooth hosts and select between them here.

This project already vendors Apache NimBLE (libs/third_party/nimble/) with a first-party ThreadX port under port/nimble/, so NimBLE is the host and Bluedroid is off. That is a fact about this tree, not a preference: no Bluedroid source exists here, and selecting it would leave the HCI driver referencing esp_bluedroid_hci.h – a header the tree does not contain.

H_BT_ENABLE_LL_INIT is off for the same structural reason. It asks the host to bring up a local link-layer controller before opening HCI; on this board the controller is the ESP32-C6 across the SPI link and it initialises itself, so a host-side link-layer init would be initialising a controller that is not there.

Since
0.1.0

Definition in file port_esp_hosted_host_bt_config.h.

Macro Definition Documentation

◆ H_BT_ENABLE_LL_INIT

#define H_BT_ENABLE_LL_INIT   (0)

Whether the host initialises a local Bluetooth link-layer.

Zero. The link-layer controller lives on the ESP32-C6 and comes up with the co-processor image; the RA8 only speaks HCI to it over the esp-hosted transport.

Note
Read-only build configuration.
Warning
Setting this to 1 makes the vendored VHCI driver call an on-chip controller init that does not exist on the RA8D2.
Example:
#if H_BT_ENABLE_LL_INIT
ble_ll_init();
#endif
Since
0.1.0

Definition at line 88 of file port_esp_hosted_host_bt_config.h.

◆ H_BT_HOST_ESP_BLUEDROID

#define H_BT_HOST_ESP_BLUEDROID   (0)

Route esp-hosted HCI traffic to Espressif's Bluedroid host.

Zero. Bluedroid is an ESP-IDF component and is not vendored here; selecting it would reference esp_bluedroid_hci.h, which this tree does not contain.

Note
Read-only build configuration.
Warning
Mutually exclusive with H_BT_HOST_ESP_NIMBLE.
Example:
#if H_BT_HOST_ESP_BLUEDROID
hosted_hci_bluedroid_send(data, len);
#endif
Since
0.1.0

Definition at line 69 of file port_esp_hosted_host_bt_config.h.

◆ H_BT_HOST_ESP_NIMBLE

#define H_BT_HOST_ESP_NIMBLE   (1)

Route esp-hosted HCI traffic to the Apache NimBLE host.

One. NimBLE is vendored at libs/third_party/nimble/ and ported onto ThreadX by port/nimble/, so it is the only Bluetooth host this image can carry.

Note
Read-only build configuration.
Warning
Mutually exclusive with H_BT_HOST_ESP_BLUEDROID; the vendored HCI driver compiles both blocks when both are set.
Example:
#if H_BT_HOST_ESP_NIMBLE
#endif
int ble_transport_to_hs_evt(void *buf)
Push an HCI event up to the host stack.
Since
0.1.0

Definition at line 51 of file port_esp_hosted_host_bt_config.h.