• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright 2000-2012 Broadcom Corporation
4  *
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:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  *
17  ******************************************************************************/
18 
19 /******************************************************************************
20  *
21  *  This module contains the routines that initialize the stack components.
22  *  It must be called before the BTU task is started.
23  *
24  ******************************************************************************/
25 
26 #include <string.h>
27 #include "bt_target.h"
28 
29 #include "bte.h"
30 
31 /* Include initialization functions definitions */
32 #include "port_api.h"
33 
34 #if (BNEP_INCLUDED == TRUE)
35 #include "bnep_api.h"
36 #endif
37 
38 #include "gap_api.h"
39 
40 #if (PAN_INCLUDED == TRUE)
41 #include "pan_api.h"
42 #endif
43 
44 #include "avrc_api.h"
45 #include "a2dp_api.h"
46 
47 #if (HID_HOST_INCLUDED == TRUE)
48 #include "hidh_api.h"
49 #endif
50 
51 #include "gatt_api.h"
52 #include "smp_api.h"
53 
54 /*****************************************************************************
55  *                          F U N C T I O N S                                *
56  *****************************************************************************/
57 
58 /*****************************************************************************
59  *
60  * Function         BTE_InitStack
61  *
62  * Description      Initialize control block memory for each component.
63  *
64  *                  Note: The core stack components must be called
65  *                      before creating the BTU Task.  The rest of the
66  *                      components can be initialized at a later time if desired
67  *                      as long as the component's init function is called
68  *                      before accessing any of its functions.
69  *
70  * Returns          void
71  *
72  *****************************************************************************/
BTE_InitStack(void)73 void BTE_InitStack(void) {
74   /* Initialize the optional stack components */
75   RFCOMM_Init();
76 
77 /**************************
78  * BNEP and its profiles **
79  **************************/
80 #if (BNEP_INCLUDED == TRUE)
81   BNEP_Init();
82 
83 #if (PAN_INCLUDED == TRUE)
84   PAN_Init();
85 #endif /* PAN */
86 #endif /* BNEP Included */
87 
88 /**************************
89  * AVDT and its profiles **
90  **************************/
91   A2DP_Init();
92 
93   AVRC_Init();
94 
95   /***********
96    * Others **
97    ***********/
98   GAP_Init();
99 
100 #if (HID_HOST_INCLUDED == TRUE)
101   HID_HostInit();
102 #endif
103 }
104