mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(nimble): Address compilation issues in nimble examples
This commit is contained in:
@@ -44,6 +44,7 @@ void printtime(struct ble_svc_cts_curr_time ctime) {
|
||||
ESP_LOGI(tag, "fractions : %d\n", ctime.et_256.fractions_256);
|
||||
}
|
||||
|
||||
#if MYNEWT_VAL(BLE_GATTC)
|
||||
/**
|
||||
* Application callback. Called when the read of the cts current time
|
||||
* characteristic has completed.
|
||||
@@ -137,6 +138,7 @@ ble_cts_cent_on_disc_complete(const struct peer *peer, int status, void *arg)
|
||||
*/
|
||||
ble_cts_cent_read_time(peer);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initiates the GAP general discovery procedure.
|
||||
@@ -434,6 +436,7 @@ ble_cts_cent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#if MYNEWT_VAL(BLE_GATTC)
|
||||
/* Perform service discovery */
|
||||
rc = peer_disc_all(event->connect.conn_handle,
|
||||
ble_cts_cent_on_disc_complete, NULL);
|
||||
@@ -441,6 +444,7 @@ ble_cts_cent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
MODLOG_DFLT(ERROR, "Failed to discover services; rc=%d\n", rc);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif // BLE_GATT_CACHING_ASSOC_ENABLE
|
||||
#endif
|
||||
} else {
|
||||
@@ -485,6 +489,7 @@ ble_cts_cent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#if MYNEWT_VAL(BLE_GATTC)
|
||||
/*** Go for service discovery after encryption has been successfully enabled ***/
|
||||
rc = peer_disc_all(event->connect.conn_handle,
|
||||
ble_cts_cent_on_disc_complete, NULL);
|
||||
@@ -492,6 +497,7 @@ ble_cts_cent_gap_event(struct ble_gap_event *event, void *arg)
|
||||
MODLOG_DFLT(ERROR, "Failed to discover services; rc=%d\n", rc);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif // BLE_GATT_CACHING_ASSOC_ENABLE
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user