1 /* 2 * Copyright (c) 2022 Winner Microelectronics Co., Ltd. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @file wm_bt_config.h 18 * 19 * @brief WM bluetooth model configure 20 * 21 * @author winnermicro 22 * 23 * Copyright (c) 2015 Winner Microelectronics Co., Ltd. 24 */ 25 #ifndef __WM_BLUETOOTH_CONFIG_H__ 26 #define __WM_BLUETOOTH_CONFIG_H__ 27 28 #include "wm_config.h" 29 30 #if (TLS_CONFIG_BR_EDR == CFG_ON) 31 #define WM_BTA_AV_SINK_INCLUDED CFG_ON 32 #define WM_BTA_HFP_HSP_INCLUDED CFG_ON 33 #define WM_BTA_SPPS_INCLUDED CFG_ON 34 #define WM_BTA_SPPC_INCLUDED CFG_ON 35 #else 36 #define WM_BTA_AV_SINK_INCLUDED CFG_OFF 37 #define WM_BTA_HFP_HSP_INCLUDED CFG_OFF 38 #define WM_BTA_SPPS_INCLUDED CFG_OFF 39 #define WM_BTA_SPPC_INCLUDED CFG_OFF 40 #endif 41 42 #if (TLS_CONFIG_BLE == CFG_ON) 43 #define WM_BLE_PERIPHERAL_INCLUDED CFG_ON 44 #define WM_BLE_CENTRAL_INCLUDED CFG_ON 45 #else 46 #define WM_BLE_PERIPHERAL_INCLUDED CFG_OFF 47 #define WM_BLE_CENTRAL_INCLUDED CFG_OFF 48 #endif 49 50 #if (WM_BTA_AV_SINK_INCLUDED == CFG_ON) || (WM_BTA_HFP_HSP_INCLUDED == CFG_ON) || \ 51 (WM_BTA_SPPS_INCLUDED == CFG_ON) || (WM_BTA_SPPC_INCLUDED == CFG_ON) 52 #define WM_BT_INCLUDED CFG_ON 53 #else 54 #define WM_BT_INCLUDED CFG_OFF 55 #endif 56 57 #if (WM_BLE_PERIPHERAL_INCLUDED == CFG_ON) || (WM_BLE_CENTRAL_INCLUDED == CFG_ON) 58 #if NIMBLE_FTR 59 #define WM_BLE_INCLUDED CFG_OFF 60 #define WM_NIMBLE_INCLUDED CFG_ON 61 #else 62 #define WM_BLE_INCLUDED CFG_ON 63 #define WM_NIMBLE_INCLUDED CFG_OFF 64 #endif 65 #else 66 #define WM_BLE_INCLUDED CFG_OFF 67 #define WM_NIMBLE_INCLUDE CFG_OFF 68 #endif 69 70 #if (WM_BLE_CENTRAL_INCLUDED == CFG_ON) 71 #if (WM_BT_INCLUDED == CFG_ON) 72 #define WM_BLE_MAX_CONNECTION 1 73 #else 74 #define WM_BLE_MAX_CONNECTION 7 75 #endif 76 #else 77 #define WM_BLE_MAX_CONNECTION 1 78 #endif 79 80 #endif /* __WM_WIFI_CONFIG_H__ */