diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-01-28 00:47:47 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-01-28 01:45:25 +0100 |
commit | 4e29afefc4afbce77f7ea0d110d7e844ce411eac (patch) | |
tree | 36348693dc5ef55813dfd57420d79bf0e5122c00 /src/input_common/helpers/joycon_protocol/generic_functions.cpp | |
parent | input_common: joycon: Remove magic numbers from calibration protocol (diff) | |
download | yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar.gz yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar.bz2 yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar.lz yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar.xz yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.tar.zst yuzu-4e29afefc4afbce77f7ea0d110d7e844ce411eac.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 4763ba3e6..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(SpiAddress::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(SpiAddress::SERIAL_NUMBER, 16, buffer); + std::array<u8, 16> buffer{}; + const auto result = ReadRawSPI(SpiAddress::SERIAL_NUMBER, buffer); serial_number = {}; if (result == DriverResult::Success) { |