ble_conf.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /**
  2. ******************************************************************************
  3. * File Name : App/ble_conf.h
  4. * Description : Configuration file for BLE Middleware.
  5. *
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef BLE_CONF_H
  21. #define BLE_CONF_H
  22. #include "app_conf.h"
  23. /******************************************************************************
  24. *
  25. * BLE SERVICES CONFIGURATION
  26. * blesvc
  27. *
  28. ******************************************************************************/
  29. /**
  30. * This setting shall be set to '1' if the device needs to support the Peripheral Role
  31. * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1'
  32. */
  33. #define BLE_CFG_PERIPHERAL 1
  34. /**
  35. * This setting shall be set to '1' if the device needs to support the Central Role
  36. * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1'
  37. */
  38. #define BLE_CFG_CENTRAL 0
  39. /**
  40. * There is one handler per service enabled
  41. * Note: There is no handler for the Device Information Service
  42. *
  43. * This shall take into account all registered handlers
  44. * (from either the provided services or the custom services)
  45. */
  46. #define BLE_CFG_SVC_MAX_NBR_CB 7
  47. #define BLE_CFG_CLT_MAX_NBR_CB 0
  48. /******************************************************************************
  49. * Device Information Service (DIS)
  50. ******************************************************************************/
  51. /**< Options: Supported(1) or Not Supported(0) */
  52. #define BLE_CFG_DIS_MANUFACTURER_NAME_STRING 1
  53. #define BLE_CFG_DIS_MODEL_NUMBER_STRING 1
  54. #define BLE_CFG_DIS_SERIAL_NUMBER_STRING 0
  55. #define BLE_CFG_DIS_HARDWARE_REVISION_STRING 0
  56. #define BLE_CFG_DIS_FIRMWARE_REVISION_STRING 0
  57. #define BLE_CFG_DIS_SOFTWARE_REVISION_STRING 0
  58. #define BLE_CFG_DIS_SYSTEM_ID 0
  59. #define BLE_CFG_DIS_IEEE_CERTIFICATION 0
  60. #define BLE_CFG_DIS_PNP_ID 0
  61. /**
  62. * device information service characteristic lengths
  63. */
  64. #define BLE_CFG_DIS_SYSTEM_ID_LEN_MAX (8)
  65. #define BLE_CFG_DIS_MODEL_NUMBER_STRING_LEN_MAX (32)
  66. #define BLE_CFG_DIS_SERIAL_NUMBER_STRING_LEN_MAX (32)
  67. #define BLE_CFG_DIS_FIRMWARE_REVISION_STRING_LEN_MAX (32)
  68. #define BLE_CFG_DIS_HARDWARE_REVISION_STRING_LEN_MAX (32)
  69. #define BLE_CFG_DIS_SOFTWARE_REVISION_STRING_LEN_MAX (32)
  70. #define BLE_CFG_DIS_MANUFACTURER_NAME_STRING_LEN_MAX (32)
  71. #define BLE_CFG_DIS_IEEE_CERTIFICATION_LEN_MAX (32)
  72. #define BLE_CFG_DIS_PNP_ID_LEN_MAX (7)
  73. /******************************************************************************
  74. * Heart Rate Service (HRS)
  75. ******************************************************************************/
  76. #define BLE_CFG_HRS_BODY_SENSOR_LOCATION_CHAR 1/**< BODY SENSOR LOCATION CHARACTERISTIC */
  77. #define BLE_CFG_HRS_ENERGY_EXPENDED_INFO_FLAG 1/**< ENERGY EXTENDED INFO FLAG */
  78. #define BLE_CFG_HRS_ENERGY_RR_INTERVAL_FLAG 1/**< Max number of RR interval values - Shall not be greater than 9 */
  79. /******************************************************************************
  80. * GAP Service - Apprearance
  81. ******************************************************************************/
  82. #define BLE_CFG_UNKNOWN_APPEARANCE (0)
  83. #define BLE_CFG_HR_SENSOR_APPEARANCE (832)
  84. #define BLE_CFG_GAP_APPEARANCE (BLE_CFG_HR_SENSOR_APPEARANCE)
  85. /******************************************************************************
  86. * Over The Air Feature (OTA) - STM Proprietary
  87. ******************************************************************************/
  88. #define BLE_CFG_OTA_REBOOT_CHAR 0/**< REBOOT OTA MODE CHARACTERISTIC */
  89. #endif /*BLE_CONF_H */
  90. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/