@@ -26,12 +26,50 @@ extern "C" {
26
26
#include "ble_srv_common.h"
27
27
#include "headers/nrf_ble.h"
28
28
29
- #define CENTRAL_LINK_COUNT 3 /**<number of central links used by the application. When changing this number remember to adjust the RAM settings */
30
- /** If value for YOTTA_CFG_NORDIC_BLE_PERIPHERAL_LINKS was used, ram settings are adjusted by the yotta target module. */
31
- #define PERIPHERAL_LINK_COUNT 1 /**<number of peripheral links used by the application. When changing this number remember to adjust the RAM settings*/
32
- /** If value for YOTTA_CFG_NORDIC_BLE_CENTRAL_LINKS was used, ram settings are adjusted by the yotta target module. */
33
- #define GATTS_ATTR_TAB_SIZE 0x600 /**< GATTS attribite table size. */
34
- /** If value for YOTTA_CFG_NORDIC_BLE_GATTS_ATTR_TAB_SIZE was used, ram settings are adjusted by the yotta target module. */
29
+ /* number of central links used by the application.
30
+ * When changing this number remember to adjust the RAM settings */
31
+ #ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
32
+ #define CENTRAL_LINK_COUNT 3
33
+ #else
34
+ #define CENTRAL_LINK_COUNT NRF_SDH_BLE_CENTRAL_LINK_COUNT
35
+ #endif
36
+
37
+ /* number of peripheral links used by the application.
38
+ * When changing this number remember to adjust the RAM settings */
39
+ #ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
40
+ #define PERIPHERAL_LINK_COUNT 1
41
+ #else
42
+ #define PERIPHERAL_LINK_COUNT NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
43
+ #endif
44
+
45
+
46
+ /* GATTS attribite table size.
47
+ * When changing this number remember to adjust the RAM settings */
48
+ #ifndef NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE
49
+ #define GATTS_ATTR_TAB_SIZE 0x600
50
+ #else
51
+ #define GATTS_ATTR_TAB_SIZE NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE
52
+ #endif
53
+
54
+
55
+ /**
56
+ * Using this call, the application can select whether to include the
57
+ * Service Changed characteristic in the GATT Server. The default in all
58
+ * previous releases has been to include the Service Changed characteristic,
59
+ * but this affects how GATT clients behave. Specifically, it requires
60
+ * clients to subscribe to this attribute and not to cache attribute handles
61
+ * between connections unless the devices are bonded. If the application
62
+ * does not need to change the structure of the GATT server attributes at
63
+ * runtime this adds unnecessary complexity to the interaction with peer
64
+ * clients. If the SoftDevice is enabled with the Service Changed
65
+ * Characteristics turned off, then clients are allowed to cache attribute
66
+ * handles making applications simpler on both sides.
67
+ */
68
+ #ifndef NRF_SDH_BLE_SERVICE_CHANGED
69
+ #define IS_SRVC_CHANGED_CHARACT_PRESENT 1
70
+ #else
71
+ #define IS_SRVC_CHANGED_CHARACT_PRESENT NRF_SDH_BLE_SERVICE_CHANGED
72
+ #endif
35
73
36
74
error_t btle_init (void );
37
75
0 commit comments