1 /* 2 * Copyright (c) 2021 Chipsea Technologies (Shenzhen) Corp., 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 #ifndef __APP_BLE_ONLY_H__ 16 #define __APP_BLE_ONLY_H__ 17 #ifdef CFG_BLE_ONLY 18 #include "cs_target_config.h" 19 #include "al_rtos.h" 20 #include "app_present.h" 21 #include "hal_att.h" 22 #if (BLE_APP_SEC) 23 #include "app_present_sec.h" // Application security Definition 24 #endif // (BLE_APP_SEC) 25 26 #if (BLE_APP_BATT) 27 #include "app_batt.h" // Battery Application Definitions 28 #endif //(BLE_APP_DIS) 29 30 #if (BLE_APP_HID) 31 #include "app_hid.h" // HID Application Definitions 32 #endif //(BLE_APP_HID) 33 34 #if (BLE_APP_SMARTCONFIG) 35 #include "app_smartconfig.h" // Smart Config Application Definitions 36 #endif //(BLE_APP_SMARTCONFIG) 37 38 #define APP_UPDATE_DATA ("BLE_UPDATE_ADV_DATA") 39 #define APP_UPDATE_DATA_LEN sizeof(APP_UPDATE_DATA) 40 41 /// Advertising channel map - 37, 38, 39 42 #define APP_ADV_CHMAP (0x07) 43 /// Advertising minimum interval - 40ms (64*0.625ms) 44 #define APP_ADV_INT_MIN (64) 45 /// Advertising maximum interval - 40ms (64*0.625ms) 46 #define APP_ADV_INT_MAX (64) 47 /// Fast advertising interval 48 #define APP_ADV_FAST_INT (32) 49 50 void app_ble_init(void); 51 52 #endif 53 #endif /* CSBT_H */ 54