feat(nimble): Added changes in examples to have code under flags

This commit is contained in:
Rahul Tank
2026-03-12 10:43:37 +05:30
committed by Astha Verma
parent ec6b6daa66
commit 2234b81cab
20 changed files with 99 additions and 10 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -227,9 +227,15 @@ gatt_svr_init(void)
{
int rc;
#if CONFIG_BT_NIMBLE_GAP_SERVICE
ble_svc_gap_init();
#endif /* CONFIG_BT_NIMBLE_GAP_SERVICE */
#if MYNEWT_VAL(BLE_GATTS)
ble_svc_gatt_init();
#endif
#if CONFIG_BT_NIMBLE_ANS_SERVICE
ble_svc_ans_init();
#endif
rc = ble_gatts_count_cfg(gatt_svr_svcs);
if (rc != 0) {