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