summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_protocol/nfc.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-05-13 08:04:18 +0200
committergerman77 <juangerman-13@hotmail.com>2023-05-14 17:04:37 +0200
commitac531aa15f35b2e6584b8b306b5c3258ef66dc73 (patch)
treeda0924d367e338345a22449e64fc01e474c2d2c3 /src/input_common/helpers/joycon_protocol/nfc.h
parentMerge pull request #10244 from liamwhite/lower-upper (diff)
downloadyuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar.gz
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar.bz2
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar.lz
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar.xz
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.tar.zst
yuzu-ac531aa15f35b2e6584b8b306b5c3258ef66dc73.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/helpers/joycon_protocol/nfc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input_common/helpers/joycon_protocol/nfc.h b/src/input_common/helpers/joycon_protocol/nfc.h
index 11e263e07..4cb992d1d 100644
--- a/src/input_common/helpers/joycon_protocol/nfc.h
+++ b/src/input_common/helpers/joycon_protocol/nfc.h
@@ -32,6 +32,9 @@ public:
bool IsEnabled() const;
private:
+ // Number of times the function will be delayed until it outputs valid data
+ static constexpr std::size_t AMIIBO_UPDATE_DELAY = 15;
+
struct TagFoundData {
u8 type;
std::vector<u8> uuid;
@@ -39,7 +42,7 @@ private:
DriverResult WaitUntilNfcIsReady();
- DriverResult StartPolling(TagFoundData& data);
+ DriverResult StartPolling(TagFoundData& data, std::size_t timeout_limit = 1);
DriverResult ReadTag(const TagFoundData& data);
@@ -56,6 +59,7 @@ private:
NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const;
bool is_enabled{};
+ std::size_t update_counter{};
};
} // namespace InputCommon::Joycon