@@ -149,6 +149,7 @@ String PinManagerClass::getPinSpecialText(int gpio) { // special purpose PIN in
149149 if ((gpio == spi_sclk) || ((gpio == HW_PIN_CLOCKSPI) && (spi_sclk < 0 ))) return (F (" (default) SPI SLK / SCK" ));
150150 if ((gpio == spi_mosi) || ((gpio == HW_PIN_DATASPI) && (spi_mosi < 0 ))) return (F (" (default) SPI PICO / MOSI" ));
151151 if ((gpio == spi_miso) || ((gpio == HW_PIN_MISOSPI) && (spi_miso < 0 ))) return (F (" (default) SPI POCI / MISO" ));
152+ // if ((gpio == spi_cs) || ((gpio == HW_PIN_CS) && (spi_cs < 0))) return(F("(default) SPI CS / SS"));
152153#if defined(WLED_USE_SD_MMC) || defined(WLED_USE_SD_SPI) || defined(SD_ADAPTER)
153154 if ((gpio == HW_PIN_CSSPI)) return (F (" (default) SPI CS / SS" )); // no part of usermod default settings, currently only needed by SD_CARD usermod
154155#endif
@@ -178,6 +179,53 @@ String PinManagerClass::getPinSpecialText(int gpio) { // special purpose PIN in
178179 if (gpio == 2 ) return (F (" hardcoded DMX output pin" ));
179180 #endif
180181
182+ //
183+ // usermod PINS
184+ //
185+ #ifdef USERMOD_ROTARY_ENCODER_UI
186+ #ifdef ENCODER_DT_PIN
187+ if (gpio == ENCODER_DT_PIN) return (F (" (default) Rotary DT pin" ));
188+ #else
189+ if (gpio == 18 ) return (F (" (default) Rotary DT pin" ));
190+ #endif
191+ #ifdef ENCODER_CLK_PIN
192+ if (gpio == ENCODER_CLK_PIN) return (F (" (default) Rotary CLK pin" ));
193+ #else
194+ if (gpio == 5 ) return (F (" (default) Rotary CLK pin" ));
195+ #endif
196+ #ifdef ENCODER_SW_PIN
197+ if (gpio == ENCODER_SW_PIN) return (F (" (default) Rotary SW pin" ));
198+ #else
199+ if (gpio == 19 ) return (F (" (default) Rotary SW pin" ));
200+ #endif
201+ #endif
202+
203+ #if defined(USERMOD_FOUR_LINE_DISPLAY)
204+ #if defined(FLD_PIN_SDA) && defined(FLD_PIN_SDA)
205+ if (gpio == FLD_PIN_SDA) return (F (" (default) 4lines disp. I2C SDA" ));
206+ if (gpio == FLD_PIN_SCL) return (F (" (default) 4lines disp. I2C SCL" ));
207+ #endif
208+ #if defined(FLD_PIN_CLOCKSPI) && defined(FLD_PIN_DATASPI)
209+ if (gpio == FLD_PIN_CLOCKSPI) return (F (" (default) 4lines disp. SPI SCLK" ));
210+ if (gpio == FLD_PIN_DATASPI) return (F (" (default) 4lines disp. SPI DATA" ));
211+ #endif
212+ #if defined(FLD_PIN_CS)
213+ if (gpio == FLD_PIN_CS) return (F (" (default) 4lines disp. SPI CS" ));
214+ #endif
215+ #if defined(FLD_PIN_DC) && defined(FLD_PIN_RESET)
216+ if (gpio == FLD_PIN_DC) return (F (" (default) 4lines disp. DC" ));
217+ if (gpio == FLD_PIN_RESET) return (F (" (default) 4lines disp. RESET" ));
218+ #endif
219+ #endif
220+
221+ #if defined(USERMOD_MPU6050_IMU)
222+ #ifdef MPU6050_INT_GPIO
223+ if (gpio == MPU6050_INT_GPIO) return (F (" (default) mpu6050 INT pin" ));
224+ #else
225+ if (gpio == 15 ) return (F (" (default) mpu6050 INT pin" ));
226+ #endif
227+ #endif
228+
181229 // Not-OK PINS
182230 if (!isPinOk (gpio, false )) return (F (" " ));
183231
@@ -302,6 +350,7 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
302350 if (gpio == 0xFF ) {
303351 // explicit support for io -1 as a no-op (no allocation of pin),
304352 // as this can greatly simplify configuration arrays
353+ // if (tag==PinOwner::HW_I2C) USER_PRINTF("I2C alloc attempted for %d\n", gpio);
305354 continue ;
306355 }
307356 if (!isPinOk (gpio, mptArray[i].isOutput )) {
@@ -340,6 +389,7 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
340389 }
341390
342391 if (tag==PinOwner::HW_I2C) i2cAllocCount++;
392+ // if (tag==PinOwner::HW_I2C) DEBUG_PRINTF("I2C alloc counter %d\n", int(i2cAllocCount));
343393 if (tag==PinOwner::HW_SPI) spiAllocCount++;
344394
345395 // all pins are available .. track each one
0 commit comments