diff options
| author | 2023-01-27 13:12:54 -0600 | |
|---|---|---|
| committer | 2023-01-27 17:12:04 -0600 | |
| commit | 8647c727781accf79fe78c19eeee9acdb24f2927 (patch) | |
| tree | b72ad4638850786d36b7568be6cd1a933c518dd1 /src/input_common/helpers/joycon_protocol/generic_functions.cpp | |
| parent | Merge pull request #9685 from liamwhite/minmax (diff) | |
| download | yuzu-8647c727781accf79fe78c19eeee9acdb24f2927.tar.gz yuzu-8647c727781accf79fe78c19eeee9acdb24f2927.tar.xz yuzu-8647c727781accf79fe78c19eeee9acdb24f2927.zip | |
input_common: joycon: Remove magic numbers from calibration protocol
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/generic_functions.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_protocol/generic_functions.cpp | 4 |
1 files changed, 2 insertions, 2 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..4763ba3e6 100644 --- a/src/input_common/helpers/joycon_protocol/generic_functions.cpp +++ b/src/input_common/helpers/joycon_protocol/generic_functions.cpp | |||
| @@ -72,7 +72,7 @@ DriverResult GenericProtocol::GetBattery(u32& battery_level) { | |||
| 72 | DriverResult GenericProtocol::GetColor(Color& color) { | 72 | DriverResult GenericProtocol::GetColor(Color& color) { |
| 73 | ScopedSetBlocking sb(this); | 73 | ScopedSetBlocking sb(this); |
| 74 | std::vector<u8> buffer; | 74 | std::vector<u8> buffer; |
| 75 | const auto result = ReadSPI(CalAddr::COLOR_DATA, 12, buffer); | 75 | const auto result = ReadSPI(SpiAddress::COLOR_DATA, 12, buffer); |
| 76 | 76 | ||
| 77 | color = {}; | 77 | color = {}; |
| 78 | if (result == DriverResult::Success) { | 78 | if (result == DriverResult::Success) { |
| @@ -88,7 +88,7 @@ DriverResult GenericProtocol::GetColor(Color& color) { | |||
| 88 | DriverResult GenericProtocol::GetSerialNumber(SerialNumber& serial_number) { | 88 | DriverResult GenericProtocol::GetSerialNumber(SerialNumber& serial_number) { |
| 89 | ScopedSetBlocking sb(this); | 89 | ScopedSetBlocking sb(this); |
| 90 | std::vector<u8> buffer; | 90 | std::vector<u8> buffer; |
| 91 | const auto result = ReadSPI(CalAddr::SERIAL_NUMBER, 16, buffer); | 91 | const auto result = ReadSPI(SpiAddress::SERIAL_NUMBER, 16, buffer); |
| 92 | 92 | ||
| 93 | serial_number = {}; | 93 | serial_number = {}; |
| 94 | if (result == DriverResult::Success) { | 94 | if (result == DriverResult::Success) { |