Loading system/hci/include/hci_layer.h +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #pragma once #include <base/functional/callback.h> #include <base/location.h> #include "stack/include/bt_hdr.h" #include "stack/include/bt_types.h" Loading Loading @@ -51,7 +50,7 @@ typedef void (*command_status_cb)(uint8_t status, BT_HDR* command, void* context typedef struct hci_t { // Set the callback that the HCI layer uses to send data upwards void (*set_data_cb)(base::Callback<void(const base::Location&, BT_HDR*)> send_data_cb); void (*set_data_cb)(base::Callback<void(BT_HDR*)> send_data_cb); // Send a command through the HCI layer void (*transmit_command)(const BT_HDR* command, command_complete_cb complete_callback, Loading system/main/shim/hci_layer.cc +5 −5 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ constexpr size_t kBtHdrSize = sizeof(BT_HDR); constexpr size_t kCommandLengthSize = sizeof(uint8_t); constexpr size_t kCommandOpcodeSize = sizeof(uint16_t); static base::Callback<void(const base::Location&, BT_HDR*)> send_data_upwards; static base::Callback<void(BT_HDR*)> send_data_upwards; static const packet_fragmenter_t* packet_fragmenter; namespace { Loading Loading @@ -142,14 +142,14 @@ static void event_callback(bluetooth::hci::EventView event_packet_view) { if (!send_data_upwards) { return; } send_data_upwards.Run(FROM_HERE, WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &event_packet_view)); send_data_upwards.Run(WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &event_packet_view)); } static void subevent_callback(bluetooth::hci::LeMetaEventView le_meta_event_view) { if (!send_data_upwards) { return; } send_data_upwards.Run(FROM_HERE, WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &le_meta_event_view)); send_data_upwards.Run(WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &le_meta_event_view)); } void OnTransmitPacketCommandComplete(command_complete_cb complete_callback, void* context, Loading Loading @@ -289,7 +289,7 @@ using bluetooth::common::Bind; using bluetooth::common::BindOnce; using bluetooth::common::Unretained; static void set_data_cb(base::Callback<void(const base::Location&, BT_HDR*)> send_data_cb) { static void set_data_cb(base::Callback<void(BT_HDR*)> send_data_cb) { send_data_upwards = std::move(send_data_cb); } Loading Loading @@ -321,7 +321,7 @@ static void dispatch_reassembled(BT_HDR* packet) { "assert failed: (packet->event & MSG_EVT_MASK) == " "MSG_HC_TO_STACK_HCI_ISO"); log::assert_that(!send_data_upwards.is_null(), "assert failed: !send_data_upwards.is_null()"); send_data_upwards.Run(FROM_HERE, packet); send_data_upwards.Run(packet); } static const packet_fragmenter_callbacks_t packet_fragmenter_callbacks = {transmit_fragment, Loading system/main/shim/shim.cc +2 −2 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ static const hci_t* hci; void btu_hci_msg_process(BT_HDR* p_msg); static void post_to_main_message_loop(const base::Location& from_here, BT_HDR* p_msg) { static void post_to_main_message_loop(BT_HDR* p_msg) { if (do_in_main_thread(base::Bind(&btu_hci_msg_process, p_msg)) != BT_STATUS_SUCCESS) { bluetooth::log::error(": do_in_main_thread failed from {}", from_here.ToString()); bluetooth::log::error("do_in_main_thread failed"); } } Loading system/stack/test/btm_iso_test.cc +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public: static MockIsoInterface* iso_interface = nullptr; static void SetMockIsoInterface(MockIsoInterface* interface) { iso_interface = interface; } static void set_data_cb(base::Callback<void(const base::Location&, BT_HDR*)> /* send_data_cb */) { static void set_data_cb(base::Callback<void(BT_HDR*)> /* send_data_cb */) { FAIL() << __func__ << " should never be called"; } Loading Loading
system/hci/include/hci_layer.h +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #pragma once #include <base/functional/callback.h> #include <base/location.h> #include "stack/include/bt_hdr.h" #include "stack/include/bt_types.h" Loading Loading @@ -51,7 +50,7 @@ typedef void (*command_status_cb)(uint8_t status, BT_HDR* command, void* context typedef struct hci_t { // Set the callback that the HCI layer uses to send data upwards void (*set_data_cb)(base::Callback<void(const base::Location&, BT_HDR*)> send_data_cb); void (*set_data_cb)(base::Callback<void(BT_HDR*)> send_data_cb); // Send a command through the HCI layer void (*transmit_command)(const BT_HDR* command, command_complete_cb complete_callback, Loading
system/main/shim/hci_layer.cc +5 −5 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ constexpr size_t kBtHdrSize = sizeof(BT_HDR); constexpr size_t kCommandLengthSize = sizeof(uint8_t); constexpr size_t kCommandOpcodeSize = sizeof(uint16_t); static base::Callback<void(const base::Location&, BT_HDR*)> send_data_upwards; static base::Callback<void(BT_HDR*)> send_data_upwards; static const packet_fragmenter_t* packet_fragmenter; namespace { Loading Loading @@ -142,14 +142,14 @@ static void event_callback(bluetooth::hci::EventView event_packet_view) { if (!send_data_upwards) { return; } send_data_upwards.Run(FROM_HERE, WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &event_packet_view)); send_data_upwards.Run(WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &event_packet_view)); } static void subevent_callback(bluetooth::hci::LeMetaEventView le_meta_event_view) { if (!send_data_upwards) { return; } send_data_upwards.Run(FROM_HERE, WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &le_meta_event_view)); send_data_upwards.Run(WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &le_meta_event_view)); } void OnTransmitPacketCommandComplete(command_complete_cb complete_callback, void* context, Loading Loading @@ -289,7 +289,7 @@ using bluetooth::common::Bind; using bluetooth::common::BindOnce; using bluetooth::common::Unretained; static void set_data_cb(base::Callback<void(const base::Location&, BT_HDR*)> send_data_cb) { static void set_data_cb(base::Callback<void(BT_HDR*)> send_data_cb) { send_data_upwards = std::move(send_data_cb); } Loading Loading @@ -321,7 +321,7 @@ static void dispatch_reassembled(BT_HDR* packet) { "assert failed: (packet->event & MSG_EVT_MASK) == " "MSG_HC_TO_STACK_HCI_ISO"); log::assert_that(!send_data_upwards.is_null(), "assert failed: !send_data_upwards.is_null()"); send_data_upwards.Run(FROM_HERE, packet); send_data_upwards.Run(packet); } static const packet_fragmenter_callbacks_t packet_fragmenter_callbacks = {transmit_fragment, Loading
system/main/shim/shim.cc +2 −2 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ static const hci_t* hci; void btu_hci_msg_process(BT_HDR* p_msg); static void post_to_main_message_loop(const base::Location& from_here, BT_HDR* p_msg) { static void post_to_main_message_loop(BT_HDR* p_msg) { if (do_in_main_thread(base::Bind(&btu_hci_msg_process, p_msg)) != BT_STATUS_SUCCESS) { bluetooth::log::error(": do_in_main_thread failed from {}", from_here.ToString()); bluetooth::log::error("do_in_main_thread failed"); } } Loading
system/stack/test/btm_iso_test.cc +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public: static MockIsoInterface* iso_interface = nullptr; static void SetMockIsoInterface(MockIsoInterface* interface) { iso_interface = interface; } static void set_data_cb(base::Callback<void(const base::Location&, BT_HDR*)> /* send_data_cb */) { static void set_data_cb(base::Callback<void(BT_HDR*)> /* send_data_cb */) { FAIL() << __func__ << " should never be called"; } Loading