mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(nimble): Added changes in examples to have code under flags
This commit is contained in:
@@ -221,9 +221,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) {
|
||||
|
||||
@@ -220,7 +220,12 @@ ble_transport_to_ll_cmd_impl(void *buf)
|
||||
data[0] = HCI_H4_CMD;
|
||||
memcpy(data + 1, buf, len - 1);
|
||||
hci_uart_send(data, len);
|
||||
|
||||
#if MYNEWT_VAL(MP_RUNTIME_ALLOC)
|
||||
ble_transport_free(BLE_HCI_CMD, buf);
|
||||
#else
|
||||
ble_transport_free(buf);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user