bte_init.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. * This module contains the routines that initialize the stack components.
  21. * It must be called before the BTU task is started.
  22. *
  23. ******************************************************************************/
  24. #include <string.h>
  25. #include "bt_target.h"
  26. #include "bte.h"
  27. /* Include initialization functions definitions */
  28. #include "port_api.h"
  29. #if (BNEP_INCLUDED == TRUE)
  30. #include "bnep_api.h"
  31. #endif
  32. #include "gap_api.h"
  33. #if (PAN_INCLUDED == TRUE)
  34. #include "pan_api.h"
  35. #endif
  36. #include "avrc_api.h"
  37. #include "a2dp_api.h"
  38. #if (HID_HOST_INCLUDED == TRUE)
  39. #include "hidh_api.h"
  40. #endif
  41. #include "gatt_api.h"
  42. #include "smp_api.h"
  43. /*****************************************************************************
  44. * F U N C T I O N S *
  45. *****************************************************************************/
  46. /*****************************************************************************
  47. *
  48. * Function BTE_InitStack
  49. *
  50. * Description Initialize control block memory for each component.
  51. *
  52. * Note: The core stack components must be called
  53. * before creating the BTU Task. The rest of the
  54. * components can be initialized at a later time if desired
  55. * as long as the component's init function is called
  56. * before accessing any of its functions.
  57. *
  58. * Returns void
  59. *
  60. *****************************************************************************/
  61. void BTE_InitStack(void) {
  62. /* Initialize the optional stack components */
  63. RFCOMM_Init();
  64. /**************************
  65. * BNEP and its profiles **
  66. **************************/
  67. #if (BNEP_INCLUDED == TRUE)
  68. BNEP_Init();
  69. #if (PAN_INCLUDED == TRUE)
  70. PAN_Init();
  71. #endif /* PAN */
  72. #endif /* BNEP Included */
  73. /**************************
  74. * AVDT and its profiles **
  75. **************************/
  76. A2DP_Init();
  77. AVRC_Init();
  78. /***********
  79. * Others **
  80. ***********/
  81. GAP_Init();
  82. #if (HID_HOST_INCLUDED == TRUE)
  83. HID_HostInit();
  84. #endif
  85. }