Merge branch 'feature/btdm_ble_bt_separa' into 'master'
Feature/btdm ble bt separa @Jack @snake @igrokhotkov @angus @island please help to review the code. Separate the bt/ble code. After the separate, can save 15k~25k ram & 240k~460k code size(depending on the menuconfig). See merge request !684
This commit is contained in:
@@ -291,7 +291,7 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
|
||||
switch (event) {
|
||||
case ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT: {
|
||||
//the unit of the duration is second
|
||||
uint32_t duration = 10;
|
||||
uint32_t duration = 30;
|
||||
esp_ble_gap_start_scanning(duration);
|
||||
break;
|
||||
}
|
||||
@@ -316,7 +316,6 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
|
||||
for (int j = 0; j < adv_name_len; j++) {
|
||||
ESP_LOGI(GATTC_TAG, "%c", adv_name[j]);
|
||||
}
|
||||
|
||||
if (adv_name != NULL) {
|
||||
if (strlen(device_name) == adv_name_len && strncmp((char *)adv_name, device_name, adv_name_len) == 0) {
|
||||
ESP_LOGI(GATTC_TAG, "Searched device %s\n", device_name);
|
||||
|
||||
@@ -259,7 +259,7 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i
|
||||
case ESP_GATTS_STOP_EVT:
|
||||
break;
|
||||
case ESP_GATTS_CONNECT_EVT:
|
||||
ESP_LOGI(GATTS_TAG, "SERVICE_START_EVT, conn_id %d, remote %02x:%02x:%02x:%02x:%02x:%02x:, is_conn %d\n",
|
||||
ESP_LOGI(GATTS_TAG, "ESP_GATTS_CONNECT_EVT, conn_id %d, remote %02x:%02x:%02x:%02x:%02x:%02x:, is_conn %d\n",
|
||||
param->connect.conn_id,
|
||||
param->connect.remote_bda[0], param->connect.remote_bda[1], param->connect.remote_bda[2],
|
||||
param->connect.remote_bda[3], param->connect.remote_bda[4], param->connect.remote_bda[5],
|
||||
|
||||
Reference in New Issue
Block a user