summaryrefslogtreecommitdiffstats
path: root/src/hid_core/hidbus/ringcon.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-02-07 23:43:28 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2024-02-08 01:07:32 +0100
commitb4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd (patch)
tree1e1dd7aa5bc3f544316c744cf1f28f508becb6a9 /src/hid_core/hidbus/ringcon.h
parentMerge pull request #12883 from FernandoS27/memory_manager_mem (diff)
downloadyuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar.gz
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar.bz2
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar.lz
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar.xz
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.tar.zst
yuzu-b4d88a7bb406c033c3cd5c6bca6ce913fac1bcdd.zip
Diffstat (limited to 'src/hid_core/hidbus/ringcon.h')
-rw-r--r--src/hid_core/hidbus/ringcon.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/hid_core/hidbus/ringcon.h b/src/hid_core/hidbus/ringcon.h
index 0953e8100..a48eeed45 100644
--- a/src/hid_core/hidbus/ringcon.h
+++ b/src/hid_core/hidbus/ringcon.h
@@ -34,7 +34,7 @@ public:
bool SetCommand(std::span<const u8> data) override;
// Returns a reply from a command
- std::vector<u8> GetReply() const override;
+ u64 GetReply(std::span<u8> data) const override;
private:
// These values are obtained from a real ring controller
@@ -184,44 +184,44 @@ private:
RingConData GetSensorValue() const;
// Returns 8 byte reply with firmware version
- std::vector<u8> GetFirmwareVersionReply() const;
+ u64 GetFirmwareVersionReply(std::span<u8> out_data) const;
// Returns 16 byte reply with ID values
- std::vector<u8> GetReadIdReply() const;
+ u64 GetReadIdReply(std::span<u8> out_data) const;
// (STUBBED) Returns 8 byte reply
- std::vector<u8> GetC020105Reply() const;
+ u64 GetC020105Reply(std::span<u8> out_data) const;
// (STUBBED) Returns 8 byte empty reply
- std::vector<u8> GetReadUnkCalReply() const;
+ u64 GetReadUnkCalReply(std::span<u8> out_data) const;
// Returns 20 byte reply with factory calibration values
- std::vector<u8> GetReadFactoryCalReply() const;
+ u64 GetReadFactoryCalReply(std::span<u8> out_data) const;
// Returns 20 byte reply with user calibration values
- std::vector<u8> GetReadUserCalReply() const;
+ u64 GetReadUserCalReply(std::span<u8> out_data) const;
// Returns 8 byte reply
- std::vector<u8> GetReadRepCountReply() const;
+ u64 GetReadRepCountReply(std::span<u8> out_data) const;
// Returns 8 byte reply
- std::vector<u8> GetReadTotalPushCountReply() const;
+ u64 GetReadTotalPushCountReply(std::span<u8> out_data) const;
// Returns 8 byte reply
- std::vector<u8> GetResetRepCountReply() const;
+ u64 GetResetRepCountReply(std::span<u8> out_data) const;
// Returns 4 byte save data reply
- std::vector<u8> GetSaveDataReply() const;
+ u64 GetSaveDataReply(std::span<u8> out_data) const;
// Returns 8 byte error reply
- std::vector<u8> GetErrorReply() const;
+ u64 GetErrorReply(std::span<u8> out_data) const;
// Returns 8 bit redundancy check from provided data
u8 GetCrcValue(const std::vector<u8>& data) const;
// Converts structs to an u8 vector equivalent
template <typename T>
- std::vector<u8> GetDataVector(const T& reply) const;
+ u64 GetData(const T& reply, std::span<u8> out_data) const;
RingConCommands command{RingConCommands::Error};