diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h index 90864bd69b..9ee0e76ff2 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h @@ -981,14 +981,14 @@ typedef struct { esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync: 0: Use Advertising SID, Advertiser Address Type, and Advertiser Address parameters to determine the advertiser to listen to. 1: Use the Periodic Advertiser List to determine the advertiser to listen to. */ - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: 0: Reporting initially enabled. 1: Reporting initially disabled. */ esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: 0: Duplicate filtering initially disabled. 1: Duplicate filtering initially enabled. */ - #endif +#endif // (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) uint8_t sid; /*!< SID of the periodic advertising */ esp_ble_addr_type_t addr_type; /*!< Address type of the periodic advertising */ esp_bd_addr_t addr; /*!< Address of the periodic advertising */ diff --git a/components/bt/host/bluedroid/bta/include/bta/bta_api.h b/components/bt/host/bluedroid/bta/include/bta/bta_api.h index 91f060035e..722d0beb62 100644 --- a/components/bt/host/bluedroid/bta/include/bta/bta_api.h +++ b/components/bt/host/bluedroid/bta/include/bta/bta_api.h @@ -1587,10 +1587,10 @@ typedef struct { typedef struct { UINT8 filter_policy; - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) UINT8 reports_disabled; UINT8 filter_duplicates; - #endif +#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) UINT8 sid; tBLE_ADDR_TYPE addr_type; BD_ADDR addr; diff --git a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c index 1a80df50b1..471669dd8e 100644 --- a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c +++ b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c @@ -2467,10 +2467,10 @@ void btc_gap_ble_call_handler(btc_msg_t *msg) params.addr_type = arg_5->periodic_adv_create_sync.params.addr_type; params.skip = arg_5->periodic_adv_create_sync.params.skip; params.sync_timeout = arg_5->periodic_adv_create_sync.params.sync_timeout; - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) params.reports_disabled = arg_5->periodic_adv_create_sync.params.reports_disabled; params.filter_duplicates = arg_5->periodic_adv_create_sync.params.filter_duplicates; - #endif +#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) memcpy(params.addr, arg_5->periodic_adv_create_sync.params.addr, sizeof(BD_ADDR)); BTC_TRACE_DEBUG("BTC_GAP_BLE_PERIODIC_ADV_CREATE_SYNC"); diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_5_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_5_gap.c index f2dcad5de6..28f810c1b3 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_5_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_5_gap.c @@ -830,10 +830,10 @@ tBTM_STATUS BTM_BlePeriodicAdvCreateSync(tBTM_BLE_Periodic_Sync_Params *params) if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000) || (params->filter_policy > 0x01) - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) || (params->reports_disabled > 0x01) || (params->filter_duplicates > 0x01) - #endif +#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) /*If the Periodic Advertiser List is not used, the Advertising_SID, Advertiser Address_Type, and Advertiser Address parameters specify the periodic advertising device to listen to; otherwise they @@ -850,14 +850,14 @@ tBTM_STATUS BTM_BlePeriodicAdvCreateSync(tBTM_BLE_Periodic_Sync_Params *params) SET_BIT(option, 0); } - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) if (params->reports_disabled) { SET_BIT(option, 1); } if (params->filter_duplicates) { SET_BIT(option, 2); } - #endif +#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) if (!btsnd_hcic_ble_periodic_adv_create_sync(option, params->sid, params->addr_type, params->addr, params->sync_timeout, 0)) { diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h index fbad343cfb..b0b59f430c 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h @@ -813,10 +813,10 @@ typedef struct { typedef struct { UINT8 filter_policy; - #if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) +#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) UINT8 reports_disabled; UINT8 filter_duplicates; - #endif +#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) UINT8 sid; tBLE_ADDR_TYPE addr_type; BD_ADDR addr; diff --git a/examples/bluetooth/bluedroid/ble_50/periodic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble_50/periodic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md index 8b5924a556..c53b9b3045 100644 --- a/examples/bluetooth/bluedroid/ble_50/periodic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble_50/periodic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md @@ -243,14 +243,14 @@ typedef struct { esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync: 0: Use Advertising SID, Advertiser Address Type, and Advertiser Address parameters to determine the advertiser to listen to. 1: Use the Periodic Advertiser List to determine the advertiser to listen to. */ - #if (BLE_FEAT_CREATE_SYNC_ENH) + #if (BLE_FEAT_CREATE_SYNC_ENH == TRUE) esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: 0: Reporting initially enabled. 1: Reporting initially disabled. */ esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: 0: Duplicate filtering initially disabled. 1: Duplicate filtering initially enabled. */ - #endif + #endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE) uint8_t sid; /*!< SID of the periodic advertising */ esp_ble_addr_type_t addr_type; /*!< Address type of the periodic advertising */ esp_bd_addr_t addr; /*!< Address of the periodic advertising */