Loading system/hci/include/hci_layer.h +5 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,11 @@ typedef struct hci_t { void (*transmit_downward)(uint16_t type, void* data); } hci_t; namespace bluetooth { namespace legacy { const hci_t* hci_layer_get_interface(); } // namespace legacy } // namespace bluetooth const hci_t* hci_layer_get_interface(); const hci_t* hci_layer_get_test_interface( Loading system/hci/src/hci_layer.cc +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "hci_internals.h" #include "hcidefs.h" #include "hcimsgs.h" #include "main/shim/shim.h" #include "osi/include/alarm.h" #include "osi/include/list.h" #include "osi/include/log.h" Loading Loading @@ -719,7 +720,21 @@ void hci_layer_cleanup_interface() { } } namespace bluetooth { namespace shim { const hci_t* hci_layer_get_interface(); } // namespace shim } // namespace bluetooth const hci_t* hci_layer_get_interface() { if (bluetooth::shim::is_gd_shim_enabled()) { return bluetooth::shim::hci_layer_get_interface(); } else { return bluetooth::legacy::hci_layer_get_interface(); } } const hci_t* bluetooth::legacy::hci_layer_get_interface() { buffer_allocator = buffer_allocator_get_interface(); btsnoop = btsnoop_get_interface(); packet_fragmenter = packet_fragmenter_get_interface(); Loading Loading
system/hci/include/hci_layer.h +5 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,11 @@ typedef struct hci_t { void (*transmit_downward)(uint16_t type, void* data); } hci_t; namespace bluetooth { namespace legacy { const hci_t* hci_layer_get_interface(); } // namespace legacy } // namespace bluetooth const hci_t* hci_layer_get_interface(); const hci_t* hci_layer_get_test_interface( Loading
system/hci/src/hci_layer.cc +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "hci_internals.h" #include "hcidefs.h" #include "hcimsgs.h" #include "main/shim/shim.h" #include "osi/include/alarm.h" #include "osi/include/list.h" #include "osi/include/log.h" Loading Loading @@ -719,7 +720,21 @@ void hci_layer_cleanup_interface() { } } namespace bluetooth { namespace shim { const hci_t* hci_layer_get_interface(); } // namespace shim } // namespace bluetooth const hci_t* hci_layer_get_interface() { if (bluetooth::shim::is_gd_shim_enabled()) { return bluetooth::shim::hci_layer_get_interface(); } else { return bluetooth::legacy::hci_layer_get_interface(); } } const hci_t* bluetooth::legacy::hci_layer_get_interface() { buffer_allocator = buffer_allocator_get_interface(); btsnoop = btsnoop_get_interface(); packet_fragmenter = packet_fragmenter_get_interface(); Loading