fix(ble/bluedroid): Fixed BLE_FEAT_CREATE_SYNC_ENH define error in bluedroid host

(cherry picked from commit cf6135c990)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2025-04-21 17:03:33 +08:00
parent 17e79ef8b6
commit a30d47b6fe
6 changed files with 14 additions and 14 deletions

View File

@ -981,14 +981,14 @@ typedef struct {
esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync: 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. 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. */ 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: esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
0: Reporting initially enabled. 0: Reporting initially enabled.
1: Reporting initially disabled. */ 1: Reporting initially disabled. */
esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
0: Duplicate filtering initially disabled. 0: Duplicate filtering initially disabled.
1: Duplicate filtering initially enabled. */ 1: Duplicate filtering initially enabled. */
#endif #endif // (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH)
uint8_t sid; /*!< SID of the periodic advertising */ uint8_t sid; /*!< SID of the periodic advertising */
esp_ble_addr_type_t addr_type; /*!< Address type 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 */ esp_bd_addr_t addr; /*!< Address of the periodic advertising */

View File

@ -1587,10 +1587,10 @@ typedef struct {
typedef struct { typedef struct {
UINT8 filter_policy; UINT8 filter_policy;
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) #if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
UINT8 reports_disabled; UINT8 reports_disabled;
UINT8 filter_duplicates; UINT8 filter_duplicates;
#endif #endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
UINT8 sid; UINT8 sid;
tBLE_ADDR_TYPE addr_type; tBLE_ADDR_TYPE addr_type;
BD_ADDR addr; BD_ADDR addr;

View File

@ -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.addr_type = arg_5->periodic_adv_create_sync.params.addr_type;
params.skip = arg_5->periodic_adv_create_sync.params.skip; params.skip = arg_5->periodic_adv_create_sync.params.skip;
params.sync_timeout = arg_5->periodic_adv_create_sync.params.sync_timeout; 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.reports_disabled = arg_5->periodic_adv_create_sync.params.reports_disabled;
params.filter_duplicates = arg_5->periodic_adv_create_sync.params.filter_duplicates; 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)); memcpy(params.addr, arg_5->periodic_adv_create_sync.params.addr, sizeof(BD_ADDR));
BTC_TRACE_DEBUG("BTC_GAP_BLE_PERIODIC_ADV_CREATE_SYNC"); BTC_TRACE_DEBUG("BTC_GAP_BLE_PERIODIC_ADV_CREATE_SYNC");

View File

@ -830,10 +830,10 @@ tBTM_STATUS BTM_BlePeriodicAdvCreateSync(tBTM_BLE_Periodic_Sync_Params *params)
if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000) if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000)
|| (params->filter_policy > 0x01) || (params->filter_policy > 0x01)
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) #if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
|| (params->reports_disabled > 0x01) || (params->reports_disabled > 0x01)
|| (params->filter_duplicates > 0x01) || (params->filter_duplicates > 0x01)
#endif #endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
/*If the Periodic Advertiser List is not used, /*If the Periodic Advertiser List is not used,
the Advertising_SID, Advertiser Address_Type, and Advertiser Address the Advertising_SID, Advertiser Address_Type, and Advertiser Address
parameters specify the periodic advertising device to listen to; otherwise they 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); SET_BIT(option, 0);
} }
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) #if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
if (params->reports_disabled) { if (params->reports_disabled) {
SET_BIT(option, 1); SET_BIT(option, 1);
} }
if (params->filter_duplicates) { if (params->filter_duplicates) {
SET_BIT(option, 2); 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, if (!btsnd_hcic_ble_periodic_adv_create_sync(option, params->sid, params->addr_type,
params->addr, params->sync_timeout, 0)) { params->addr, params->sync_timeout, 0)) {

View File

@ -813,10 +813,10 @@ typedef struct {
typedef struct { typedef struct {
UINT8 filter_policy; UINT8 filter_policy;
#if (CONFIG_BT_BLE_FEAT_CREATE_SYNC_ENH) #if (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
UINT8 reports_disabled; UINT8 reports_disabled;
UINT8 filter_duplicates; UINT8 filter_duplicates;
#endif #endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
UINT8 sid; UINT8 sid;
tBLE_ADDR_TYPE addr_type; tBLE_ADDR_TYPE addr_type;
BD_ADDR addr; BD_ADDR addr;

View File

@ -243,14 +243,14 @@ typedef struct {
esp_ble_gap_sync_t filter_policy; /*!< Configures the filter policy for periodic advertising sync: 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. 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. */ 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: esp_ble_gap_sync_t reports_disabled; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
0: Reporting initially enabled. 0: Reporting initially enabled.
1: Reporting initially disabled. */ 1: Reporting initially disabled. */
esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig: esp_ble_gap_sync_t filter_duplicates; /*!< Supported only by esp32c2, esp32c6, and esp32h2; can be set by menuconfig:
0: Duplicate filtering initially disabled. 0: Duplicate filtering initially disabled.
1: Duplicate filtering initially enabled. */ 1: Duplicate filtering initially enabled. */
#endif #endif // (BLE_FEAT_CREATE_SYNC_ENH == TRUE)
uint8_t sid; /*!< SID of the periodic advertising */ uint8_t sid; /*!< SID of the periodic advertising */
esp_ble_addr_type_t addr_type; /*!< Address type 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 */ esp_bd_addr_t addr; /*!< Address of the periodic advertising */