mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(ble/bluedroid): Support BLE50 instance in related event
This commit is contained in:
parent
3465bb0367
commit
67e1325377
@ -880,6 +880,10 @@ typedef uint8_t esp_ble_gap_adv_type_t;
|
|||||||
/// Extend advertising tx power, range: [-127, +126] dBm
|
/// Extend advertising tx power, range: [-127, +126] dBm
|
||||||
#define EXT_ADV_TX_PWR_NO_PREFERENCE (127) /*!< host has no preference for tx power */
|
#define EXT_ADV_TX_PWR_NO_PREFERENCE (127) /*!< host has no preference for tx power */
|
||||||
|
|
||||||
|
|
||||||
|
/// max number of advertising sets to enable or disable
|
||||||
|
#define EXT_ADV_NUM_SETS_MAX (10) /*!< max evt instance num */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ext adv parameters
|
* @brief ext adv parameters
|
||||||
*/
|
*/
|
||||||
@ -1290,72 +1294,86 @@ typedef union {
|
|||||||
*/
|
*/
|
||||||
struct ble_ext_adv_set_rand_addr_cmpl_evt_param {
|
struct ble_ext_adv_set_rand_addr_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate extend advertising random address set status */
|
esp_bt_status_t status; /*!< Indicate extend advertising random address set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} ext_adv_set_rand_addr; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT */
|
} ext_adv_set_rand_addr; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_set_params_cmpl_evt_param {
|
struct ble_ext_adv_set_params_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate extend advertising parameters set status */
|
esp_bt_status_t status; /*!< Indicate extend advertising parameters set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} ext_adv_set_params; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT */
|
} ext_adv_set_params; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_data_set_cmpl_evt_param {
|
struct ble_ext_adv_data_set_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate extend advertising data set status */
|
esp_bt_status_t status; /*!< Indicate extend advertising data set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} ext_adv_data_set; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT */
|
} ext_adv_data_set; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_scan_rsp_set_cmpl_evt_param {
|
struct ble_ext_adv_scan_rsp_set_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate extend advertising scan response data set status */
|
esp_bt_status_t status; /*!< Indicate extend advertising scan response data set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} scan_rsp_set; /*!< Event parameter of ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT */
|
} scan_rsp_set; /*!< Event parameter of ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_start_cmpl_evt_param {
|
struct ble_ext_adv_start_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate advertising start operation success status */
|
esp_bt_status_t status; /*!< Indicate advertising start operation success status */
|
||||||
|
uint8_t instance_num; /*!< extend advertising handle numble*/
|
||||||
|
uint8_t instance[EXT_ADV_NUM_SETS_MAX]; /*!< extend advertising handle list*/
|
||||||
} ext_adv_start; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT */
|
} ext_adv_start; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_stop_cmpl_evt_param {
|
struct ble_ext_adv_stop_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
||||||
|
uint8_t instance_num; /*!< extend advertising handle numble*/
|
||||||
|
uint8_t instance[EXT_ADV_NUM_SETS_MAX]; /*!< extend advertising handle list*/
|
||||||
} ext_adv_stop; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT */
|
} ext_adv_stop; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_set_remove_cmpl_evt_param {
|
struct ble_ext_adv_set_remove_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} ext_adv_remove; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT */
|
} ext_adv_remove; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_ext_adv_set_clear_cmpl_evt_param {
|
struct ble_ext_adv_set_clear_cmpl_evt_param {
|
||||||
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
esp_bt_status_t status; /*!< Indicate advertising stop operation success status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} ext_adv_clear; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT */
|
} ext_adv_clear; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_periodic_adv_set_params_cmpl_param {
|
struct ble_periodic_adv_set_params_cmpl_param {
|
||||||
esp_bt_status_t status; /*!< Indicate periodic advertisingparameters set status */
|
esp_bt_status_t status; /*!< Indicate periodic advertisingparameters set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} peroid_adv_set_params; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT */
|
} peroid_adv_set_params; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_periodic_adv_data_set_cmpl_param {
|
struct ble_periodic_adv_data_set_cmpl_param {
|
||||||
esp_bt_status_t status; /*!< Indicate periodic advertising data set status */
|
esp_bt_status_t status; /*!< Indicate periodic advertising data set status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} period_adv_data_set; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT */
|
} period_adv_data_set; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_periodic_adv_start_cmpl_param {
|
struct ble_periodic_adv_start_cmpl_param {
|
||||||
esp_bt_status_t status; /*!< Indicate periodic advertising start status */
|
esp_bt_status_t status; /*!< Indicate periodic advertising start status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} period_adv_start; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT */
|
} period_adv_start; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT
|
||||||
*/
|
*/
|
||||||
struct ble_periodic_adv_stop_cmpl_param {
|
struct ble_periodic_adv_stop_cmpl_param {
|
||||||
esp_bt_status_t status; /*!< Indicate periodic advertising stop status */
|
esp_bt_status_t status; /*!< Indicate periodic advertising stop status */
|
||||||
|
uint8_t instance; /*!< extend advertising handle */
|
||||||
} period_adv_stop; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT */
|
} period_adv_stop; /*!< Event parameter of ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT */
|
||||||
/**
|
/**
|
||||||
* @brief ESP_GAP_BLE_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT
|
* @brief ESP_GAP_BLE_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT
|
||||||
|
@ -982,34 +982,48 @@ static void btc_ble_5_gap_callback(tBTA_DM_BLE_5_GAP_EVENT event,
|
|||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT;
|
||||||
param.ext_adv_set_rand_addr.status = btc_btm_status_to_esp_status(params->set_ext_rand_addr.status);
|
param.ext_adv_set_rand_addr.status = btc_btm_status_to_esp_status(params->set_ext_rand_addr.status);
|
||||||
|
param.ext_adv_set_rand_addr.instance = params->set_ext_rand_addr.instance;
|
||||||
break;
|
break;
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_PARAMS_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_PARAMS_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT;
|
||||||
param.ext_adv_set_rand_addr.status = btc_btm_status_to_esp_status(params->set_params.status);
|
param.ext_adv_set_params.status = btc_btm_status_to_esp_status(params->set_params.status);
|
||||||
|
param.ext_adv_set_params.instance = params->set_params.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_DATA_SET_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_EXT_ADV_DATA_SET_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT;
|
||||||
param.ext_adv_data_set.status = btc_btm_status_to_esp_status(params->adv_data_set.status);
|
param.ext_adv_data_set.status = btc_btm_status_to_esp_status(params->adv_data_set.status);
|
||||||
|
param.ext_adv_data_set.instance = params->adv_data_set.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT;
|
||||||
param.scan_rsp_set.status = btc_btm_status_to_esp_status(params->scan_rsp_data_set.status);
|
param.scan_rsp_set.status = btc_btm_status_to_esp_status(params->scan_rsp_data_set.status);
|
||||||
|
param.scan_rsp_set.instance = params->scan_rsp_data_set.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_START_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_EXT_ADV_START_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT;
|
||||||
param.ext_adv_start.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
param.ext_adv_start.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
||||||
|
for (UINT8 i = 0; i < params->adv_start.instance_num; i++) {
|
||||||
|
param.ext_adv_start.instance[i] = params->adv_start.instance[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
param.ext_adv_start.instance_num = params->adv_start.instance_num;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_STOP_COMPLETE_EVT:
|
case BTA_DM_BLE_5_GAP_EXT_ADV_STOP_COMPLETE_EVT:
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT;
|
||||||
param.ext_adv_stop.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
param.ext_adv_stop.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
||||||
|
for (UINT8 i = 0; i < params->adv_start.instance_num; i++) {
|
||||||
|
param.ext_adv_stop.instance[i] = params->adv_start.instance[i];
|
||||||
|
}
|
||||||
|
param.ext_adv_stop.instance_num = params->adv_start.instance_num;
|
||||||
break;
|
break;
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_REMOVE_COMPLETE_EVT:
|
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_REMOVE_COMPLETE_EVT:
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT;
|
||||||
param.ext_adv_remove.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
param.ext_adv_remove.status = btc_btm_status_to_esp_status(params->adv_start.status);
|
||||||
|
param.ext_adv_remove.instance = params->adv_start.instance[0];
|
||||||
break;
|
break;
|
||||||
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_CLEAR_COMPLETE_EVT:
|
case BTA_DM_BLE_5_GAP_EXT_ADV_SET_CLEAR_COMPLETE_EVT:
|
||||||
msg.act = ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT;
|
||||||
@ -1018,21 +1032,25 @@ static void btc_ble_5_gap_callback(tBTA_DM_BLE_5_GAP_EVENT event,
|
|||||||
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT;
|
||||||
param.peroid_adv_set_params.status = btc_btm_status_to_esp_status(params->per_adv_set_params.status);
|
param.peroid_adv_set_params.status = btc_btm_status_to_esp_status(params->per_adv_set_params.status);
|
||||||
|
param.peroid_adv_set_params.instance = params->per_adv_set_params.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_DATA_SET_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_DATA_SET_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT;
|
||||||
param.period_adv_data_set.status = btc_btm_status_to_esp_status(params->per_adv_data_set.status);
|
param.period_adv_data_set.status = btc_btm_status_to_esp_status(params->per_adv_data_set.status);
|
||||||
|
param.period_adv_data_set.instance = params->per_adv_data_set.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_START_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_START_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT;
|
||||||
param.period_adv_start.status = btc_btm_status_to_esp_status(params->per_adv_start.status);
|
param.period_adv_start.status = btc_btm_status_to_esp_status(params->per_adv_start.status);
|
||||||
|
param.period_adv_start.instance = params->per_adv_start.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_STOP_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_STOP_COMPLETE_EVT: {
|
||||||
msg.act = ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT;
|
msg.act = ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT;
|
||||||
param.period_adv_stop.status = btc_btm_status_to_esp_status(params->per_adv_stop.status);
|
param.period_adv_stop.status = btc_btm_status_to_esp_status(params->per_adv_stop.status);
|
||||||
|
param.period_adv_stop.instance = params->per_adv_stop.instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT: {
|
case BTA_DM_BLE_5_GAP_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT: {
|
||||||
|
@ -340,8 +340,8 @@ tBTM_STATUS BTM_BleSetExtendedAdvRandaddr(UINT8 instance, BD_ADDR rand_addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
cb_params.status = status;
|
cb_params.set_ext_rand_addr.status = status;
|
||||||
|
cb_params.set_ext_rand_addr.instance = instance;
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -420,7 +420,8 @@ end:
|
|||||||
BTM_UpdateAddrInfor(BLE_ADDR_RANDOM, rand_addr);
|
BTM_UpdateAddrInfor(BLE_ADDR_RANDOM, rand_addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cb_params.status = status;
|
cb_params.set_params.status = status;
|
||||||
|
cb_params.set_params.instance = instance;
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_PARAMS_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_PARAMS_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -471,7 +472,14 @@ tBTM_STATUS BTM_BleConfigExtendedAdvDataRaw(BOOLEAN is_scan_rsp, UINT8 instance,
|
|||||||
} while (rem_len);
|
} while (rem_len);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
cb_params.status = status;
|
if (is_scan_rsp) {
|
||||||
|
cb_params.scan_rsp_data_set.status = status;
|
||||||
|
cb_params.scan_rsp_data_set.instance = instance;
|
||||||
|
} else {
|
||||||
|
cb_params.adv_data_set.status = status;
|
||||||
|
cb_params.adv_data_set.instance = instance;
|
||||||
|
}
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(is_scan_rsp ? BTM_BLE_5_GAP_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT : BTM_BLE_5_GAP_EXT_ADV_DATA_SET_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(is_scan_rsp ? BTM_BLE_5_GAP_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT : BTM_BLE_5_GAP_EXT_ADV_DATA_SET_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -574,7 +582,12 @@ end:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cb_params.status = status;
|
cb_params.adv_start.status = status;
|
||||||
|
cb_params.adv_start.instance_num = num;
|
||||||
|
for (uint8_t i = 0; i < num; i++) {
|
||||||
|
cb_params.adv_start.instance[i] = ext_adv[i].instance;
|
||||||
|
}
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(enable ? BTM_BLE_5_GAP_EXT_ADV_START_COMPLETE_EVT : BTM_BLE_5_GAP_EXT_ADV_STOP_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(enable ? BTM_BLE_5_GAP_EXT_ADV_START_COMPLETE_EVT : BTM_BLE_5_GAP_EXT_ADV_STOP_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -629,7 +642,9 @@ tBTM_STATUS BTM_BleExtAdvSetRemove(UINT8 instance)
|
|||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
cb_params.status = status;
|
cb_params.adv_start.status = status;
|
||||||
|
cb_params.adv_start.instance_num = 1;
|
||||||
|
cb_params.adv_start.instance[0] = instance;
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_REMOVE_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_REMOVE_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
@ -655,7 +670,7 @@ tBTM_STATUS BTM_BleExtAdvSetClear(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cb_params.status = status;
|
cb_params.adv_start.status = status;
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_CLEAR_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_EXT_ADV_SET_CLEAR_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
@ -693,7 +708,8 @@ tBTM_STATUS BTM_BlePeriodicAdvSetParams(UINT8 instance, tBTM_BLE_Periodic_Adv_Pa
|
|||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
cb_params.status = status;
|
cb_params.per_adv_set_params.status = status;
|
||||||
|
cb_params.per_adv_set_params.instance = instance;
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
@ -747,7 +763,9 @@ tBTM_STATUS BTM_BlePeriodicAdvCfgDataRaw(UINT8 instance, UINT16 len, UINT8 *data
|
|||||||
} while(rem_len);
|
} while(rem_len);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
cb_params.status = status;
|
cb_params.per_adv_data_set.status = status;
|
||||||
|
cb_params.per_adv_data_set.instance = instance;
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(BTM_BLE_5_GAP_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -771,8 +789,13 @@ tBTM_STATUS BTM_BlePeriodicAdvEnable(UINT8 instance, UINT8 enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
if (enable) {
|
||||||
cb_params.status = status;
|
cb_params.per_adv_start.status = status;
|
||||||
|
cb_params.per_adv_start.instance = instance;
|
||||||
|
} else {
|
||||||
|
cb_params.per_adv_stop.status = status;
|
||||||
|
cb_params.per_adv_stop.instance = instance;
|
||||||
|
}
|
||||||
|
|
||||||
BTM_ExtBleCallbackTrigger(enable ? BTM_BLE_5_GAP_PERIODIC_ADV_START_COMPLETE_EVT : BTM_BLE_5_GAP_PERIODIC_ADV_STOP_COMPLETE_EVT, &cb_params);
|
BTM_ExtBleCallbackTrigger(enable ? BTM_BLE_5_GAP_PERIODIC_ADV_START_COMPLETE_EVT : BTM_BLE_5_GAP_PERIODIC_ADV_STOP_COMPLETE_EVT, &cb_params);
|
||||||
|
|
||||||
|
@ -1100,46 +1100,58 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_SET_PERF_PHY_CMPL;
|
} tBTM_BLE_SET_PERF_PHY_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_EXT_ADV_SET_RAND_ADDR_CMPL;
|
} tBTM_BLE_EXT_ADV_SET_RAND_ADDR_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_EXT_ADV_SET_PARAMS_CMPL;
|
} tBTM_BLE_EXT_ADV_SET_PARAMS_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_EXT_ADV_DATA_SET_CMPL;
|
} tBTM_BLE_EXT_ADV_DATA_SET_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_EXT_ADV_SCAN_RSP_DATA_SET_CMPL;
|
} tBTM_BLE_EXT_ADV_SCAN_RSP_DATA_SET_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance_num;
|
||||||
|
UINT8 instance[10];
|
||||||
} tBTM_BLE_EXT_ADV_START_CMPL;
|
} tBTM_BLE_EXT_ADV_START_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_EXT_ADV_STOP_CMPL;
|
} tBTM_BLE_EXT_ADV_STOP_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_PERIOD_ADV_SET_PARAMS_CMPL;
|
} tBTM_BLE_PERIOD_ADV_SET_PARAMS_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_PERIOD_ADV_DATA_SET_CMPL;
|
} tBTM_BLE_PERIOD_ADV_DATA_SET_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_PERIOD_ADV_START_CMPL;
|
} tBTM_BLE_PERIOD_ADV_START_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT8 status;
|
UINT8 status;
|
||||||
|
UINT8 instance;
|
||||||
} tBTM_BLE_PERIOD_ADV_STOP_CMPL;
|
} tBTM_BLE_PERIOD_ADV_STOP_CMPL;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
|
|
||||||
#define LOG_TAG "MULTI_ADV_DEMO"
|
#define LOG_TAG "PERIODIC_ADV_DEMO"
|
||||||
|
|
||||||
#define FUNC_SEND_WAIT_SEM(func, sem) do {\
|
#define FUNC_SEND_WAIT_SEM(func, sem) do {\
|
||||||
esp_err_t __err_rc = (func);\
|
esp_err_t __err_rc = (func);\
|
||||||
@ -99,39 +99,39 @@ static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param
|
|||||||
switch (event) {
|
switch (event) {
|
||||||
case ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, status %d", param->ext_adv_set_rand_addr.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, status %d, instance %d", param->ext_adv_set_rand_addr.status, param->ext_adv_set_rand_addr.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT, status %d", param->ext_adv_set_params.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT, status %d, instance %d", param->ext_adv_set_params.status, param->ext_adv_set_params.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT, status %d", param->ext_adv_data_set.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->ext_adv_data_set.status, param->ext_adv_data_set.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT, status %d", param->scan_rsp_set.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->scan_rsp_set.status, param->scan_rsp_set.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT, status %d", param->ext_adv_start.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT, status %d, instance numble %d", param->ext_adv_start.status, param->ext_adv_start.instance_num);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT:
|
case ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT, status %d", param->ext_adv_stop.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT, status %d, instance numble %d", param->ext_adv_stop.status, param->ext_adv_stop.instance_num);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT:
|
case ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, status %d", param->peroid_adv_set_params.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, status %d, instance %d", param->peroid_adv_set_params.status, param->peroid_adv_set_params.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT:
|
case ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, status %d", param->period_adv_data_set.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->period_adv_data_set.status, param->period_adv_data_set.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT:
|
case ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT, status %d", param->period_adv_start.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT, status %d, instance %d", param->period_adv_start.status, param->period_adv_start.instance);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -256,46 +256,44 @@ Once the Extended advertising data have been set, the GAP event `ESP_GAP_BLE_EXT
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
|
|
||||||
static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param){
|
static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
|
||||||
switch (event) {
|
{
|
||||||
case ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
switch (event) {
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, status %d", param->ext _adv_set_rand_addr.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, status %d, instance %d", param->ext_adv_set_rand_addr.status, param->ext_adv_set_rand_addr.instance);
|
||||||
case ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT, status %d", param->ext_adv_set_params.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT, status %d, instance %d", param->ext_adv_set_params.status, param->ext_adv_set_params.instance);
|
||||||
case ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT, status %d", param->ext_adv_data_set.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->ext_adv_data_set.status, param->ext_adv_data_set.instance);
|
||||||
case ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT, status %d", param->scan_rsp_set.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->scan_rsp_set.status, param->scan_rsp_set.instance);
|
||||||
case ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT, status %d", param->ext_adv_start.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT, status %d, instance numble %d", param->ext_adv_start.status, param->ext_adv_start.instance_num);
|
||||||
case ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT, status %d", param->ext_adv_stop.status);
|
xSemaphoreGive(test_sem);
|
||||||
break;
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT, status %d, instance numble %d", param->ext_adv_stop.status, param->ext_adv_stop.instance_num);
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT:
|
break;
|
||||||
xSemaphoreGive(test_sem);
|
case ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT:
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, status %d", param->p
|
xSemaphoreGive(test_sem);
|
||||||
eroid_adv_set_params.status);
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, status %d, instance %d", param->peroid_adv_set_params.status, param->peroid_adv_set_params.instance);
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT:
|
case ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, status %d", param->per
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, status %d, instance %d", param->period_adv_data_set.status, param->period_adv_data_set.instance);
|
||||||
iod_adv_data_set.status);
|
|
||||||
break;
|
break;
|
||||||
case ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT:
|
case ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT:
|
||||||
xSemaphoreGive(test_sem);
|
xSemaphoreGive(test_sem);
|
||||||
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT, status %d", param->period
|
ESP_LOGI(LOG_TAG, "ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT, status %d, instance %d", param->period_adv_start.status, param->period_adv_start.instance);
|
||||||
_adv_start.status);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user