Files
Christopher Collins 6709c868f2 Allow the host to be stopped and started again
The application can stop the host by calling `ble_hs_stop()`.  Stopping
the host has the following effects:
* Abort all active GAP procedures with status BLE_HS_EPREEMPTED.
* Disallow any subsequent GAP procedures until the host is started
  again.
* Terminate all established connections.

If multiple clients attempt to stop the host simultaneously, all of
their provided callbacks are executed when the host stops.  The purpose
of this behavior is to guarantee a consistent shutdown procedure.
2018-11-21 14:47:27 -08:00

122 lines
4.8 KiB
Makefile

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# * http://www.apache.org/licenses/LICENSE-2.0
# * Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
ifeq (,$(NIMBLE_ROOT))
$(error NIMBLE_ROOT shall be defined)
endif
NIMBLE_CFLAGS :=
NIMBLE_INCLUDE := \
$(NIMBLE_ROOT)/nimble/include \
$(NIMBLE_ROOT)/nimble/host/include \
$(NIMBLE_ROOT)/nimble/host/services/ans/include \
$(NIMBLE_ROOT)/nimble/host/services/bas/include \
$(NIMBLE_ROOT)/nimble/host/services/bleuart/include \
$(NIMBLE_ROOT)/nimble/host/services/gap/include \
$(NIMBLE_ROOT)/nimble/host/services/gatt/include \
$(NIMBLE_ROOT)/nimble/host/services/ias/include \
$(NIMBLE_ROOT)/nimble/host/services/lls/include \
$(NIMBLE_ROOT)/nimble/host/services/tps/include \
$(NIMBLE_ROOT)/nimble/host/store/ram/include \
$(NIMBLE_ROOT)/nimble/host/util/include \
$(NIMBLE_ROOT)/porting/nimble/include \
$(NULL)
NIMBLE_SRC := \
$(NIMBLE_ROOT)/nimble/host/src/ble_att.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_att_clt.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_att_cmd.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_att_svr.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_eddystone.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_gap.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_gattc.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_gatts.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_adv.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_atomic.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_cfg.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_conn.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_dbg.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_flow.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_hci.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_hci_cmd.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_hci_evt.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_hci_util.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_id.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_log.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_mbuf.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_mqueue.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_misc.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_pvcy.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_startup.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_hs_stop.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_ibeacon.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_l2cap.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_l2cap_coc.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_l2cap_sig.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_l2cap_sig_cmd.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_monitor.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_sm_alg.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_sm.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_sm_cmd.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_sm_lgcy.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_sm_sc.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_store.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_store_util.c \
$(NIMBLE_ROOT)/nimble/host/src/ble_uuid.c \
$(NIMBLE_ROOT)/nimble/host/services/ans/src/ble_svc_ans.c \
$(NIMBLE_ROOT)/nimble/host/services/bas/src/ble_svc_bas.c \
$(NIMBLE_ROOT)/nimble/host/services/gap/src/ble_svc_gap.c \
$(NIMBLE_ROOT)/nimble/host/services/gatt/src/ble_svc_gatt.c \
$(NIMBLE_ROOT)/nimble/host/services/ias/src/ble_svc_ias.c \
$(NIMBLE_ROOT)/nimble/host/services/lls/src/ble_svc_lls.c \
$(NIMBLE_ROOT)/nimble/host/services/tps/src/ble_svc_tps.c \
$(NIMBLE_ROOT)/nimble/host/store/ram/src/ble_store_ram.c \
$(NIMBLE_ROOT)/nimble/host/util/src/addr.c \
$(NIMBLE_ROOT)/nimble/src/ble_util.c \
$(NULL)
# Few utils and data structures copied from Mynewt
NIMBLE_SRC += \
$(NIMBLE_ROOT)/porting/nimble/src/nimble_port.c \
$(NULL)
# Few utils and data structures copied from Mynewt
NIMBLE_SRC += \
$(NIMBLE_ROOT)/porting/nimble/src/endian.c \
$(NIMBLE_ROOT)/porting/nimble/src/mem.c \
$(NIMBLE_ROOT)/porting/nimble/src/os_mbuf.c \
$(NIMBLE_ROOT)/porting/nimble/src/os_mempool.c \
$(NIMBLE_ROOT)/porting/nimble/src/os_msys_init.c \
$(NULL)
ifneq (,$(NIMBLE_CFG_CONTROLLER))
include $(NIMBLE_ROOT)/porting/nimble/Makefile.controller
endif
# TinyCrypt (for SM)
ifneq (,$(NIMBLE_CFG_TINYCRYPT))
include $(NIMBLE_ROOT)/porting/nimble/Makefile.tinycrypt
endif
ifneq (,$(NIMBLE_CFG_MESH))
include $(NIMBLE_ROOT)/porting/nimble/Makefile.mesh
endif
NIMBLE_OBJ := $(NIMBLE_SRC:.c=.o)