starlink.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "hid_core/frontend/emulated_controller.h"
  4. #include "hid_core/hid_core.h"
  5. #include "hid_core/hidbus/starlink.h"
  6. namespace Service::HID {
  7. constexpr u8 DEVICE_ID = 0x28;
  8. Starlink::Starlink(Core::System& system_, KernelHelpers::ServiceContext& service_context_)
  9. : HidbusBase(system_, service_context_) {}
  10. Starlink::~Starlink() = default;
  11. void Starlink::OnInit() {
  12. return;
  13. }
  14. void Starlink::OnRelease() {
  15. return;
  16. };
  17. void Starlink::OnUpdate() {
  18. if (!is_activated) {
  19. return;
  20. }
  21. if (!device_enabled) {
  22. return;
  23. }
  24. if (!polling_mode_enabled || transfer_memory == 0) {
  25. return;
  26. }
  27. LOG_ERROR(Service_HID, "Polling mode not supported {}", polling_mode);
  28. }
  29. u8 Starlink::GetDeviceId() const {
  30. return DEVICE_ID;
  31. }
  32. u64 Starlink::GetReply(std::span<u8> out_data) const {
  33. return {};
  34. }
  35. bool Starlink::SetCommand(std::span<const u8> data) {
  36. LOG_ERROR(Service_HID, "Command not implemented");
  37. return false;
  38. }
  39. } // namespace Service::HID