Global I2C & SPI pin allocation.

This commit is contained in:
Blaz Kristan 2022-08-07 16:43:29 +02:00
parent a8785570df
commit 998f2f9421
8 changed files with 287 additions and 143 deletions

View File

@ -267,6 +267,36 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
if (serialBaud < 96 || serialBaud > 15000) serialBaud = 1152; if (serialBaud < 96 || serialBaud > 15000) serialBaud = 1152;
updateBaudRate(serialBaud *100); updateBaudRate(serialBaud *100);
JsonArray hw_if_i2c = hw[F("if")][F("i2c-pin")];
CJSON(i2c_sda, hw_if_i2c[0]);
CJSON(i2c_scl, hw_if_i2c[1]);
PinManagerPinType i2c[2] = { { i2c_sda, true }, { i2c_scl, true } };
if (pinManager.allocateMultiplePins(i2c, 2, PinOwner::HW_I2C)) {
#ifdef ESP32
Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initilised (Wire.begin() called prior)
#endif
Wire.begin();
} else {
i2c_sda = -1;
i2c_scl = -1;
}
JsonArray hw_if_spi = hw[F("if")][F("spi-pin")];
CJSON(spi_mosi, hw_if_spi[0]);
CJSON(spi_sclk, hw_if_spi[1]);
CJSON(spi_cs, hw_if_spi[2]);
PinManagerPinType spi[3] = { { spi_mosi, true }, { spi_sclk, true }, { spi_cs, true } };
if (pinManager.allocateMultiplePins(spi, 3, PinOwner::HW_SPI)) {
#ifdef ESP8266
SPI.begin();
#else
SPI.begin(spi_sclk, (int8_t)-1, spi_mosi, spi_cs);
#endif
} else {
spi_mosi = -1;
spi_sclk = -1;
spi_cs = -1;
}
//int hw_status_pin = hw[F("status")]["pin"]; // -1 //int hw_status_pin = hw[F("status")]["pin"]; // -1
JsonObject light = doc[F("light")]; JsonObject light = doc[F("light")];
@ -715,6 +745,15 @@ void serializeConfig() {
hw[F("baud")] = serialBaud; hw[F("baud")] = serialBaud;
JsonObject hw_if = hw.createNestedObject(F("if"));
JsonArray hw_if_i2c = hw_if.createNestedArray("i2c-pin");
hw_if_i2c.add(i2c_sda);
hw_if_i2c.add(i2c_scl);
JsonArray hw_if_spi = hw_if.createNestedArray("spi-pin");
hw_if_spi.add(spi_mosi);
hw_if_spi.add(spi_sclk);
hw_if_spi.add(spi_cs);
//JsonObject hw_status = hw.createNestedObject("status"); //JsonObject hw_status = hw.createNestedObject("status");
//hw_status["pin"] = -1; //hw_status["pin"] = -1;

View File

@ -389,6 +389,9 @@
#if defined(ESP8266) && defined(HW_PIN_DATASPI) #if defined(ESP8266) && defined(HW_PIN_DATASPI)
#undef HW_PIN_DATASPI #undef HW_PIN_DATASPI
#endif #endif
#if defined(ESP8266) && defined(HW_PIN_CSSPI)
#undef HW_PIN_CSSPI
#endif
#ifndef HW_PIN_CLOCKSPI #ifndef HW_PIN_CLOCKSPI
#ifdef ESP8266 #ifdef ESP8266
#define HW_PIN_CLOCKSPI 14 #define HW_PIN_CLOCKSPI 14
@ -403,5 +406,12 @@
#define HW_PIN_DATASPI 23 #define HW_PIN_DATASPI 23
#endif #endif
#endif #endif
#ifndef HW_PIN_CSSPI
#ifdef ESP8266
#define HW_PIN_CSSPI 15
#else
#define HW_PIN_CSSPI 5
#endif
#endif
#endif #endif

View File

@ -55,6 +55,7 @@
if (o.type=="number" && n.substr(0,3)=="pin") { if (o.type=="number" && n.substr(0,3)=="pin") {
for (var i=0; i<pins.length; i++) { for (var i=0; i<pins.length; i++) {
if (k==pinO[i]) continue; if (k==pinO[i]) continue;
if (o.value==pins[i] && pinO[i]==="if") { o.style.color="lime"; break; }
if (o.value==pins[i] || o.value<-1 || o.value>39) { o.style.color="red"; break; } else o.style.color=o.value>33?"orange":"#fff"; if (o.value==pins[i] || o.value<-1 || o.value>39) { o.style.color="red"; break; } else o.style.color=o.value>33?"orange":"#fff";
} }
} }
@ -79,6 +80,7 @@
} }
} }
} }
function updPins() {}
function addField(k,f,o,a=false) { //key, field, (sub)object, isArray function addField(k,f,o,a=false) { //key, field, (sub)object, isArray
if (isO(o)) { if (isO(o)) {
urows += '<hr style="width:260px">'; urows += '<hr style="width:260px">';
@ -205,6 +207,16 @@
<span id="lserr" style="color:red; display:none">&#9888; Could not load configuration.</span><hr> <span id="lserr" style="color:red; display:none">&#9888; Could not load configuration.</span><hr>
</div> </div>
<h2>Usermod Setup</h2> <h2>Usermod Setup</h2>
Global I<sup>2</sup>C GPIOs (HW)<br>
<i style="color: orange;">(only changable on ESP32, change requires reboot!)</i><br>
SDA:<input type="number" min="-1" max="33" name="SDA" onchange="updPins()" class="s" placeholder="SDA">
SCL:<input type="number" min="-1" max="33" name="SCL" onchange="updPins()" class="s" placeholder="SCL">
<hr style="width:260px">
Global SPI GPIOs (HW)<br>
<i style="color: orange;">(only changable on ESP32, change requires reboot!)</i><br>
MOSI:<input type="number" min="-1" max="33" name="MOSI" onchange="updPins()" class="s" placeholder="MOSI">
SCLK:<input type="number" min="-1" max="33" name="SCLK" onchange="updPins()" class="s" placeholder="SCLK">
CS:<input type="number" min="-1" max="33" name="CS" onchange="updPins()" class="s" placeholder="CS">
<div id="um">Loading settings...</div> <div id="um">Loading settings...</div>
<hr><button type="button" onclick="B()">Back</button><button type="submit">Save</button> <hr><button type="button" onclick="B()">Back</button><button type="submit">Save</button>
</form> </form>

View File

@ -1582,148 +1582,162 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
// Autogenerated from wled00/data/settings_um.htm, do not edit!! // Autogenerated from wled00/data/settings_um.htm, do not edit!!
const uint16_t PAGE_settings_um_length = 2230; const uint16_t PAGE_settings_um_length = 2451;
const uint8_t PAGE_settings_um[] PROGMEM = { const uint8_t PAGE_settings_um[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xa5, 0x58, 0x6d, 0x53, 0xdb, 0x48, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xb5, 0x58, 0x6d, 0x73, 0xdb, 0xb8,
0x12, 0xfe, 0xce, 0xaf, 0x10, 0x13, 0x0a, 0xa4, 0xb2, 0x90, 0x4d, 0x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7b,
0x14, 0x45, 0x4d, 0x26, 0xe9, 0xef, 0x51, 0xd3, 0x92, 0x65, 0xb6, 0x7e, 0x88, 0x66, 0xda, 0xc4,
0xa7, 0xf8, 0x22, 0xce, 0x25, 0x02, 0xa6, 0x7f, 0x8a, 0xff, 0x03, 0x76, 0xda, 0xd5, 0xdf, 0x3f,
0x16, 0x00, 0x00
}; };

View File

@ -34,8 +34,7 @@ enum struct PinOwner : uint8_t {
DebugOut = 0x89, // 'Dbg' == debug output always IO1 DebugOut = 0x89, // 'Dbg' == debug output always IO1
DMX = 0x8A, // 'DMX' == hard-coded to IO2 DMX = 0x8A, // 'DMX' == hard-coded to IO2
HW_I2C = 0x8B, // 'I2C' == hardware I2C pins (4&5 on ESP8266, 21&22 on ESP32) HW_I2C = 0x8B, // 'I2C' == hardware I2C pins (4&5 on ESP8266, 21&22 on ESP32)
AnalogMic = 0x8C, // WLEDSR HW_SPI = 0x8C, // 'SPI' == hardware SPI pins (13,14&15 on ESP8266, 5,18&23 on ESP32)
DigitalMic = 0x8D, // WLEDSR
// Use UserMod IDs from const.h here // Use UserMod IDs from const.h here
UM_Unspecified = USERMOD_ID_UNSPECIFIED, // 0x01 UM_Unspecified = USERMOD_ID_UNSPECIFIED, // 0x01
UM_Example = USERMOD_ID_EXAMPLE, // 0x02 // Usermod "usermod_v2_example.h" UM_Example = USERMOD_ID_EXAMPLE, // 0x02 // Usermod "usermod_v2_example.h"

View File

@ -477,6 +477,53 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
{ {
if (!requestJSONBufferLock(5)) return; if (!requestJSONBufferLock(5)) return;
// global I2C & SPI pins
uint8_t oldpins[3];
int8_t hw_sda_pin = max(-1,min(33,(int)request->arg(F("SDA")).toInt()));
int8_t hw_scl_pin = max(-1,min(33,(int)request->arg(F("SCL")).toInt()));
oldpins[0] = i2c_sda;
oldpins[1] = i2c_scl;
pinManager.deallocateMultiplePins(oldpins, 2, PinOwner::HW_I2C);
#ifdef ESP8266
// cannot change pins on ESP8266
if (hw_sda_pin != HW_PIN_SDA) hw_sda_pin = -1;
if (hw_scl_pin != HW_PIN_SCL) hw_scl_pin = -1;
#endif
PinManagerPinType i2c[2] = { { hw_sda_pin, true }, { hw_scl_pin, true } };
if (pinManager.allocateMultiplePins(i2c, 2, PinOwner::HW_I2C)) {
i2c_sda = hw_sda_pin;
i2c_scl = hw_scl_pin;
#ifdef ESP32
Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initilised (Wire.begin() called)
#endif
} else {
i2c_sda = -1;
i2c_scl = -1;
}
int8_t hw_mosi_pin = max(-1,min(33,(int)request->arg(F("MOSI")).toInt()));
int8_t hw_sclk_pin = max(-1,min(33,(int)request->arg(F("SCLK")).toInt()));
int8_t hw_cs_pin = max(-1,min(33,(int)request->arg(F("CS")).toInt()));
oldpins[0] = spi_mosi;
oldpins[1] = spi_sclk;
oldpins[2] = spi_cs;
pinManager.deallocateMultiplePins(oldpins, 3, PinOwner::HW_SPI);
#ifdef ESP8266
// cannot change pins on ESP8266
if (hw_mosi_pin != HW_PIN_DATASPI) hw_mosi_pin = -1;
if (hw_sclk_pin != HW_PIN_CLOCKSPI) hw_sclk_pin = -1;
if (hw_cs_pin != HW_PIN_CSSPI) hw_cs_pin = -1;
#endif
PinManagerPinType spi[3] = { { hw_mosi_pin, true }, { hw_sclk_pin, true }, { hw_cs_pin, true } };
if (pinManager.allocateMultiplePins(spi, 3, PinOwner::HW_SPI)) {
spi_mosi = hw_mosi_pin;
spi_sclk = hw_sclk_pin;
spi_cs = hw_cs_pin;
} else {
spi_mosi = -1;
spi_sclk = -1;
spi_cs = -1;
}
JsonObject um = doc.createNestedObject("um"); JsonObject um = doc.createNestedObject("um");
size_t args = request->args(); size_t args = request->args();

View File

@ -86,6 +86,8 @@
#endif #endif
#include "esp_task_wdt.h" #include "esp_task_wdt.h"
#endif #endif
#include <Wire.h>
#include <SPI.h>
#include "src/dependencies/network/Network.h" #include "src/dependencies/network/Network.h"
@ -641,6 +643,12 @@ WLED_GLOBAL int8_t loadLedmap _INIT(-1);
// Usermod manager // Usermod manager
WLED_GLOBAL UsermodManager usermods _INIT(UsermodManager()); WLED_GLOBAL UsermodManager usermods _INIT(UsermodManager());
WLED_GLOBAL int8_t i2c_sda _INIT(HW_PIN_SDA); // global I2C SDA pin (used for usermods)
WLED_GLOBAL int8_t i2c_scl _INIT(HW_PIN_SCL); // global I2C SDA pin (used for usermods)
WLED_GLOBAL int8_t spi_mosi _INIT(HW_PIN_DATASPI); // global I2C SDA pin (used for usermods)
WLED_GLOBAL int8_t spi_sclk _INIT(HW_PIN_CLOCKSPI); // global I2C SDA pin (used for usermods)
WLED_GLOBAL int8_t spi_cs _INIT(HW_PIN_CSSPI); // global I2C SDA pin (used for usermods)
// global ArduinoJson buffer // global ArduinoJson buffer
WLED_GLOBAL StaticJsonDocument<JSON_BUFFER_SIZE> doc; WLED_GLOBAL StaticJsonDocument<JSON_BUFFER_SIZE> doc;
WLED_GLOBAL volatile uint8_t jsonBufferLock _INIT(0); WLED_GLOBAL volatile uint8_t jsonBufferLock _INIT(0);

View File

@ -261,6 +261,16 @@ void getSettingsJS(byte subPage, char* dest)
// add reserved and usermod pins as d.um_p array // add reserved and usermod pins as d.um_p array
oappend(SET_F("d.um_p=[6,7,8,9,10,11")); oappend(SET_F("d.um_p=[6,7,8,9,10,11"));
if (i2c_sda > -1 && i2c_scl > -1) {
oappend(","); oappend(itoa(i2c_sda,nS,10));
oappend(","); oappend(itoa(i2c_scl,nS,10));
}
if (spi_mosi > -1 && spi_sclk > -1 && spi_cs > -1) {
oappend(","); oappend(itoa(spi_mosi,nS,10));
oappend(","); oappend(itoa(spi_sclk,nS,10));
oappend(","); oappend(itoa(spi_cs,nS,10));
}
if (requestJSONBufferLock(6)) { if (requestJSONBufferLock(6)) {
// if we can't allocate JSON buffer ignore usermod pins // if we can't allocate JSON buffer ignore usermod pins
JsonObject mods = doc.createNestedObject(F("um")); JsonObject mods = doc.createNestedObject(F("um"));
@ -625,6 +635,11 @@ void getSettingsJS(byte subPage, char* dest)
oappend(SET_F("numM=")); oappend(SET_F("numM="));
oappendi(usermods.getModCount()); oappendi(usermods.getModCount());
oappend(";"); oappend(";");
sappend('v',SET_F("SDA"),i2c_sda);
sappend('v',SET_F("SCL"),i2c_scl);
sappend('v',SET_F("MOSI"),spi_mosi);
sappend('v',SET_F("SCLK"),spi_sclk);
sappend('v',SET_F("CS"),spi_cs);
usermods.appendConfigData(); usermods.appendConfigData();
} }