mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 05:05:46 +00:00
input_common: joycon: Remove magic numbers from calibration protocol
This commit is contained in:
parent
55da8e8ed8
commit
f20ec6f69b
6 changed files with 203 additions and 108 deletions
|
@ -72,7 +72,7 @@ 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);
|
||||
const auto result = ReadSPI(SpiAddress::COLOR_DATA, 12, buffer);
|
||||
|
||||
color = {};
|
||||
if (result == DriverResult::Success) {
|
||||
|
@ -88,7 +88,7 @@ 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);
|
||||
const auto result = ReadSPI(SpiAddress::SERIAL_NUMBER, 16, buffer);
|
||||
|
||||
serial_number = {};
|
||||
if (result == DriverResult::Success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue