mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble: support for selecting CSA#2 by menuconfig
ble(fix): fixed event receiving on host side without returning event buffer to pool
This commit is contained in:
parent
ae21032e9d
commit
f75b4b1636
@ -40,6 +40,11 @@ extern "C" {
|
|||||||
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
|
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
|
||||||
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
||||||
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
||||||
|
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -114,6 +119,11 @@ extern "C" {
|
|||||||
#else
|
#else
|
||||||
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
|
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,6 +40,11 @@ extern "C" {
|
|||||||
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
||||||
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
||||||
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
|
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||||
|
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
|
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
|
||||||
@ -119,6 +124,11 @@ extern "C" {
|
|||||||
#else
|
#else
|
||||||
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
|
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
|
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
|
||||||
|
@ -40,6 +40,11 @@ extern "C" {
|
|||||||
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
|
||||||
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
|
||||||
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
|
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||||
|
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
|
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
|
||||||
@ -119,6 +124,12 @@ extern "C" {
|
|||||||
#else
|
#else
|
||||||
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
|
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
|
||||||
|
#else
|
||||||
|
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
|
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
|
||||||
|
@ -600,7 +600,8 @@ int
|
|||||||
ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg)
|
ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg)
|
||||||
{
|
{
|
||||||
if(esp_bluedroid_get_status() == ESP_BLUEDROID_STATUS_UNINITIALIZED) {
|
if(esp_bluedroid_get_status() == ESP_BLUEDROID_STATUS_UNINITIALIZED) {
|
||||||
return 0;
|
ble_hci_trans_buf_free(hci_ev);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
uint16_t len = hci_ev[1] + 3;
|
uint16_t len = hci_ev[1] + 3;
|
||||||
uint8_t *data = (uint8_t *)malloc(len);
|
uint8_t *data = (uint8_t *)malloc(len);
|
||||||
|
@ -224,8 +224,9 @@ typedef struct {
|
|||||||
int8_t cca_low_tx_pwr; /*!< Low TX power setting for CCA */
|
int8_t cca_low_tx_pwr; /*!< Low TX power setting for CCA */
|
||||||
uint8_t main_xtal_freq; /*!< Main crystal frequency */
|
uint8_t main_xtal_freq; /*!< Main crystal frequency */
|
||||||
uint8_t version_num; /*!< Version number */
|
uint8_t version_num; /*!< Version number */
|
||||||
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the white list for directed advertising */
|
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the white list for directed advertising */
|
||||||
uint32_t config_magic; /*!< Configuration magic value */
|
uint8_t csa2_select; /*!< Select CSA#2 */
|
||||||
|
uint32_t config_magic; /*!< Configuration magic value */
|
||||||
} esp_bt_controller_config_t;
|
} esp_bt_controller_config_t;
|
||||||
|
|
||||||
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
|
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
|
||||||
@ -277,6 +278,7 @@ typedef struct {
|
|||||||
.main_xtal_freq = CONFIG_XTAL_FREQ, \
|
.main_xtal_freq = CONFIG_XTAL_FREQ, \
|
||||||
.version_num = esp_ble_get_chip_rev_version(), \
|
.version_num = esp_ble_get_chip_rev_version(), \
|
||||||
.ignore_wl_for_direct_adv = 0, \
|
.ignore_wl_for_direct_adv = 0, \
|
||||||
|
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
|
||||||
.config_magic = CONFIG_MAGIC, \
|
.config_magic = CONFIG_MAGIC, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +216,7 @@ typedef struct {
|
|||||||
uint8_t cpu_freq_mhz; /*!< CPU frequency in megahertz (MHz) */
|
uint8_t cpu_freq_mhz; /*!< CPU frequency in megahertz (MHz) */
|
||||||
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the whitelist for direct advertising */
|
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the whitelist for direct advertising */
|
||||||
uint8_t enable_pcl; /*!< Enable power control */
|
uint8_t enable_pcl; /*!< Enable power control */
|
||||||
|
uint8_t csa2_select; /*!< Select CSA#2*/
|
||||||
uint32_t config_magic; /*!< Magic number for configuration validation */
|
uint32_t config_magic; /*!< Magic number for configuration validation */
|
||||||
} esp_bt_controller_config_t;
|
} esp_bt_controller_config_t;
|
||||||
|
|
||||||
@ -270,6 +271,7 @@ typedef struct {
|
|||||||
.cpu_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, \
|
.cpu_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, \
|
||||||
.ignore_wl_for_direct_adv = 0, \
|
.ignore_wl_for_direct_adv = 0, \
|
||||||
.enable_pcl = DEFAULT_BT_LE_POWER_CONTROL_ENABLED, \
|
.enable_pcl = DEFAULT_BT_LE_POWER_CONTROL_ENABLED, \
|
||||||
|
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
|
||||||
.config_magic = CONFIG_MAGIC, \
|
.config_magic = CONFIG_MAGIC, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,6 +220,7 @@ typedef struct {
|
|||||||
uint8_t cpu_freq_mhz; /*!< CPU frequency in megahertz */
|
uint8_t cpu_freq_mhz; /*!< CPU frequency in megahertz */
|
||||||
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the white list for directed advertising */
|
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the white list for directed advertising */
|
||||||
uint8_t enable_pcl; /*!< Enable power control */
|
uint8_t enable_pcl; /*!< Enable power control */
|
||||||
|
uint8_t csa2_select; /*!< Select CSA#2*/
|
||||||
uint32_t config_magic; /*!< Configuration magic value */
|
uint32_t config_magic; /*!< Configuration magic value */
|
||||||
} esp_bt_controller_config_t;
|
} esp_bt_controller_config_t;
|
||||||
|
|
||||||
@ -274,6 +275,7 @@ typedef struct {
|
|||||||
.cpu_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, \
|
.cpu_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, \
|
||||||
.ignore_wl_for_direct_adv = 0, \
|
.ignore_wl_for_direct_adv = 0, \
|
||||||
.enable_pcl = 0, \
|
.enable_pcl = 0, \
|
||||||
|
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
|
||||||
.config_magic = CONFIG_MAGIC, \
|
.config_magic = CONFIG_MAGIC, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,7 +638,6 @@ r_ble_ll_adv_get_local_rpa = 0x40000c30;
|
|||||||
r_ble_ll_adv_get_peer_rpa = 0x40000c34;
|
r_ble_ll_adv_get_peer_rpa = 0x40000c34;
|
||||||
r_ble_ll_adv_hci_set_random_addr = 0x40000c38;
|
r_ble_ll_adv_hci_set_random_addr = 0x40000c38;
|
||||||
r_ble_ll_adv_init = 0x40000c3c;
|
r_ble_ll_adv_init = 0x40000c3c;
|
||||||
r_ble_ll_adv_legacy_pdu_make = 0x40000c40;
|
|
||||||
r_ble_ll_adv_next_chan = 0x40000c44;
|
r_ble_ll_adv_next_chan = 0x40000c44;
|
||||||
r_ble_ll_adv_pdu_make = 0x40000c48;
|
r_ble_ll_adv_pdu_make = 0x40000c48;
|
||||||
r_ble_ll_adv_periodic_check_data_itvl = 0x40000c4c;
|
r_ble_ll_adv_periodic_check_data_itvl = 0x40000c4c;
|
||||||
@ -659,7 +658,6 @@ r_ble_ll_adv_scan_req_rxd = 0x40000c98;
|
|||||||
r_ble_ll_adv_scan_rsp_legacy_pdu_make = 0x40000c9c;
|
r_ble_ll_adv_scan_rsp_legacy_pdu_make = 0x40000c9c;
|
||||||
r_ble_ll_adv_scan_rsp_pdu_make = 0x40000ca0;
|
r_ble_ll_adv_scan_rsp_pdu_make = 0x40000ca0;
|
||||||
r_ble_ll_adv_scheduled = 0x40000ca4;
|
r_ble_ll_adv_scheduled = 0x40000ca4;
|
||||||
r_ble_ll_adv_send_conn_comp_ev = 0x40000ca8;
|
|
||||||
r_ble_ll_adv_set_adv_params = 0x40000cb0;
|
r_ble_ll_adv_set_adv_params = 0x40000cb0;
|
||||||
r_ble_ll_adv_set_enable = 0x40000cb4;
|
r_ble_ll_adv_set_enable = 0x40000cb4;
|
||||||
r_ble_ll_adv_set_random_addr = 0x40000cb8;
|
r_ble_ll_adv_set_random_addr = 0x40000cb8;
|
||||||
@ -695,7 +693,6 @@ r_ble_ll_conn_calc_itvl_ticks = 0x40000d44;
|
|||||||
r_ble_ll_conn_chk_csm_flags = 0x40000d48;
|
r_ble_ll_conn_chk_csm_flags = 0x40000d48;
|
||||||
r_ble_ll_conn_chk_phy_upd_start = 0x40000d4c;
|
r_ble_ll_conn_chk_phy_upd_start = 0x40000d4c;
|
||||||
r_ble_ll_conn_comp_event_send = 0x40000d50;
|
r_ble_ll_conn_comp_event_send = 0x40000d50;
|
||||||
r_ble_ll_conn_connect_ind_pdu_make = 0x40000d54;
|
|
||||||
r_ble_ll_conn_create_cancel = 0x40000d5c;
|
r_ble_ll_conn_create_cancel = 0x40000d5c;
|
||||||
r_ble_ll_conn_cth_flow_enable = 0x40000d64;
|
r_ble_ll_conn_cth_flow_enable = 0x40000d64;
|
||||||
r_ble_ll_conn_cth_flow_error_fn = 0x40000d68;
|
r_ble_ll_conn_cth_flow_error_fn = 0x40000d68;
|
||||||
@ -1104,7 +1101,6 @@ r_ble_lll_conn_free_rx_mbuf = 0x40001518;
|
|||||||
r_ble_lll_conn_get_addr_info_from_rx_buf = 0x4000151c;
|
r_ble_lll_conn_get_addr_info_from_rx_buf = 0x4000151c;
|
||||||
r_ble_lll_conn_get_ce_end_time = 0x40001520;
|
r_ble_lll_conn_get_ce_end_time = 0x40001520;
|
||||||
r_ble_lll_conn_get_next_sched_time = 0x40001524;
|
r_ble_lll_conn_get_next_sched_time = 0x40001524;
|
||||||
r_ble_lll_conn_halt = 0x4000152c;
|
|
||||||
r_ble_lll_conn_master_common_init = 0x40001530;
|
r_ble_lll_conn_master_common_init = 0x40001530;
|
||||||
r_ble_lll_conn_master_new = 0x40001534;
|
r_ble_lll_conn_master_new = 0x40001534;
|
||||||
r_ble_lll_conn_module_reset = 0x40001540;
|
r_ble_lll_conn_module_reset = 0x40001540;
|
||||||
@ -1202,7 +1198,6 @@ r_ble_lll_sched_aux_scan = 0x40001728;
|
|||||||
r_ble_lll_sched_conn_overlap = 0x4000172c;
|
r_ble_lll_sched_conn_overlap = 0x4000172c;
|
||||||
r_ble_lll_sched_dtm = 0x40001738;
|
r_ble_lll_sched_dtm = 0x40001738;
|
||||||
r_ble_lll_sched_execute_item = 0x40001744;
|
r_ble_lll_sched_execute_item = 0x40001744;
|
||||||
r_ble_lll_sched_init = 0x40001748;
|
|
||||||
r_ble_lll_sched_insert_if_empty = 0x4000174c;
|
r_ble_lll_sched_insert_if_empty = 0x4000174c;
|
||||||
r_ble_lll_sched_is_overlap = 0x40001750;
|
r_ble_lll_sched_is_overlap = 0x40001750;
|
||||||
r_ble_lll_sched_master_new = 0x40001754;
|
r_ble_lll_sched_master_new = 0x40001754;
|
||||||
@ -1324,7 +1319,6 @@ r_hal_timer_read = 0x4000197c;
|
|||||||
r_hal_timer_read_tick = 0x40001980;
|
r_hal_timer_read_tick = 0x40001980;
|
||||||
r_hal_timer_set_cb = 0x40001984;
|
r_hal_timer_set_cb = 0x40001984;
|
||||||
r_hal_timer_start = 0x4000198c;
|
r_hal_timer_start = 0x4000198c;
|
||||||
r_hal_timer_stop = 0x40001994;
|
|
||||||
r_hal_timer_task_start = 0x40001998;
|
r_hal_timer_task_start = 0x40001998;
|
||||||
r_ll_assert = 0x4000199c;
|
r_ll_assert = 0x4000199c;
|
||||||
r_mem_init_mbuf_pool = 0x400019a0;
|
r_mem_init_mbuf_pool = 0x400019a0;
|
||||||
|
Loading…
Reference in New Issue
Block a user