• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 _BLE_APP_CONFIG_H
16 #define _BLE_APP_CONFIG_H
17 
18 /******************************************************************************************/
19 /* -------------------------   BLE APPLICATION SETTINGS      -----------------------------*/
20 /******************************************************************************************/
21 
22 /// Health Thermometer Application
23 #if defined(CFG_APP_HT)
24 #define BLE_APP_HT           1
25 #else // defined(CFG_APP_HT)
26 #define BLE_APP_HT           0
27 #endif // defined(CFG_APP_HT)
28 
29 #if defined(CFG_APP_HR)
30 #define BLE_APP_HR           1
31 #else
32 #define BLE_APP_HR           0
33 #endif
34 
35 /// HID Application
36 #if defined(CFG_APP_HID)
37 #define BLE_APP_HID          1
38 #else // defined(CFG_APP_HID)
39 #define BLE_APP_HID          0
40 #endif // defined(CFG_APP_HID)
41 
42 /// DIS Application
43 #if defined(CFG_APP_DIS)
44 #define BLE_APP_DIS          1
45 #else // defined(CFG_APP_DIS)
46 #define BLE_APP_DIS          0
47 #endif // defined(CFG_APP_DIS)
48 
49 /// Audio Application
50 #if defined(CFG_APP_AM0)
51 #define BLE_APP_AM0          1
52 #else // defined(CFG_APP_AM0)
53 #define BLE_APP_AM0          0
54 #endif // defined(CFG_APP_AM0)
55 
56 /// Battery Service Application
57 #if (BLE_APP_HID)
58 #define BLE_APP_BATT          1
59 #else
60 #define BLE_APP_BATT          0
61 #endif // (BLE_APP_HID)
62 
63 /// Smart Config Application
64 #if defined(CFG_APP_SMARTCONFIG)
65 #define BLE_APP_SMARTCONFIG           1
66 #else // defined(CFG_APP_SMARTCONFIG)
67 #define BLE_APP_SMARTCONFIG           0
68 #endif // defined(CFG_APP_SMARTCONFIG)
69 
70 
71 /// Security Application
72 #if (defined(CFG_APP_SEC) || BLE_APP_HID || BLE_APP_AM0)
73 #define BLE_APP_SEC          1
74 #else //(defined(CFG_APP_SEC) || BLE_APP_HID || BLE_APP_AM0)
75 #define BLE_APP_SEC          0
76 #endif //(defined(CFG_APP_SEC) || BLE_APP_HID || BLE_APP_AM0)
77 
78 /// Secure Connection
79 #if (BLE_APP_AM0)
80 #define BLE_APP_SEC_CON      1
81 #else //(BLE_APP_AM0)
82 #define BLE_APP_SEC_CON      0
83 #endif ////(BLE_APP_AM0)
84 
85 /// Hearing Aid Service Configuration
86 #if (BLE_APP_AM0)
87 #define AM0_APP_OPTIONAL_CHARACTERISTICS        0
88 /// Default Settings for Optional Characteristics
89 /// Specification Default Value
90 #define AM0_APP_DEFAULT_TREBLE                  0
91 #define AM0_APP_DEFAULT_BASS                    0
92 /// Following have no specification Defaults - as application dependent.
93 /// Please change to suit product.
94 #define AM0_APP_DEFAULT_MIXED_VOL_STEP          5
95 #define AM0_APP_DEFAULT_MIXED_VOL               10
96 #define AM0_APP_DEFAULT_MIC_VOL_STEP            8
97 #define AM0_APP_DEFAULT_STREAM_VOL_STEP         7
98 #define AM0_APP_DEFAULT_MIC_SENSITIVITY         127
99 #define AM0_APP_DEFAULT_SENSITIVITY_STEP        12
100 /// Default is to have no active streaming program id.
101 #define AM0_APP_DEFAULT_ACT_STREAM_PROG_ID      0
102 #else
103 #define AM0_APP_OPTIONAL_CHARACTERISTICS        0
104 #endif //BLE_APP_AM0
105 
106 #endif // _BLE_APP_CONFIG_H
107