Skip to content

Commit d0a5c72

Browse files
committed
docs(ble): Add the explanations to controller parameters configurable in menuconfig
1 parent f0cb44a commit d0a5c72

File tree

1 file changed

+55
-43
lines changed
  • components/bt/include/esp32/include

1 file changed

+55
-43
lines changed

components/bt/include/esp32/include/esp_bt.h

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef enum {
6868
} esp_bt_mode_t;
6969

7070
/**
71-
* @brief BLE sleep clock accuracy(SCA)
71+
* @brief BLE sleep clock accuracy (SCA)
7272
*
7373
* @note Currently only ESP_BLE_SCA_500PPM and ESP_BLE_SCA_250PPM are supported.
7474
*/
@@ -217,31 +217,40 @@ the adv packet will be discarded until the memory is restored. */
217217

218218
/**
219219
* @brief Bluetooth Controller config options
220+
* @note
221+
* 1. For parameters configurable in menuconfig, please refer to menuconfig for details on range and default values.
222+
* 2. It is not recommended to modify the default values of `controller_task_stack_size`, `controller_task_prio`.
220223
*/
221224
typedef struct {
222225
uint16_t controller_task_stack_size; /*!< Bluetooth Controller task stack size in bytes */
223226
uint8_t controller_task_prio; /*!< Bluetooth Controller task priority */
224-
uint8_t hci_uart_no; /*!< Indicates UART number if using UART1/2 as HCI I/O interface */
225-
uint32_t hci_uart_baudrate; /*!< Indicates UART baudrate if using UART1/2 as HCI I/O interface */
226-
uint8_t scan_duplicate_mode; /*!< Scan duplicate filtering mode */
227-
uint8_t scan_duplicate_type; /*!< Scan duplicate filtering type */
228-
uint16_t normal_adv_size; /*!< Scan duplicate filtering list size with normal ADV */
229-
uint16_t mesh_adv_size; /*!< Scan duplicate filtering list size with mesh ADV */
230-
uint16_t send_adv_reserved_size; /*!< Controller minimum memory value*/
231-
uint32_t controller_debug_flag; /*!< Controller debug log flag */
232-
uint8_t mode; /*!< Controller mode: BLE mode (1), Classic Bluetooth mode (2) or Dual mode (3) */
233-
uint8_t ble_max_conn; /*!< Maximum number of BLE connections */
234-
uint8_t bt_max_acl_conn; /*!< Maximum number of BR/EDR ACL connections */
235-
uint8_t bt_sco_datapath; /*!< SCO data path, i.e. HCI or PCM module */
236-
bool auto_latency; /*!< BLE auto latency, used to enhance Classic Bluetooth performance */
237-
bool bt_legacy_auth_vs_evt; /*!< BR/EDR Legacy auth complete event required to protect from BIAS attack */
238-
uint8_t bt_max_sync_conn; /*!< Maximum number of BR/EDR synchronous connections. Effective in menuconfig */
239-
uint8_t ble_sca; /*!< BLE low power crystal accuracy index */
240-
uint8_t pcm_role; /*!< PCM role (master & slave)*/
241-
uint8_t pcm_polar; /*!< PCM polar trig (falling clk edge & rising clk edge) */
242-
bool hli; /*!< Using high level interrupt or not */
243-
uint16_t dup_list_refresh_period; /*!< Scan duplicate filtering list refresh period */
244-
bool ble_scan_backoff; /*!< BLE scan backoff */
227+
uint8_t hci_uart_no; /*!< Indicates UART number if using UART1/2 as HCI I/O interface. Configurable in menuconfig. */
228+
uint32_t hci_uart_baudrate; /*!< Indicates UART baudrate if using UART1/2 as HCI I/O interface. Configurable in menuconfig. */
229+
uint8_t scan_duplicate_mode; /*!< Scan duplicate filtering mode. Configurable in menuconfig. */
230+
uint8_t scan_duplicate_type; /*!< Scan duplicate filtering type. Configurable in menuconfig. */
231+
uint16_t normal_adv_size; /*!< Maximum number of devices in scan duplicate filtering list. Configurable in menuconfig. */
232+
uint16_t mesh_adv_size; /*!< Maximum number of Mesh ADV packets in scan duplicate filtering list. Configurable in menuconfig. */
233+
uint16_t send_adv_reserved_size; /*!< Controller minimum memory value in bytes. Internal use only */
234+
uint32_t controller_debug_flag; /*!< Controller debug log flag. Internal use only */
235+
uint8_t mode; /*!< Controller mode:
236+
1: BLE mode
237+
2: Classic Bluetooth mode
238+
3: Dual mode
239+
Others: Invalid
240+
Configurable in menuconfig.
241+
*/
242+
uint8_t ble_max_conn; /*!< Maximum number of BLE connections. Configurable in menuconfig. */
243+
uint8_t bt_max_acl_conn; /*!< Maximum number of BR/EDR ACL connections. Configurable in menuconfig. */
244+
uint8_t bt_sco_datapath; /*!< SCO data path, i.e. HCI or PCM module. Configurable in menuconfig. */
245+
bool auto_latency; /*!< True if BLE auto latency is enabled, used to enhance Classic Bluetooth performance; false otherwise. Configurable in menuconfig.*/
246+
bool bt_legacy_auth_vs_evt; /*!< True if BR/EDR Legacy Authentication Vendor Specific Event is enabled, which is required to protect from BIAS attack; false otherwise. Configurable in menuconfig. */
247+
uint8_t bt_max_sync_conn; /*!< Maximum number of BR/EDR synchronous connections. Configurable in menuconfig. */
248+
uint8_t ble_sca; /*!< BLE low power crystal accuracy index. Configurable in menuconfig. */
249+
uint8_t pcm_role; /*!< PCM role (master & slave). Configurable in menuconfig.*/
250+
uint8_t pcm_polar; /*!< PCM polar trig (falling clk edge & rising clk edge). Configurable in menuconfig. */
251+
bool hli; /*!< True if using high level interrupt; false otherwise. Configurable in menuconfig. */
252+
uint16_t dup_list_refresh_period; /*!< Scan duplicate filtering list refresh period in seconds. Configurable in menuconfig.*/
253+
bool ble_scan_backoff; /*!< True if BLE scan backoff is enabled; false otherwise. Configurable in menuconfig.*/
245254
uint32_t magic; /*!< Magic number */
246255
} esp_bt_controller_config_t;
247256

@@ -285,21 +294,21 @@ typedef enum {
285294
*/
286295
typedef enum {
287296
ESP_PWR_LVL_N12 = 0, /*!< Corresponding to -12 dBm */
288-
ESP_PWR_LVL_N9 = 1, /*!< Corresponding to -9 dBm */
289-
ESP_PWR_LVL_N6 = 2, /*!< Corresponding to -6 dBm */
290-
ESP_PWR_LVL_N3 = 3, /*!< Corresponding to -3 dBm */
291-
ESP_PWR_LVL_N0 = 4, /*!< Corresponding to 0 dBm */
292-
ESP_PWR_LVL_P3 = 5, /*!< Corresponding to +3 dBm */
293-
ESP_PWR_LVL_P6 = 6, /*!< Corresponding to +6 dBm */
294-
ESP_PWR_LVL_P9 = 7, /*!< Corresponding to +9 dBm */
297+
ESP_PWR_LVL_N9 = 1, /*!< Corresponding to -9 dBm */
298+
ESP_PWR_LVL_N6 = 2, /*!< Corresponding to -6 dBm */
299+
ESP_PWR_LVL_N3 = 3, /*!< Corresponding to -3 dBm */
300+
ESP_PWR_LVL_N0 = 4, /*!< Corresponding to 0 dBm */
301+
ESP_PWR_LVL_P3 = 5, /*!< Corresponding to +3 dBm */
302+
ESP_PWR_LVL_P6 = 6, /*!< Corresponding to +6 dBm */
303+
ESP_PWR_LVL_P9 = 7, /*!< Corresponding to +9 dBm */
295304
ESP_PWR_LVL_N14 = ESP_PWR_LVL_N12, /*!< Backward compatibility! Setting to -14 dBm will actually result in -12 dBm */
296-
ESP_PWR_LVL_N11 = ESP_PWR_LVL_N9, /*!< Backward compatibility! Setting to -11 dBm will actually result in -9 dBm */
297-
ESP_PWR_LVL_N8 = ESP_PWR_LVL_N6, /*!< Backward compatibility! Setting to -8 dBm will actually result in -6 dBm */
298-
ESP_PWR_LVL_N5 = ESP_PWR_LVL_N3, /*!< Backward compatibility! Setting to -5 dBm will actually result in -3 dBm */
299-
ESP_PWR_LVL_N2 = ESP_PWR_LVL_N0, /*!< Backward compatibility! Setting to -2 dBm will actually result in 0 dBm */
300-
ESP_PWR_LVL_P1 = ESP_PWR_LVL_P3, /*!< Backward compatibility! Setting to +1 dBm will actually result in +3 dBm */
301-
ESP_PWR_LVL_P4 = ESP_PWR_LVL_P6, /*!< Backward compatibility! Setting to +4 dBm will actually result in +6 dBm */
302-
ESP_PWR_LVL_P7 = ESP_PWR_LVL_P9, /*!< Backward compatibility! Setting to +7 dBm will actually result in +9 dBm */
305+
ESP_PWR_LVL_N11 = ESP_PWR_LVL_N9, /*!< Backward compatibility! Setting to -11 dBm will actually result in -9 dBm */
306+
ESP_PWR_LVL_N8 = ESP_PWR_LVL_N6, /*!< Backward compatibility! Setting to -8 dBm will actually result in -6 dBm */
307+
ESP_PWR_LVL_N5 = ESP_PWR_LVL_N3, /*!< Backward compatibility! Setting to -5 dBm will actually result in -3 dBm */
308+
ESP_PWR_LVL_N2 = ESP_PWR_LVL_N0, /*!< Backward compatibility! Setting to -2 dBm will actually result in 0 dBm */
309+
ESP_PWR_LVL_P1 = ESP_PWR_LVL_P3, /*!< Backward compatibility! Setting to +1 dBm will actually result in +3 dBm */
310+
ESP_PWR_LVL_P4 = ESP_PWR_LVL_P6, /*!< Backward compatibility! Setting to +4 dBm will actually result in +6 dBm */
311+
ESP_PWR_LVL_P7 = ESP_PWR_LVL_P9, /*!< Backward compatibility! Setting to +7 dBm will actually result in +9 dBm */
303312
} esp_power_level_t;
304313

305314
/**
@@ -348,10 +357,9 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type);
348357
* such as performing discovery, profile initialization, and so on.
349358
* 2. For BR/EDR to use the new TX power for inquiry, call this function before starting an inquiry.
350359
* If BR/EDR is already inquiring, restart the inquiry after calling this function.
351-
* 3. The default minimum power level is `ESP_PWR_LVL_N0`, and the maximum power level is `ESP_PWR_LVL_P3`.
352360
*
353-
* @param[in] min_power_level The minimum power level. The default value is `ESP_PWR_LVL_N0`
354-
* @param[in] max_power_level The maximum power level
361+
* @param[in] min_power_level The minimum power level. The default value is `ESP_PWR_LVL_N0`.
362+
* @param[in] max_power_level The maximum power level. The default value is `ESP_PWR_LVL_P3`.
355363
*
356364
* @return
357365
* - ESP_OK: Success
@@ -604,13 +612,17 @@ esp_err_t esp_bt_sleep_disable(void);
604612
esp_err_t esp_ble_scan_dupilcate_list_flush(void);
605613

606614
/**
607-
* @brief bt Wi-Fi power domain power on
608-
*/
615+
* @brief Power on Bluetooth Wi-Fi power domain
616+
*
617+
* @note This function is not recommended to use due to potential risk.
618+
*/
609619
void esp_wifi_bt_power_domain_on(void);
610620

611621
/**
612-
* @brief bt Wi-Fi power domain power off
613-
*/
622+
* @brief Power off Bluetooth Wi-Fi power domain
623+
*
624+
* @note This function is not recommended to use due to potential risk.
625+
*/
614626
void esp_wifi_bt_power_domain_off(void);
615627

616628
#ifdef __cplusplus

0 commit comments

Comments
 (0)