ble_ranges.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * Copyright (c) 2012 - 2018, Nordic Semiconductor ASA
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without modification,
  6. * are permitted provided that the following conditions are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright notice, this
  9. * list of conditions and the following disclaimer.
  10. *
  11. * 2. Redistributions in binary form, except as embedded into a Nordic
  12. * Semiconductor ASA integrated circuit in a product or a software update for
  13. * such product, must reproduce the above copyright notice, this list of
  14. * conditions and the following disclaimer in the documentation and/or other
  15. * materials provided with the distribution.
  16. *
  17. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  18. * contributors may be used to endorse or promote products derived from this
  19. * software without specific prior written permission.
  20. *
  21. * 4. This software, with or without modification, must only be used with a
  22. * Nordic Semiconductor ASA integrated circuit.
  23. *
  24. * 5. Any software provided in binary form under this license must not be reverse
  25. * engineered, decompiled, modified and/or disassembled.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  28. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  29. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  30. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  31. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  32. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  33. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  34. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  35. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  36. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. */
  38. /**
  39. @addtogroup BLE_COMMON
  40. @{
  41. @defgroup ble_ranges Module specific SVC, event and option number subranges
  42. @{
  43. @brief Definition of SVC, event and option number subranges for each API module.
  44. @note
  45. SVCs, event and option numbers are split into subranges for each API module.
  46. Each module receives its entire allocated range of SVC calls, whether implemented or not,
  47. but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range.
  48. Note that the symbols BLE_<module>_SVC_LAST is the end of the allocated SVC range,
  49. rather than the last SVC function call actually defined and implemented.
  50. Specific SVC, event and option values are defined in each module's ble_<module>.h file,
  51. which defines names of each individual SVC code based on the range start value.
  52. */
  53. #ifndef BLE_RANGES_H__
  54. #define BLE_RANGES_H__
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. #define BLE_SVC_BASE 0x60 /**< Common BLE SVC base. */
  59. #define BLE_SVC_LAST 0x6B /**< Common BLE SVC last. */
  60. #define BLE_GAP_SVC_BASE 0x6C /**< GAP BLE SVC base. */
  61. #define BLE_GAP_SVC_LAST 0x9A /**< GAP BLE SVC last. */
  62. #define BLE_GATTC_SVC_BASE 0x9B /**< GATTC BLE SVC base. */
  63. #define BLE_GATTC_SVC_LAST 0xA7 /**< GATTC BLE SVC last. */
  64. #define BLE_GATTS_SVC_BASE 0xA8 /**< GATTS BLE SVC base. */
  65. #define BLE_GATTS_SVC_LAST 0xB7 /**< GATTS BLE SVC last. */
  66. #define BLE_EVT_INVALID 0x00 /**< Invalid BLE Event. */
  67. #define BLE_EVT_BASE 0x01 /**< Common BLE Event base. */
  68. #define BLE_EVT_LAST 0x0F /**< Common BLE Event last. */
  69. #define BLE_GAP_EVT_BASE 0x10 /**< GAP BLE Event base. */
  70. #define BLE_GAP_EVT_LAST 0x2F /**< GAP BLE Event last. */
  71. #define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */
  72. #define BLE_GATTC_EVT_LAST 0x4F /**< GATTC BLE Event last. */
  73. #define BLE_GATTS_EVT_BASE 0x50 /**< GATTS BLE Event base. */
  74. #define BLE_GATTS_EVT_LAST 0x6F /**< GATTS BLE Event last. */
  75. #define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */
  76. #define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */
  77. #define BLE_OPT_LAST 0x1F /**< Common BLE Option last. */
  78. #define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */
  79. #define BLE_GAP_OPT_LAST 0x3F /**< GAP BLE Option last. */
  80. #define BLE_GATT_OPT_BASE 0x40 /**< GATT BLE Option base. */
  81. #define BLE_GATT_OPT_LAST 0x5F /**< GATT BLE Option last. */
  82. #define BLE_GATTC_OPT_BASE 0x60 /**< GATTC BLE Option base. */
  83. #define BLE_GATTC_OPT_LAST 0x7F /**< GATTC BLE Option last. */
  84. #define BLE_GATTS_OPT_BASE 0x80 /**< GATTS BLE Option base. */
  85. #define BLE_GATTS_OPT_LAST 0x9F /**< GATTS BLE Option last. */
  86. #define BLE_CFG_INVALID 0x00 /**< Invalid BLE configuration. */
  87. #define BLE_CFG_BASE 0x01 /**< Common BLE configuration base. */
  88. #define BLE_CFG_LAST 0x1F /**< Common BLE configuration last. */
  89. #define BLE_CONN_CFG_BASE 0x20 /**< BLE connection configuration base. */
  90. #define BLE_CONN_CFG_LAST 0x3F /**< BLE connection configuration last. */
  91. #define BLE_GAP_CFG_BASE 0x40 /**< GAP BLE configuration base. */
  92. #define BLE_GAP_CFG_LAST 0x5F /**< GAP BLE configuration last. */
  93. #define BLE_GATT_CFG_BASE 0x60 /**< GATT BLE configuration base. */
  94. #define BLE_GATT_CFG_LAST 0x7F /**< GATT BLE configuration last. */
  95. #define BLE_GATTC_CFG_BASE 0x80 /**< GATTC BLE configuration base. */
  96. #define BLE_GATTC_CFG_LAST 0x9F /**< GATTC BLE configuration last. */
  97. #define BLE_GATTS_CFG_BASE 0xA0 /**< GATTS BLE configuration base. */
  98. #define BLE_GATTS_CFG_LAST 0xBF /**< GATTS BLE configuration last. */
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102. #endif /* BLE_RANGES_H__ */
  103. /**
  104. @}
  105. @}
  106. */