- shorten oappend MM function names
- add aOpt: analog options only
- add pin 17 for esp8266 (analog pin)
- add a.pins array to show analog pins in pin dropdown
* Additional functions: isPinPWM, isPinINT
* aliases: PM_ADC1 instead of PinManagerClass::ADC1
* make getADCPin work on "classic ESP32"
--> Tested and works on 8266, ESP32 (default platform), ESP32 (V4 Platform). ESP32-S3, ESP32-S2, ESP32-C3
bool isPinTouch(int gpio); // true if gpio supports touch functions
bool isPinAnalog(int gpio); // true if gpio supports analogRead
bool isPinADC1(int gpio); // true if gpio supports analogRead, and it belongs to ADC unit 1
bool isPinADC2(int gpio); // true if gpio supports analogRead, and it belongs to ADC unit 2
#define PM_NO_PIN 255
typedef enum { ADC_none = 0, ADC1 = 1, ADC2 = 2 } AdcIdentifier;
uint8_t getADCPin(AdcIdentifier adcUnit, uint8_t adcPort); // get GPIO number for ADC unit x, channel y. 255 = no such pin
as it turns out, also on 8266 any pin can be assigned to I2C. Only SPI pins are fixed, and GPIO16 should not be used as it does not support interrupts.
* It was not possible any more to set I2C pins back to "-1", to disable I2C.
This fixes the problem.
* HW_PIN_SDA / HW_PIN_SCL may contain "-1" --> use PIN numbers directly on 8266 (I2C pins cannot be changed any way on 8266)
- show VBAT pin (if board definitely has that feature)
- some WROVER board have cross-connection between GPIO 25/27 and PIN 16/17
- experimental support for boards that have NEOPIXEL_I2C_POWER
got myself an adafruit "qt py -S2" with tinyUF2 bootloader. So I wanted to get that working. And it does work :-).
FFT time = 10ms (instead of 2ms on classic ESP32) is a very good result, also virtual USB runs much better now.
- new partition table for boards with UF2 boot (Adafruit qt py S2)
- better treatment of debug out using "USBCDC" native port
- workarounds for watchdog crashes on -S2
- Add missing but mandatory build flags for -S2 and -C3
wled.h:
- Don't use Serial directly -S2 as S2 serial driver is buggy.
- added USER_FLUSH macro
wled.cpp
- replace fluh with FLUSH
- print ArduionoOTA info (if enabled)
wled_server.cpp:
- added userlog info after file upload.
pinn_manager:
- don't show "(default)" is the PIN is actually assigned to HW drivers
- bugfix for getPinOwner()
- add WLED_NUM_PINS constant, to get rid of magic number "50"
- only show I2S defaults when USERMOD_AUDIOREACTIVE is enabled
- added alternate names for SPI pins
- small correction for -C3
* set.cpp: reject non-ADC pins as analog button pins (bugfix)
* pinmanager:
record conflicts
added getOwnerText(PinOwner tag) and getPinConflicts(int gpio)
GPIO | Assigned to | Info
--------|-----------------------|------------
i/o 0 Button !! Conflict with AudioReactive (UM) !! (default) I2S MCLK
i/o 1 debug output Serial TX
i/o 2 ./. (default) LED pin
i/o 3 ./. Serial RX
i/o 5 ./. (default) SPI SS
i/o 13 Button !! Conflict with IR Receiver !!
PIN ALLOC error: GPIO19 for analog button #2 is not an analog pin!
Improvements for debugging GPIO conflicts. HTML UI integration still pending.
* pinManager can be asked for pin owner (String) and pin special purpose (string).
* wled.cpp: show GPIO allocation when compiling with WLED_DEBUG
* pinmanager: show Pin Owner as name when possible.
The results looks like this
GPIO | Assigned to | Info
--------|-----------------------|------------
i/o 0 Button
i/o 1 debug Serial TX
i/o 2 DMX out
i/o 3 ./. Serial RX
i/o 5 ./. SPI SS
i/o 15 AudioReactive (UM)
i/o 16 LEDs (digital)
i/o 17 Relay
i/o 18 ./. SPI CLK
i/o 19 IR Receiver SPI MISO
i/o 21 I2C I2C SDA
i/o 22 I2C I2C SCL
i/o 23 ./. SPI MOSI
i/o 32 AudioReactive (UM)
* Improved pin manager, ethernet config
* Ethernet is configured prior even to LED pins
* Pin Manager allocation / deallocation functions
now take an "ownership" tag parameter, helping
avoid accidentally free'ing pins that were allocated
by other code
* Pin Manager now has ability to allocate multiple
pins at once; Simplifies error handling
* Fix operator precedence error
Bitwise AND has lower precedence than the
relational "greater than" operator.
* PinManager update for some user modules
* don't build everything...
* Final step to reduce RAM overhead
* update comment
* remove macros
* Remove leftover allocated
* Init ethernet after settings saved
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>