fix(nimble): Address compilation issues in nimble examples

This commit is contained in:
Rahul Tank
2025-10-30 11:37:18 +05:30
parent 998586a8ec
commit 3591e526f0
34 changed files with 173 additions and 32 deletions
@@ -167,7 +167,6 @@ bleprph_advertise(void)
{
struct ble_gap_adv_params adv_params;
struct ble_hs_adv_fields fields;
const char *name;
int rc;
/**
@@ -194,6 +193,7 @@ bleprph_advertise(void)
fields.tx_pwr_lvl_is_present = 1;
fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
const char *name;
name = ble_svc_gap_device_name();
fields.name = (uint8_t *)name;
fields.name_len = strlen(name);
@@ -620,6 +620,7 @@ app_main(void)
ble_hs_cfg.sm_their_key_dist |= BLE_SM_PAIR_KEY_DIST_ID;
#endif
#if MYNEWT_VAL(BLE_GATTS)
rc = gatt_svr_init();
assert(rc == 0);
@@ -627,6 +628,7 @@ app_main(void)
/* Set the default device name. */
rc = ble_svc_gap_device_name_set("nimble-bleprph");
assert(rc == 0);
#endif
#endif
/* XXX Need to have template for store */