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
@@ -945,6 +945,7 @@ app_main(void)
rc = peer_init(MYNEWT_VAL(BLE_MAX_CONNECTIONS), 64, 64, 64);
assert(rc == 0);
#endif
/* Set the default device name. */
rc = ble_svc_gap_device_name_set("gattc-throughput");
assert(rc == 0);
@@ -26,10 +26,10 @@ static uint8_t ext_adv_pattern[] = {
};
static uint8_t s_current_phy;
#else
static const char *device_name = "nimble_prph";
#endif
static const char *device_name = "nimble_prph";
#define NOTIFY_THROUGHPUT_PAYLOAD 495
#define MIN_REQUIRED_MBUF 2 /* Assuming payload of 500Bytes and each mbuf can take 292Bytes. */
#define PREFERRED_MTU_VALUE 512
@@ -509,10 +509,10 @@ void app_main(void)
/* Initialize Notify Task */
xTaskCreate(notify_task, "notify_task", 4096, NULL, 10, NULL);
#if MYNEWT_VAL(BLE_GATTS)
rc = gatt_svr_init();
assert(rc == 0);
#if !(CONFIG_EXAMPLE_EXTENDED_ADV)
/* Set the default device name */
rc = ble_svc_gap_device_name_set(device_name);
assert(rc == 0);