Added protobufs for TS

This commit is contained in:
Niklas Jensen
2025-12-28 22:02:27 +01:00
committed by nikguin04
parent 9ceb7a9919
commit 8e66a03c00
10 changed files with 137 additions and 24 deletions
@@ -14,6 +14,9 @@
#ifndef SCL_PIN
#define SCL_PIN SCL
#endif
// #define STR(x) #x
// #define XSTR(x) STR(x)
// #pragma message ("SDA PIN: " XSTR(SDA_PIN))
#ifndef I2C_FREQUENCY
#define I2C_FREQUENCY 1000000UL
#endif
@@ -42,9 +45,9 @@ class PeripheralsConfiguration {
}
static StateUpdateResult update(JsonVariant &root, PeripheralsConfiguration &settings) {
settings.sda = root["sda"] | SDA_PIN;
settings.scl = root["scl"] | SCL_PIN;
settings.frequency = root["frequency"] | I2C_FREQUENCY;
//settings.sda = root["sda"] | SDA_PIN;
//settings.scl = root["scl"] | SCL_PIN;
//settings.frequency = root["frequency"] | I2C_FREQUENCY;
return StateUpdateResult::CHANGED;
};
};