1 /*
2  * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "btc/btc_task.h"
8 #include "btc/btc_main.h"
9 #include "btc/btc_dm.h"
10 #include "osi/future.h"
11 #include "esp_err.h"
12 #include "btc/btc_config.h"
13 #include "osi/alarm.h"
14 #include "btc/btc_ble_storage.h"
15 #include "btc_gatt_common.h"
16 #include "bta/bta_gatt_common.h"
17 
18 
btc_set_local_mtu(uint16_t mtu)19 static void btc_set_local_mtu(uint16_t mtu)
20 {
21     BTA_GATT_SetLocalMTU(mtu);
22 }
23 
btc_gatt_com_call_handler(btc_msg_t * msg)24 void btc_gatt_com_call_handler(btc_msg_t *msg)
25 {
26     BTC_TRACE_DEBUG("%s act %d\n", __func__, msg->act);
27     switch (msg->act) {
28     case BTC_GATT_ACT_SET_LOCAL_MTU:
29     {
30         btc_ble_gatt_com_args_t *arg = (btc_ble_gatt_com_args_t *)(msg->arg);
31         btc_set_local_mtu(arg->set_mtu.mtu);
32         break;
33     }
34     default:
35         BTC_TRACE_ERROR("%s UNKNOWN ACT %d\n", __func__, msg->act);
36         break;
37     }
38 }
39