diff options
author | bunnei <bunneidev@gmail.com> | 2023-01-29 11:43:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 11:43:14 +0100 |
commit | 9170387e71d4295477b74666a843a889af62b2a3 (patch) | |
tree | ee08cde9257dc4c77943b7566ee678ed8317eec2 /src/input_common/helpers/joycon_protocol/generic_functions.cpp | |
parent | Merge pull request #9691 from ameerj/msaa-texcache (diff) | |
parent | input_common: joycon: Replace ReadSPI vector with span (diff) | |
download | yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar.gz yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar.bz2 yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar.lz yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar.xz yuzu-9170387e71d4295477b74666a843a889af62b2a3.tar.zst yuzu-9170387e71d4295477b74666a843a889af62b2a3.zip |
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/generic_functions.cpp')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/generic_functions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.cpp b/src/input_common/helpers/joycon_protocol/generic_functions.cpp index 63cfb1369..484c208e6 100644 --- a/src/input_common/helpers/joycon_protocol/generic_functions.cpp +++ b/src/input_common/helpers/joycon_protocol/generic_functions.cpp @@ -71,8 +71,8 @@ DriverResult GenericProtocol::GetBattery(u32& battery_level) { DriverResult GenericProtocol::GetColor(Color& color) { ScopedSetBlocking sb(this); - std::vector<u8> buffer; - const auto result = ReadSPI(CalAddr::COLOR_DATA, 12, buffer); + std::array<u8, 12> buffer{}; + const auto result = ReadRawSPI(SpiAddress::COLOR_DATA, buffer); color = {}; if (result == DriverResult::Success) { @@ -87,8 +87,8 @@ DriverResult GenericProtocol::GetColor(Color& color) { DriverResult GenericProtocol::GetSerialNumber(SerialNumber& serial_number) { ScopedSetBlocking sb(this); - std::vector<u8> buffer; - const auto result = ReadSPI(CalAddr::SERIAL_NUMBER, 16, buffer); + std::array<u8, 16> buffer{}; + const auto result = ReadRawSPI(SpiAddress::SERIAL_NUMBER, buffer); serial_number = {}; if (result == DriverResult::Success) { |