diff --git a/pw_bluetooth_sapphire/host/testing/fake_controller.cc b/pw_bluetooth_sapphire/host/testing/fake_controller.cc index 89379593b8..d2001af50d 100644 --- a/pw_bluetooth_sapphire/host/testing/fake_controller.cc +++ b/pw_bluetooth_sapphire/host/testing/fake_controller.cc @@ -1786,11 +1786,13 @@ void FakeController::OnWritePageScanType( } void FakeController::OnReadPageScanType() { - hci_spec::ReadPageScanTypeReturnParams params; - params.status = pwemb::StatusCode::SUCCESS; - params.page_scan_type = page_scan_type_; - RespondWithCommandComplete(hci_spec::kReadPageScanType, - BufferView(¶ms, sizeof(params))); + auto event_packet = hci::EmbossEventPacket::New< + pwemb::ReadPageScanTypeCommandCompleteEventWriter>( + hci_spec::kCommandCompleteEventCode); + auto view = event_packet.view_t(); + view.status().Write(pwemb::StatusCode::SUCCESS); + view.page_scan_type().Write(page_scan_type_); + RespondWithCommandComplete(pwemb::OpCode::READ_PAGE_SCAN_TYPE, &event_packet); } void FakeController::OnWriteInquiryMode( diff --git a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h index b2908909ae..4cf39fa6ae 100644 --- a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h +++ b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h @@ -389,14 +389,6 @@ constexpr OpCode kWriteInquiryMode = ControllerAndBasebandOpCode(0x0045); // Read Page Scan Type (v1.2) (BR/EDR) constexpr OpCode kReadPageScanType = ControllerAndBasebandOpCode(0x0046); -struct ReadPageScanTypeReturnParams { - // See enum StatusCode in hci_constants.h. - StatusCode status; - - // See enum class PageScanType in hci_constants.h for possible values. - pw::bluetooth::emboss::PageScanType page_scan_type; -} __attribute__((packed)); - // ==================================== // Write Page Scan Type (v1.2) (BR/EDR) constexpr OpCode kWritePageScanType = ControllerAndBasebandOpCode(0x0047);