2424#include "btc_dev.h"
2525#include "btc_gatts.h"
2626#include "btc_gattc.h"
27+ #include "btc_gatt_common.h"
2728#include "btc_gap_ble.h"
2829#include "btc_blufi_prf.h"
2930#include "btc_dm.h"
@@ -48,33 +49,36 @@ static xTaskHandle xBtcTaskHandle = NULL;
4849static xQueueHandle xBtcQueue = 0 ;
4950
5051static btc_func_t profile_tab [BTC_PID_NUM ] = {
51- [BTC_PID_MAIN_INIT ] = {btc_main_call_handler , NULL },
52- [BTC_PID_DEV ] = {btc_dev_call_handler , NULL },
52+ [BTC_PID_MAIN_INIT ] = {btc_main_call_handler , NULL },
53+ [BTC_PID_DEV ] = {btc_dev_call_handler , NULL },
5354#if (GATTS_INCLUDED == TRUE)
54- [BTC_PID_GATTS ] = {btc_gatts_call_handler , btc_gatts_cb_handler },
55+ [BTC_PID_GATTS ] = {btc_gatts_call_handler , btc_gatts_cb_handler },
5556#endif ///GATTS_INCLUDED == TRUE
5657#if (GATTC_INCLUDED == TRUE)
57- [BTC_PID_GATTC ] = {btc_gattc_call_handler , btc_gattc_cb_handler },
58+ [BTC_PID_GATTC ] = {btc_gattc_call_handler , btc_gattc_cb_handler },
5859#endif ///GATTC_INCLUDED == TRUE
59- [BTC_PID_GAP_BLE ] = {btc_gap_ble_call_handler , btc_gap_ble_cb_handler },
60- [BTC_PID_BLE_HID ] = {NULL , NULL },
61- [BTC_PID_SPPLIKE ] = {NULL , NULL },
60+ #if (GATTS_INCLUDED == TRUE || GATTC_INCLUDED == TRUE)
61+ [BTC_PID_GATT_COMMON ] = {btc_gatt_com_call_handler , NULL },
62+ #endif //GATTC_INCLUDED == TRUE || GATTS_INCLUDED == TRUE
63+ [BTC_PID_GAP_BLE ] = {btc_gap_ble_call_handler , btc_gap_ble_cb_handler },
64+ [BTC_PID_BLE_HID ] = {NULL , NULL },
65+ [BTC_PID_SPPLIKE ] = {NULL , NULL },
6266#if (GATTS_INCLUDED == TRUE)
63- [BTC_PID_BLUFI ] = {btc_blufi_call_handler , btc_blufi_cb_handler },
67+ [BTC_PID_BLUFI ] = {btc_blufi_call_handler , btc_blufi_cb_handler },
6468#endif ///GATTS_INCLUDED == TRUE
65- [BTC_PID_DM_SEC ] = {NULL , btc_dm_sec_cb_handler },
66- [BTC_PID_ALARM ] = {btc_alarm_handler , NULL },
69+ [BTC_PID_DM_SEC ] = {NULL , btc_dm_sec_cb_handler },
70+ [BTC_PID_ALARM ] = {btc_alarm_handler , NULL },
6771#if CONFIG_CLASSIC_BT_ENABLED
6872#if (BTC_GAP_BT_INCLUDED == TRUE)
69- [BTC_PID_GAP_BT ] = {btc_gap_bt_call_handler , NULL },
73+ [BTC_PID_GAP_BT ] = {btc_gap_bt_call_handler , NULL },
7074#endif /* (BTC_GAP_BT_INCLUDED == TRUE) */
71- [BTC_PID_PRF_QUE ] = {btc_profile_queue_handler , NULL },
75+ [BTC_PID_PRF_QUE ] = {btc_profile_queue_handler , NULL },
7276#if BTC_AV_INCLUDED
73- [BTC_PID_A2DP ] = {btc_a2dp_call_handler , btc_a2dp_cb_handler },
74- [BTC_PID_AVRC ] = {btc_avrc_call_handler , NULL },
77+ [BTC_PID_A2DP ] = {btc_a2dp_call_handler , btc_a2dp_cb_handler },
78+ [BTC_PID_AVRC ] = {btc_avrc_call_handler , NULL },
7579#endif /* #if BTC_AV_INCLUDED */
7680#if CONFIG_BT_SPP_ENABLED
77- [BTC_PID_SPP ] = {btc_spp_call_handler , btc_spp_cb_handler },
81+ [BTC_PID_SPP ] = {btc_spp_call_handler , btc_spp_cb_handler },
7882#endif /* #if CONFIG_BT_SPP_ENABLED */
7983#endif /* #if CONFIG_CLASSIC_BT_ENABLED */
8084};
0 commit comments