Commit Graph

40 Commits

Author SHA1 Message Date
Frank
edb6bfc2f9 small fix for 8266 2023-01-08 19:25:26 +01:00
Frank
b29ff1186b best of I2CSPI-refactor
* cherry-picking my additions to pinmanger
* toDo: replace Wire.begin() with pinManager.joinWire()
2023-01-08 19:09:30 +01:00
Ewoud
66b15d32d9 Merge remote-tracking branch 'upstream/main' into mdev 2023-01-07 12:01:03 +01:00
Blaž Kristan
506b6b51ce whitespace cleanup 2023-01-06 09:24:29 +01:00
Ewoud
642d7d91ea i2c_sda, i2c_scl, spi_mosi, spi_miso, spi_sclk without HW_PIN_*, bh1750
platformio: 
- add bh1750 to _max
- define rotary defaults for wemos

usermod_bh1750
- Remove HW_PIN_* and replace by i2c_sda etc
- add appendConfigData

usermods mpu6050_imu, rtc, 4ld, pinmanager
- Remove HW_PIN_* 

change SDA2:pin (etc) to SDA:pin
2023-01-05 16:35:49 +01:00
Ewoud
86ceca5de7 Usermods: add removeOptions e.g. for pin MCLK
- add replaceOption to analogmic
- fix: right default for audio reactive scl
- pinmanager add case UM_Battery
2023-01-02 21:42:19 +01:00
Frank
97989bb773 experimental support for some special boards
- 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
2023-01-01 21:33:06 +01:00
Frank
e6bd66d35d improve support for -S2
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.
2022-12-22 23:22:58 +01:00
Frank
f9b9716fdd Improvements for -S2
- 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
2022-12-21 17:25:41 +01:00
Frank
f48895f61f add gpio info for USERMOD_DALLASTEMPERATURE 2022-12-20 19:24:23 +01:00
Frank
ddad7269ed pin info: more default usermod pins 2022-12-20 17:49:34 +01:00
Frank
191bbf93f3 post-merge changes
reconciling disagreements between MM and AC source code
2022-12-06 16:07:12 +01:00
Ewoud
3160a0b090 Merge remote-tracking branch 'origin/ac_main' into mdev 2022-12-06 14:38:49 +01:00
Frank
e7f07f5bfc pinmanager robustness improvement
make sure that array bounds are not violated in pinManager class.
2022-12-05 17:04:54 +01:00
Frank
58688d25ae update for usermessages
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()
2022-12-05 12:48:03 +01:00
Frank
0c3adf1f8a pin info small improvements 2022-12-04 20:09:10 +01:00
Frank
676cc26171 use Serial.print for important info like wifi stuff
.. and for other important info.
Will be muted automatically in case that serial is in used for other purposes.
2022-12-04 17:52:10 +01:00
Frank
1a9a1cbbbe small change to simplify pin info texts 2022-12-04 16:54:12 +01:00
Frank
bb8fb5f6aa pin info improvements
- 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
2022-12-04 14:43:31 +01:00
Frank
eaa619df69 pin info: conflicts include input-only
record conflict if pin was requested as in/out but pin is input-only
2022-12-04 02:50:57 +01:00
Frank
d2d8a86d81 pin info: show conflicts
* 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!
2022-12-04 02:22:50 +01:00
Frank
52c3aa8378 small, very small change
JTAG debug pins seems to be irrelevant on ESP32
2022-12-02 20:32:53 +01:00
Frank
61f062d0e5 GPIO info - more infos
- include -S3, -S2, -C3
- include fixed hardware pins, and WLED default pins
2022-12-02 17:53:54 +01:00
Frank
aa5169b5f5 almost tiny update (GPIO info)
show special Info for WLED STATUSLED, and DMX hardcoded GPIO
2022-12-02 00:37:30 +01:00
Frank
0dfc884c64 very medium updates (GPIO info, part1)
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)
2022-12-02 00:11:28 +01:00
Blaz Kristan
c253464b2a PinManager::isPinOk() rewrite
Button pullup/pulldown fix for ESP32.
2022-09-24 12:25:06 +02:00
Blaz Kristan
6306cfff96 Remove Octal SPI pins.
Whitespace.
2022-09-24 12:16:53 +02:00
Blaz Kristan
d86d88c7b7 New isPinOk() 2022-09-23 14:35:17 +02:00
Frank
da02a68e60 allocatePin() debug message when Pin is not OK.
This debug message should help to understand GPIO config problems.
2022-09-17 20:42:34 +02:00
Blaz Kristan
8402de601f More fixes for GPIOs.
UI fixes.
2022-09-13 21:41:51 +02:00
Blaz Kristan
ac15b227da isPinOk() for S2 & C3 2022-09-13 19:50:13 +02:00
Frank
56f2513aba Basic support for -S3
- bus_wrapper: currently no support for I2S methods
- pin_manager: different number of PWM channels, different isPinOk()
2022-09-11 00:09:59 +02:00
Blaz Kristan
1de009a80d I2C & SPI fixes. Global interface. 2022-08-14 13:05:59 +02:00
bole5
7ee14724fc Improve Pin Manager Debugging (#2532) 2022-02-08 00:03:20 +01:00
Blaž Kristan
41c9bb63a0 Pin manager support for sharing multipin buses. 2021-12-14 09:38:38 +01:00
cschwinne
d31e4c7815 Added getPinOwner
Only disable builtin LED if bus to avoid breaking other things on the pin
2021-11-17 11:13:07 +01:00
Henry Gabryjelski
1d4487b6cd Ethernet configuration fix, improve PinManager (#2123)
* 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>
2021-08-23 14:14:48 +02:00
cschwinne
b934634159 First light from busmanager! (still not usable though) 2021-01-16 00:50:43 +01:00
cschwinne
854501385e Bus progress 2020-12-07 01:39:42 +01:00
cschwinne
0c73ecf6a8 Added Pin Manager 2020-11-15 12:41:51 +01:00