Skip to content

Commit

Permalink
ESP32: Update to ESP-IDF 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Dec 27, 2020
1 parent 3b818c3 commit 4f2fc3d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
23 changes: 11 additions & 12 deletions mos_esp32.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
build_vars:
ESP_IDF_EXTRA_COMPONENTS: "${build_vars.ESP_IDF_EXTRA_COMPONENTS} bt"
ESP_IDF_EXTRA_COMPONENTS: "${build_vars.ESP_IDF_EXTRA_COMPONENTS} bt esp_wifi wpa_supplicant"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_BT_ENABLED=y
CONFIG_BLUEDROID_ENABLED=y
CONFIG_BTC_TASK_STACK_SIZE=6144
CONFIG_BLUEDROID_MEM_DEBUG=
CONFIG_CLASSIC_BT_ENABLED=
CONFIG_BT_DRAM_RELEASE=y
CONFIG_GATTS_ENABLE=y
CONFIG_GATTC_ENABLE=y
CONFIG_BLE_SMP_ENABLE=y
CONFIG_BT_STACK_NO_LOG=
CONFIG_BT_ACL_CONNECTIONS=4
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y
CONFIG_BT_BLE_SMP_ENABLE=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_BTC_TASK_STACK_SIZE=6144
CONFIG_BT_CLASSIC_ENABLED=n
CONFIG_BT_DRAM_RELEASE=y
CONFIG_BT_ENABLED=y
CONFIG_BT_GATTS_ENABLE=y
CONFIG_BT_GATTC_ENABLE=y
CONFIG_BTDM_CONTROLLER_RUN_CPU=0
CONFIG_SMP_ENABLE=y
CONFIG_BT_SMP_ENABLE=y
CONFIG_BT_RESERVE_DRAM=0x10000
# Control verbose debugging for various BT modules.
Expand Down
6 changes: 6 additions & 0 deletions src/esp32/esp32_bt_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ static void esp32_gap_ev_handler(esp_gap_ble_cb_event_t ev,
p->status, p->subcode));
break;
}
case ESP_GAP_BLE_SET_CHANNELS_EVT: {
const struct ble_set_channels_evt_param *p = &ep->ble_set_channels;
enum cs_log_level ll = ll_from_status(p->stat);
LOG(ll, ("SET_CHANNELS st %d", p->stat));
break;
}
case ESP_GAP_BLE_EVT_MAX: {
break;
}
Expand Down
6 changes: 6 additions & 0 deletions src/esp32/esp32_bt_gattc.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ static void esp32_bt_gattc_ev(esp_gattc_cb_event_t ev, esp_gatt_if_t iface,
LOG(ll, ("GET_ADDR_LIST st %d num_addr %u", p->status, p->num_addr));
break;
}
case ESP_GATTC_DIS_SRVC_CMPL_EVT: {
const struct gattc_dis_srvc_cmpl_evt_param *p = &ep->dis_srvc_cmpl;
enum cs_log_level ll = ll_from_status(p->status);
LOG(ll, ("DIS_SRVC_CMPL st %d cid %u", p->status, p->conn_id));
break;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/esp32/esp32_bt_gatts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ void mgos_bt_gatts_notify(struct mgos_bt_gatts_conn *gsc,
if (gsc == NULL || mode == MGOS_BT_GATT_NOTIFY_MODE_OFF) return;
struct esp32_bt_gatts_session_entry *sse =
find_session(s_gatts_if, gsc->gc.conn_id, handle, NULL);
if (sse == NULL) return false;
if (sse == NULL) return;
struct esp32_bt_gatts_pending_ind *pi = calloc(1, sizeof(*pi));
if (pi != NULL) {
pi->handle = handle;
Expand Down

0 comments on commit 4f2fc3d

Please sign in to comment.