From 11773c5515fddc958c869725780b6e1a8197f3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 4 Mar 2018 15:05:35 +0100 Subject: [PATCH] Added I2C scan and clear commands to terminal --- code/espurna/settings.ino | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index d7c26a34..f77e9553 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -218,6 +218,16 @@ void _settingsInitCommands() { *((int*) 0) = 0; // see https://github.com/esp8266/Arduino/issues/1494 }); + settingsRegisterCommand(F("I2C.SCAN"), [](Embedis* e) { + i2cScan(); + DEBUG_MSG_P(PSTR("+OK\n")); + }); + + settingsRegisterCommand(F("I2C.CLEAR"), [](Embedis* e) { + i2cClearBus(); + DEBUG_MSG_P(PSTR("+OK\n")); + }); + settingsRegisterCommand(F("FACTORY.RESET"), [](Embedis* e) { _settingsFactoryResetCommand(); DEBUG_MSG_P(PSTR("+OK\n"));