diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-06-17 05:57:21 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-06-22 01:54:58 +0200 |
commit | 84d43489c5df9f450efb0293cc58161d08e3b882 (patch) | |
tree | c4d45b021c78392956dc58d409a34632fe135d2b /src/common | |
parent | Merge pull request #10783 from liamwhite/memory (diff) | |
download | yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar.gz yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar.bz2 yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar.lz yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar.xz yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.tar.zst yuzu-84d43489c5df9f450efb0293cc58161d08e3b882.zip |
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/input.h | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/src/common/input.h b/src/common/input.h index 66fb15f0a..ea30770ae 100644 --- a/src/common/input.h +++ b/src/common/input.h @@ -86,7 +86,7 @@ enum class NfcState { NewAmiibo, WaitingForAmiibo, AmiiboRemoved, - NotAnAmiibo, + InvalidTagType, NotSupported, WrongDeviceState, WriteFailed, @@ -218,8 +218,22 @@ struct CameraStatus { }; struct NfcStatus { - NfcState state{}; - std::vector<u8> data{}; + NfcState state{NfcState::Unknown}; + u8 uuid_length; + u8 protocol; + u8 tag_type; + std::array<u8, 10> uuid; +}; + +struct MifareData { + u8 command; + u8 sector; + std::array<u8, 0x6> key; + std::array<u8, 0x10> data; +}; + +struct MifareRequest { + std::array<MifareData, 0x10> data; }; // List of buttons to be passed to Qt that can be translated @@ -294,7 +308,7 @@ struct CallbackStatus { BatteryStatus battery_status{}; VibrationStatus vibration_status{}; CameraFormat camera_status{CameraFormat::None}; - NfcState nfc_status{NfcState::Unknown}; + NfcStatus nfc_status{}; std::vector<u8> raw_data{}; }; @@ -356,9 +370,30 @@ public: return NfcState::NotSupported; } + virtual NfcState StartNfcPolling() { + return NfcState::NotSupported; + } + + virtual NfcState StopNfcPolling() { + return NfcState::NotSupported; + } + + virtual NfcState ReadAmiiboData([[maybe_unused]] std::vector<u8>& out_data) { + return NfcState::NotSupported; + } + virtual NfcState WriteNfcData([[maybe_unused]] const std::vector<u8>& data) { return NfcState::NotSupported; } + + virtual NfcState ReadMifareData([[maybe_unused]] const MifareRequest& request, + [[maybe_unused]] MifareRequest& out_data) { + return NfcState::NotSupported; + } + + virtual NfcState WriteMifareData([[maybe_unused]] const MifareRequest& request) { + return NfcState::NotSupported; + } }; /// An abstract class template for a factory that can create input devices. |