Skip to content

Commit cf6135c

Browse files
fix(ble/bluedroid): Fixed BLE_FEAT_CREATE_SYNC_ENH define error in bluedroid host
1 parent 4f3e643 commit cf6135c

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,14 +982,14 @@ typedef struct {
982982
esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync:
983983
0: Use Advertising SID, Advertiser Address Type, and Advertiser Address parameters to determine the advertiser to listen to.
984984
1: Use the Periodic Advertiser List to determine the advertiser to listen to. */
985-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
985+
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
986986
esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
987987
0: Reporting initially enabled.
988988
1: Reporting initially disabled. */
989989
esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
990990
0: Duplicate filtering initially disabled.
991991
1: Duplicate filtering initially enabled. */
992-
#endif
992+
#endif // (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
993993
uint8_t sid; /*!< SID of the periodic advertising */
994994
esp_ble_addr_type_t addr_type; /*!< Address type of the periodic advertising */
995995
esp_bd_addr_t addr; /*!< Address of the periodic advertising */

components/bt/host/bluedroid/bta/include/bta/bta_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,10 +1589,10 @@ typedef struct {
15891589

15901590
typedef struct {
15911591
UINT8 filter_policy;
1592-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
1592+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
15931593
UINT8 reports_disabled;
15941594
UINT8 filter_duplicates;
1595-
#endif
1595+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
15961596
UINT8 sid;
15971597
tBLE_ADDR_TYPE addr_type;
15981598
BD_ADDR addr;

components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,10 +2493,10 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
24932493
params.addr_type = arg_5->periodic_adv_create_sync.params.addr_type;
24942494
params.skip = arg_5->periodic_adv_create_sync.params.skip;
24952495
params.sync_timeout = arg_5->periodic_adv_create_sync.params.sync_timeout;
2496-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
2496+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
24972497
params.reports_disabled = arg_5->periodic_adv_create_sync.params.reports_disabled;
24982498
params.filter_duplicates = arg_5->periodic_adv_create_sync.params.filter_duplicates;
2499-
#endif
2499+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
25002500

25012501
memcpy(params.addr, arg_5->periodic_adv_create_sync.params.addr, sizeof(BD_ADDR));
25022502
BTC_TRACE_DEBUG("BTC_GAP_BLE_PERIODIC_ADV_CREATE_SYNC");

components/bt/host/bluedroid/stack/btm/btm_ble_5_gap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,10 +830,10 @@ tBTM_STATUS BTM_BlePeriodicAdvCreateSync(tBTM_BLE_Periodic_Sync_Params *params)
830830

831831
if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000)
832832
|| (params->filter_policy > 0x01)
833-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
833+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
834834
|| (params->reports_disabled > 0x01)
835835
|| (params->filter_duplicates > 0x01)
836-
#endif
836+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
837837
/*If the Periodic Advertiser List is not used,
838838
the Advertising_SID, Advertiser Address_Type, and Advertiser Address
839839
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)
850850
SET_BIT(option, 0);
851851
}
852852

853-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
853+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
854854
if (params->reports_disabled) {
855855
SET_BIT(option, 1);
856856
}
857857
if (params->filter_duplicates) {
858858
SET_BIT(option, 2);
859859
}
860-
#endif
860+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
861861

862862
if (!btsnd_hcic_ble_periodic_adv_create_sync(option, params->sid, params->addr_type,
863863
params->addr, params->sync_timeout, 0)) {

components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,10 +813,10 @@ typedef struct {
813813

814814
typedef struct {
815815
UINT8 filter_policy;
816-
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
816+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
817817
UINT8 reports_disabled;
818818
UINT8 filter_duplicates;
819-
#endif
819+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
820820
UINT8 sid;
821821
tBLE_ADDR_TYPE addr_type;
822822
BD_ADDR addr;

examples/bluetooth/bluedroid/ble_50/periodic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ typedef struct {
243243
esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync:
244244
0: Use Advertising SID, Advertiser Address Type, and Advertiser Address parameters to determine the advertiser to listen to.
245245
1: Use the Periodic Advertiser List to determine the advertiser to listen to. */
246-
#if (BLE_FEAT_CREATE_SYNC_ENH)
246+
#if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
247247
esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
248248
0: Reporting initially enabled.
249249
1: Reporting initially disabled. */
250250
esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
251251
0: Duplicate filtering initially disabled.
252252
1: Duplicate filtering initially enabled. */
253-
#endif
253+
#endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
254254
uint8_t sid; /*!< SID of the periodic advertising */
255255
esp_ble_addr_type_t addr_type; /*!< Address type of the periodic advertising */
256256
esp_bd_addr_t addr; /*!< Address of the periodic advertising */

0 commit comments

Comments
 (0)