2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2021-05-02 18:41:03 -05:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
2024-01-04 20:37:43 -06:00
|
|
|
#include "hid_core/hidbus/hidbus_base.h"
|
2021-05-02 18:41:03 -05:00
|
|
|
|
|
|
|
namespace Core::HID {
|
|
|
|
class EmulatedController;
|
|
|
|
} // namespace Core::HID
|
|
|
|
|
|
|
|
namespace Service::HID {
|
|
|
|
|
|
|
|
class Starlink final : public HidbusBase {
|
|
|
|
public:
|
2023-02-24 12:29:55 -05:00
|
|
|
explicit Starlink(Core::System& system_, KernelHelpers::ServiceContext& service_context_);
|
2021-05-02 18:41:03 -05:00
|
|
|
~Starlink() override;
|
|
|
|
|
|
|
|
void OnInit() override;
|
|
|
|
|
|
|
|
void OnRelease() override;
|
|
|
|
|
|
|
|
// Updates ringcon transfer memory
|
|
|
|
void OnUpdate() override;
|
|
|
|
|
|
|
|
// Returns the device ID of the joycon
|
|
|
|
u8 GetDeviceId() const override;
|
|
|
|
|
|
|
|
// Assigns a command from data
|
2023-02-03 00:08:45 -05:00
|
|
|
bool SetCommand(std::span<const u8> data) override;
|
2021-05-02 18:41:03 -05:00
|
|
|
|
|
|
|
// Returns a reply from a command
|
2024-02-07 16:43:28 -06:00
|
|
|
u64 GetReply(std::span<u8> out_data) const override;
|
2021-05-02 18:41:03 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Service::HID
|