mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-15 22:47:53 +00:00
nimble/host: Build ble_hs_periodic_sync only when enabled
When periodic advertising support is disabled this code is never used.
This commit is contained in:
@@ -743,8 +743,10 @@ ble_hs_init(void)
|
||||
rc = ble_hs_conn_init();
|
||||
SYSINIT_PANIC_ASSERT(rc == 0);
|
||||
|
||||
#if MYNEWT_VAL(BLE_PERIODIC_ADV)
|
||||
rc = ble_hs_periodic_sync_init();
|
||||
SYSINIT_PANIC_ASSERT(rc == 0);
|
||||
#endif
|
||||
|
||||
rc = ble_l2cap_init();
|
||||
SYSINIT_PANIC_ASSERT(rc == 0);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "host/ble_hs_id.h"
|
||||
#include "ble_hs_priv.h"
|
||||
|
||||
#if MYNEWT_VAL(BLE_PERIODIC_ADV)
|
||||
static SLIST_HEAD(, ble_hs_periodic_sync) g_ble_hs_periodic_sync_handles;
|
||||
static struct os_mempool ble_hs_periodic_sync_pool;
|
||||
|
||||
@@ -150,3 +151,4 @@ ble_hs_periodic_sync_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user