Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4213672c authored by Zach Johnson's avatar Zach Johnson
Browse files

Flatten btu_init_core

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I76577cbb682deed23c0536d9b625908f06ad70c6
parent 27fff601
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@
#include "btif_config.h"
#include "btif_profile_queue.h"
#include "internal_include/bte.h"
#include "stack/btm/btm_int.h"
#include "stack/include/gatt_api.h"
#include "stack/include/l2c_api.h"
#include "stack/sdp/sdpint.h"

using bluetooth::common::MessageLoopThread;

@@ -169,7 +173,13 @@ static void event_start_up_stack(UNUSED_ATTR void* context) {

  BTU_StartUp();

  btu_init_core();
  btm_init();
  l2c_init();
  sdp_init();
  gatt_init();
  SMP_Init();
  btm_ble_init();

  BTE_InitStack();
  bta_sys_init();
  module_init(get_module(BTE_LOGMSG_MODULE));
+0 −25
Original line number Diff line number Diff line
@@ -35,31 +35,6 @@ MessageLoopThread bt_startup_thread("bt_startup_thread");

void btu_task_shut_down();

/*****************************************************************************
 *
 * Function         btu_init_core
 *
 * Description      Initialize control block memory for each core component.
 *
 *
 * Returns          void
 *
 *****************************************************************************/
void btu_init_core() {
  /* Initialize the mandatory core stack components */
  btm_init();

  l2c_init();

  sdp_init();

  gatt_init();

  SMP_Init();

  btm_ble_init();
}

/*****************************************************************************
 *
 * Function         btu_free_core
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ void btu_hcif_send_cmd_with_cb(const base::Location& posted_from,
/* Functions provided by btu_init.cc
 ***********************************
*/
void btu_init_core(void);
void btu_free_core(void);

/* Functions provided by btu_task.cc