1 /******************************************************************************
3 * Copyright (C) 2002-2012 Broadcom Corporation
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 ******************************************************************************/
19 /******************************************************************************
21 * This file contains the definition of the btm control block when
22 * BTM_DYNAMIC_MEMORY is used.
24 ******************************************************************************/
27 #include "bt_target.h"
31 /* Global BTM control block structure
33 #if BTM_DYNAMIC_MEMORY == FALSE
37 /*******************************************************************************
41 ** Description This function is called at BTM startup to allocate the
42 ** control block (if using dynamic memory), and initializes the
43 ** tracing level. It then initializes the various components of
48 *******************************************************************************/
51 /* All fields are cleared; nonzero fields are reinitialized in appropriate function */
52 memset(&btm_cb, 0, sizeof(tBTM_CB));
54 #if defined(BTM_INITIAL_TRACE_LEVEL)
55 btm_cb.trace_level = BTM_INITIAL_TRACE_LEVEL;
57 btm_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
59 /* Initialize BTM component structures */
60 btm_inq_db_init(); /* Inquiry Database and Structures */
61 btm_acl_init(); /* ACL Database and Structures */
62 btm_sec_init(BTM_SEC_MODE_SP); /* Security Manager Database and Structures */
63 #if BTM_SCO_INCLUDED == TRUE
64 btm_sco_init(); /* SCO Database and Structures (If included) */
67 btm_dev_init(); /* Device Manager Structures & HCI_Reset */