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_PROFILE_CONFIG_H 16 #define _BLE_PROFILE_CONFIG_H 17 18 //ATT DB,Testing and Qualification related flags 19 #if (BLE_CENTRAL || BLE_PERIPHERAL) 20 /// Proximity Profile Monitor Role 21 #if defined(CFG_PRF_PXPM) 22 #define BLE_PROX_MONITOR 1 23 #else 24 #define BLE_PROX_MONITOR 0 25 #endif // defined(CFG_PRF_PXPM) 26 27 /// Proximity Profile Reporter Role 28 #if defined(CFG_PRF_PXPR) 29 #define BLE_PROX_REPORTER 1 30 #else 31 #define BLE_PROX_REPORTER 0 32 #endif // defined(CFG_PRF_PXPR) 33 34 ///Find Me Profile Locator role 35 #if defined(CFG_PRF_FMPL) 36 #define BLE_FINDME_LOCATOR 1 37 #else 38 #define BLE_FINDME_LOCATOR 0 39 #endif // defined(CFG_PRF_FMPL) 40 41 ///Find Me Profile Target role 42 #if defined(CFG_PRF_FMPT) 43 #define BLE_FINDME_TARGET 1 44 #else 45 #define BLE_FINDME_TARGET 0 46 #endif // defined(CFG_PRF_FMPT) 47 48 ///Health Thermometer Profile Collector Role 49 #if defined(CFG_PRF_HTPC) 50 #define BLE_HT_COLLECTOR 1 51 #else 52 #define BLE_HT_COLLECTOR 0 53 #endif // defined(CFG_PRF_HTPC) 54 55 ///Health Thermometer Profile Thermometer Role 56 #if defined(CFG_PRF_HTPT) 57 #define BLE_HT_THERMOM 1 58 #else 59 #define BLE_HT_THERMOM 0 60 #endif // defined(CFG_PRF_HTPT) 61 62 ///Device Information Service Client Role 63 #if defined(CFG_PRF_DISC) 64 #define BLE_DIS_CLIENT 1 65 #else 66 #define BLE_DIS_CLIENT 0 67 #endif // defined(CFG_PRF_DISC) 68 69 ///Device Information Service Server Role 70 #if defined(CFG_PRF_DISS) 71 #define BLE_DIS_SERVER 1 72 #else 73 #define BLE_DIS_SERVER 0 74 #endif // defined(CFG_PRF_DISS) 75 76 ///Blood Pressure Profile Collector Role 77 #if defined(CFG_PRF_BLPC) 78 #define BLE_BP_COLLECTOR 1 79 #else 80 #define BLE_BP_COLLECTOR 0 81 #endif // defined(CFG_PRF_BLPC) 82 83 ///Blood Pressure Profile Sensor Role 84 #if defined(CFG_PRF_BLPS) 85 #define BLE_BP_SENSOR 1 86 #else 87 #define BLE_BP_SENSOR 0 88 #endif // defined(CFG_PRF_BLPS) 89 90 ///Time Profile Client Role 91 #if defined(CFG_PRF_TIPC) 92 #define BLE_TIP_CLIENT 1 93 #else 94 #define BLE_TIP_CLIENT 0 95 #endif // defined(CFG_PRF_TIPC) 96 97 ///Time Profile Server Role 98 #if defined(CFG_PRF_TIPS) 99 #define BLE_TIP_SERVER 1 100 #else 101 #define BLE_TIP_SERVER 0 102 #endif // defined(CFG_PRF_TIPS) 103 104 ///Heart Rate Profile Collector Role 105 #if defined(CFG_PRF_HRPC) 106 #define BLE_HR_COLLECTOR 1 107 #else 108 #define BLE_HR_COLLECTOR 0 109 #endif // defined(CFG_PRF_HRPC) 110 111 ///Heart Rate Profile Sensor Role 112 #if defined(CFG_PRF_HRPS) 113 #define BLE_HR_SENSOR 1 114 #else 115 #define BLE_HR_SENSOR 0 116 #endif // defined(CFG_PRF_HRPS) 117 118 ///Scan Parameter Profile Client Role 119 #if defined(CFG_PRF_SCPPC) 120 #define BLE_SP_CLIENT 1 121 #else 122 #define BLE_SP_CLIENT 0 123 #endif // defined(CFG_PRF_SCPPC) 124 125 ///Scan Parameter Profile Server Role 126 #if defined(CFG_PRF_SCPPS) 127 #define BLE_SP_SERVER 1 128 #else 129 #define BLE_SP_SERVER 0 130 #endif // defined(CFG_PRF_SCPPS) 131 132 ///Battery Service Client Role 133 #if defined(CFG_PRF_BASC) 134 #define BLE_BATT_CLIENT 1 135 #else 136 #define BLE_BATT_CLIENT 0 137 #endif // defined(CFG_PRF_BASC) 138 139 ///Battery Service Server Role 140 #if defined(CFG_PRF_BASS) 141 #define BLE_BATT_SERVER 1 142 #else 143 #define BLE_BATT_SERVER 0 144 #endif // defined(CFG_PRF_BASS) 145 146 ///HID Device Role 147 #if defined(CFG_PRF_HOGPD) 148 #define BLE_HID_DEVICE 1 149 #else 150 #define BLE_HID_DEVICE 0 151 #endif // defined(CFG_PRF_HOGPD) 152 153 ///HID Boot Host Role 154 #if defined(CFG_PRF_HOGPBH) 155 #define BLE_HID_BOOT_HOST 1 156 #else 157 #define BLE_HID_BOOT_HOST 0 158 #endif // defined(CFG_PRF_HOGPBH) 159 160 ///HID Report Host Role 161 #if defined(CFG_PRF_HOGPRH) 162 #define BLE_HID_REPORT_HOST 1 163 #else 164 #define BLE_HID_REPORT_HOST 0 165 #endif // defined(CFG_PRF_HOGPRH) 166 167 /// Glucose Profile Collector Role 168 #if defined(CFG_PRF_GLPC) 169 #define BLE_GL_COLLECTOR 1 170 #else 171 #define BLE_GL_COLLECTOR 0 172 #endif // defined(CFG_PRF_GLPC) 173 174 /// Glucose Profile Sensor Role 175 #if defined(CFG_PRF_GLPS) 176 #define BLE_GL_SENSOR 1 177 #else 178 #define BLE_GL_SENSOR 0 179 #endif // defined(CFG_PRF_GLPS) 180 181 /// Running Speed and Cadence Profile Collector Role 182 #if defined(CFG_PRF_RSCPC) 183 #define BLE_RSC_COLLECTOR 1 184 #else 185 #define BLE_RSC_COLLECTOR 0 186 #endif // defined(CFG_PRF_RSCPC) 187 188 /// Running Speed and Cadence Profile Server Role 189 #if defined(CFG_PRF_RSCPS) 190 #define BLE_RSC_SENSOR 1 191 #else 192 #define BLE_RSC_SENSOR 0 193 #endif // defined(CFG_PRF_RSCPS) 194 195 /// Cycling Speed and Cadence Profile Collector Role 196 #if defined(CFG_PRF_CSCPC) 197 #define BLE_CSC_COLLECTOR 1 198 #else 199 #define BLE_CSC_COLLECTOR 0 200 #endif // defined(CFG_PRF_CSCPC) 201 202 /// Cycling Speed and Cadence Profile Server Role 203 #if defined(CFG_PRF_CSCPS) 204 #define BLE_CSC_SENSOR 1 205 #else 206 #define BLE_CSC_SENSOR 0 207 #endif // defined(CFG_PRF_CSCPS) 208 209 /// Cycling Power Profile Collector Role 210 #if defined(CFG_PRF_CPPC) 211 #define BLE_CP_COLLECTOR 1 212 #else 213 #define BLE_CP_COLLECTOR 0 214 #endif // defined (CFG_PRF_CPPC) 215 216 /// Cycling Power Profile Server Role 217 #if defined(CFG_PRF_CPPS) 218 #define BLE_CP_SENSOR 1 219 #else 220 #define BLE_CP_SENSOR 0 221 #endif // defined (CFG_PRF_CPPS) 222 223 /// Location and Navigation Profile Collector Role 224 #if defined(CFG_PRF_LANC) 225 #define BLE_LN_COLLECTOR 1 226 #else 227 #define BLE_LN_COLLECTOR 0 228 #endif // defined (CFG_PRF_LANC) 229 230 /// Location and Navigation Profile Server Role 231 #if defined(CFG_PRF_LANS) 232 #define BLE_LN_SENSOR 1 233 #else 234 #define BLE_LN_SENSOR 0 235 #endif // defined (CFG_PRF_LANS) 236 237 /// Alert Notification Profile Client Role 238 #if defined(CFG_PRF_ANPC) 239 #define BLE_AN_CLIENT 1 240 #else 241 #define BLE_AN_CLIENT 0 242 #endif // defined(CFG_PRF_ANPC) 243 244 /// Alert Notification Profile Server Role 245 #if defined(CFG_PRF_ANPS) 246 #define BLE_AN_SERVER 1 247 #else 248 #define BLE_AN_SERVER 0 249 #endif // defined(CFG_PRF_ANPS) 250 251 /// Phone Alert Status Profile Client Role 252 #if defined(CFG_PRF_PASPC) 253 #define BLE_PAS_CLIENT 1 254 #else 255 #define BLE_PAS_CLIENT 0 256 #endif // defined(CFG_PRF_PASPC) 257 258 /// Phone Alert Status Profile Server Role 259 #if defined(CFG_PRF_PASPS) 260 #define BLE_PAS_SERVER 1 261 #else 262 #define BLE_PAS_SERVER 0 263 #endif // defined(CFG_PRF_PASPS) 264 265 /// Internet Protocol Support Profile Server Role 266 #if defined(CFG_PRF_IPSS) 267 #define BLE_IPS_SERVER 1 268 #else 269 #define BLE_IPS_SERVER 0 270 #endif // defined(CFG_PRF_IPSS) 271 272 /// Internet Protocol Support Profile Client Role 273 #if defined(CFG_PRF_IPSC) 274 #define BLE_IPS_CLIENT 1 275 #else 276 #define BLE_IPS_CLIENT 0 277 #endif // defined(CFG_PRF_IPSC) 278 279 /// Environmental Sensing Profile Server Role 280 #if defined(CFG_PRF_ENVS) 281 #define BLE_ENV_SERVER 1 282 #else 283 #define BLE_ENV_SERVER 0 284 #endif // defined(CFG_PRF_ENVS) 285 286 /// Environmental Sensing Profile Client Role 287 #if defined(CFG_PRF_ENVC) 288 #define BLE_ENV_CLIENT 1 289 #else 290 #define BLE_ENV_CLIENT 0 291 #endif // defined(CFG_PRF_ENVC) 292 293 /// Weight Scale Profile Server Role 294 #if defined(CFG_PRF_WSCS) 295 #define BLE_WSC_SERVER 1 296 #else 297 #define BLE_WSC_SERVER 0 298 #endif // defined(CFG_PRF_WSCS) 299 300 /// Weight Scale Profile Client Role 301 #if defined(CFG_PRF_WSCC) 302 #define BLE_WSC_CLIENT 1 303 #else 304 #define BLE_WSC_CLIENT 0 305 #endif // defined(CFG_PRF_WSCC) 306 307 /// Body Composition Server Role 308 #if defined(CFG_PRF_BCSS) 309 #define BLE_BCS_SERVER 1 310 #else 311 #define BLE_BCS_SERVER 0 312 #endif // defined(CFG_PRF_BCSS) 313 314 /// Body Composition Client Role 315 #if defined(CFG_PRF_BCSC) 316 #define BLE_BCS_CLIENT 1 317 #else 318 #define BLE_BCS_CLIENT 0 319 #endif // defined(CFG_PRF_BCSC) 320 321 /// User Data Service Server Role 322 #if defined(CFG_PRF_UDSS) 323 #define BLE_UDS_SERVER 1 324 #else 325 #define BLE_UDS_SERVER 0 326 #endif // defined(CFG_PRF_UDSS) 327 328 /// User Data Service Client Role 329 #if defined(CFG_PRF_UDSC) 330 #define BLE_UDS_CLIENT 1 331 #else 332 #define BLE_UDS_CLIENT 0 333 #endif // defined(CFG_PRF_UDSC) 334 335 /// Wireless Power Transfer Profile Server Role 336 #if defined(CFG_PRF_WPTS) 337 #define BLE_WPT_SERVER 1 338 #else 339 #define BLE_WPT_SERVER 0 340 #endif // defined(CFG_PRF_WPTS) 341 342 /// Wireless Power Transfer Profile Client Role 343 #if defined(CFG_PRF_WPTC) 344 #define BLE_WPT_CLIENT 1 345 #else 346 #define BLE_WPT_CLIENT 0 347 #endif // defined(CFG_PRF_WPTC) 348 349 /// Pulse Oximeter Profile Server Role 350 #if defined(CFG_PRF_PLXS) 351 #define BLE_PLX_SERVER 1 352 #else 353 #define BLE_PLX_SERVER 0 354 #endif // defined(CFG_PRF_PLXS) 355 356 /// Pulse Oximete Profile Client Role 357 #if defined(CFG_PRF_PLXC) 358 #define BLE_PLX_CLIENT 1 359 #else 360 #define BLE_PLX_CLIENT 0 361 #endif // defined(CFG_PRF_PLXC) 362 363 /// Continuous Glucose Monitoring Profile Server Role 364 #if defined(CFG_PRF_CGMS) 365 #define BLE_CGM_SERVER 1 366 #else 367 #define BLE_CGM_SERVER 0 368 #endif // defined(CFG_PRF_CGMS) 369 370 /// Continuous Glucose Monitoring Profile Client Role 371 #if defined(CFG_PRF_CGMC) 372 #define BLE_CGM_CLIENT 1 373 #else 374 #define BLE_CGM_CLIENT 0 375 #endif // defined(CFG_PRF_CGMC) 376 377 /// Throughput tester profile for debug usage 378 #if defined(CFG_PRF_THPP) 379 #define BLE_DBG_THPP 1 380 #else 381 #define BLE_DBG_THPP 0 382 #endif // defined(CFG_PRF_DISS) 383 384 #if defined(CFG_PRF_SMARTCONFIGS) 385 #define BLE_SMARTCONFIG 1 386 #else 387 #define BLE_SMARTCONFIG 0 388 #endif 389 /// BLE_CLIENT_PRF indicates if at least one client profile is present 390 #if (BLE_PROX_MONITOR || BLE_FINDME_LOCATOR || BLE_HT_COLLECTOR || BLE_BP_COLLECTOR \ 391 || BLE_HR_COLLECTOR || BLE_DIS_CLIENT || BLE_TIP_CLIENT || BLE_SP_CLIENT \ 392 || BLE_BATT_CLIENT || BLE_GL_COLLECTOR || BLE_HID_BOOT_HOST || BLE_HID_REPORT_HOST \ 393 || BLE_RSC_COLLECTOR || BLE_CSC_COLLECTOR || BLE_CP_COLLECTOR || BLE_LN_COLLECTOR || BLE_AN_CLIENT \ 394 || BLE_PAS_CLIENT || BLE_IPS_CLIENT || BLE_ENV_CLIENT || BLE_WSC_CLIENT \ 395 || BLE_UDS_CLIENT || BLE_BCS_CLIENT || BLE_WPT_CLIENT || BLE_PLX_CLIENT \ 396 || BLE_CGM_CLIENT || BLE_DBG_THPP || BLE_SMARTCONFIG) 397 #define BLE_CLIENT_PRF 1 398 #else 399 #define BLE_CLIENT_PRF 0 400 #endif //(BLE_PROX_MONITOR || BLE_FINDME_LOCATOR ...) 401 402 /// BLE_SERVER_PRF indicates if at least one server profile is present 403 #if (BLE_PROX_REPORTER || BLE_FINDME_TARGET || BLE_HT_THERMOM || BLE_BP_SENSOR \ 404 || BLE_TIP_SERVER || BLE_HR_SENSOR || BLE_DIS_SERVER || BLE_SP_SERVER \ 405 || BLE_BATT_SERVER || BLE_HID_DEVICE || BLE_GL_SENSOR || BLE_RSC_SENSOR \ 406 || BLE_CSC_SENSOR || BLE_CP_SENSOR || BLE_LN_SENSOR || BLE_AN_SERVER \ 407 || BLE_PAS_SERVER || BLE_IPS_SERVER || BLE_ENV_SERVER || BLE_WSC_SERVER \ 408 || BLE_UDS_SERVER || BLE_BCS_SERVER || BLE_WPT_SERVER || BLE_PLX_SERVER \ 409 || BLE_CGM_SERVER || BLE_DBG_THPP) 410 #define BLE_SERVER_PRF 1 411 #else 412 #define BLE_SERVER_PRF 0 413 #endif //(BLE_PROX_REPORTER || BLE_FINDME_TARGET ...) 414 415 //Force ATT parts depending on profile roles or compile options 416 /// Attribute Client 417 #if (BLE_CLIENT_PRF) 418 #define BLE_ATTC 1 419 #endif //(BLE_CLIENT_PRF) 420 421 /// Attribute Server 422 #if (BLE_SERVER_PRF) 423 #define BLE_ATTS 1 424 #endif //(BLE_SERVER_PRF) 425 426 427 #elif (BLE_OBSERVER || BLE_BROADCASTER) 428 /// Proximity Profile Monitor Role 429 #define BLE_PROX_MONITOR 0 430 /// Proximity Profile Reporter Role 431 #define BLE_PROX_REPORTER 0 432 ///Find Me Profile Locator role 433 #define BLE_FINDME_LOCATOR 0 434 ///Find Me Profile Target role 435 #define BLE_FINDME_TARGET 0 436 ///Health Thermometer Profile Collector Role 437 #define BLE_HT_COLLECTOR 0 438 ///Health Thermometer Profile Thermometer Role 439 #define BLE_HT_THERMOM 0 440 ///Blood Pressure Profile Collector Role 441 #define BLE_BP_COLLECTOR 0 442 ///Blood Pressure Profile Sensor Role 443 #define BLE_BP_SENSOR 0 444 ///Heart Rate Profile Collector Role 445 #define BLE_HR_COLLECTOR 0 446 ///Heart Rate Profile Sensor Role 447 #define BLE_HR_SENSOR 0 448 ///Time Profile Client Role 449 #define BLE_TIP_CLIENT 0 450 ///Time Profile Server Role 451 #define BLE_TIP_SERVER 0 452 /// Device Information Service Client Role 453 #define BLE_DIS_CLIENT 0 454 /// Device Information Service Server Role 455 #define BLE_DIS_SERVER 0 456 /// Scan Parameter Profile Client Role 457 #define BLE_SP_CLIENT 0 458 /// Scan Parameter Profile Server Role 459 #define BLE_SP_SERVER 0 460 /// Battery Service Client Role 461 #define BLE_BATT_CLIENT 0 462 /// Battery Service Server Role 463 #define BLE_BATT_SERVER 0 464 /// HID Device Role 465 #define BLE_HID_DEVICE 0 466 /// HID Boot Host Role 467 #define BLE_HID_BOOT_HOST 0 468 /// HID Report Host Role 469 #define BLE_HID_REPORT_HOST 0 470 /// Glucose Profile Collector Role 471 #define BLE_GL_COLLECTOR 0 472 /// Glucose Profile Sensor Role 473 #define BLE_GL_SENSOR 0 474 /// Running Speed and Cadence Collector Role 475 #define BLE_RSC_COLLECTOR 0 476 /// Running Speed and Cadence Server Role 477 #define BLE_RSC_SENSOR 0 478 /// Cycling Speed and Cadence Collector Role 479 #define BLE_CSC_COLLECTOR 0 480 /// Cycling Speed and Cadence Server Role 481 #define BLE_CSC_SENSOR 0 482 /// Cycling Power Collector Role 483 #define BLE_CP_COLLECTOR 0 484 /// Cycling Power Server Role 485 #define BLE_CP_SENSOR 0 486 /// Location and Navigation Collector Role 487 #define BLE_LN_COLLECTOR 0 488 /// Location and Navigation Server Role 489 #define BLE_LN_SENSOR 0 490 /// Alert Notification Client Role 491 #define BLE_AN_CLIENT 0 492 /// Alert Notification Server Role 493 #define BLE_AN_SERVER 0 494 /// Phone Alert Status Client Role 495 #define BLE_PAS_CLIENT 0 496 /// Phone Alert Status Server Role 497 #define BLE_PAS_SERVER 0 498 /// Internet Protocol Support Profile Server Role 499 #define BLE_IPS_SERVER 0 500 /// Internet Protocol Support Profile Client Role 501 #define BLE_IPS_CLIENT 0 502 /// Environmental Sensing Profile Server Role 503 #define BLE_ENV_SERVER 0 504 /// Environmental Sensing Profile Client Role 505 #define BLE_ENV_CLIENT 0 506 /// Weight Scale Profile Server Role 507 #define BLE_WSC_SERVER 0 508 /// Weight Scale Profile Client Role 509 #define BLE_WSC_CLIENT 0 510 /// Body Composition Profile Client Role 511 #define BLE_BCS_CLIENT 0 512 /// Body Composition Profile Server Role 513 #define BLE_BCS_SERVER 0 514 /// User Data Service Server Role 515 #define BLE_UDS_SERVER 0 516 /// User Data Service Client Role 517 #define BLE_UDS_CLIENT 0 518 /// Wireless Power Transfer Profile Server Role 519 #define BLE_WPT_SERVER 0 520 /// Wireless Power Transfer Profile Client Role 521 #define BLE_WPT_CLIENT 0 522 /// Pulse Oximete Profile Server Role 523 #define BLE_PLX_SERVER 0 524 /// Pulse Oximete Profile Client Role 525 #define BLE_PLX_CLIENT 0 526 /// Pulse Oximete Profile Server Role 527 #define BLE_CGM_SERVER 0 528 /// Pulse Oximete Profile Client Role 529 #define BLE_CGM_CLIENT 0 530 531 /// Throughput tester profile for debug usage 532 #define BLE_DBG_THPP 0 533 534 //Force ATT parts to 0 535 /// External database management 536 #define BLE_EXT_ATTS_DB 0 537 /// Profile Server 538 #define BLE_SERVER_PRF 0 539 /// Profile Client 540 #define BLE_CLIENT_PRF 0 541 #endif //(BLE_OBSERVER || BLE_BROADCASTER) 542 543 544 /// @} PRF_CONFIG 545 546 #endif // _BLE_PROFILE_CONFIG_H 547