diff options
Diffstat (limited to 'src/hid_core/hidbus/starlink.cpp')
| -rw-r--r-- | src/hid_core/hidbus/starlink.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/hid_core/hidbus/starlink.cpp b/src/hid_core/hidbus/starlink.cpp new file mode 100644 index 000000000..31b263aa1 --- /dev/null +++ b/src/hid_core/hidbus/starlink.cpp | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "hid_core/frontend/emulated_controller.h" | ||
| 5 | #include "hid_core/hid_core.h" | ||
| 6 | #include "hid_core/hidbus/starlink.h" | ||
| 7 | |||
| 8 | namespace Service::HID { | ||
| 9 | constexpr u8 DEVICE_ID = 0x28; | ||
| 10 | |||
| 11 | Starlink::Starlink(Core::System& system_, KernelHelpers::ServiceContext& service_context_) | ||
| 12 | : HidbusBase(system_, service_context_) {} | ||
| 13 | Starlink::~Starlink() = default; | ||
| 14 | |||
| 15 | void Starlink::OnInit() { | ||
| 16 | return; | ||
| 17 | } | ||
| 18 | |||
| 19 | void Starlink::OnRelease() { | ||
| 20 | return; | ||
| 21 | }; | ||
| 22 | |||
| 23 | void Starlink::OnUpdate() { | ||
| 24 | if (!is_activated) { | ||
| 25 | return; | ||
| 26 | } | ||
| 27 | if (!device_enabled) { | ||
| 28 | return; | ||
| 29 | } | ||
| 30 | if (!polling_mode_enabled || transfer_memory == 0) { | ||
| 31 | return; | ||
| 32 | } | ||
| 33 | |||
| 34 | LOG_ERROR(Service_HID, "Polling mode not supported {}", polling_mode); | ||
| 35 | } | ||
| 36 | |||
| 37 | u8 Starlink::GetDeviceId() const { | ||
| 38 | return DEVICE_ID; | ||
| 39 | } | ||
| 40 | |||
| 41 | std::vector<u8> Starlink::GetReply() const { | ||
| 42 | return {}; | ||
| 43 | } | ||
| 44 | |||
| 45 | bool Starlink::SetCommand(std::span<const u8> data) { | ||
| 46 | LOG_ERROR(Service_HID, "Command not implemented"); | ||
| 47 | return false; | ||
| 48 | } | ||
| 49 | |||
| 50 | } // namespace Service::HID | ||