Bug 2064, 2063 - PinManager usage (#2066)

* Fix 2063 - Do not free pins unless allocated

* Fix 2064: Allocate pins used for Ethernet

* Fix obvious compilation errors.

* Fix multiple bugs...

* pinsAllocated[2] set twice due to copy/paste bug.
* wrong pin allocated for ETH_CLOCK_GPIO17_OUT due to copy/paste bug

* Stylistic change per PR review

* Stylistic change per PR review

* attempt to allocate pin for "default" button

* remove extra local variable

* check return value from ETH.begin()

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
This commit is contained in:
Henry Gabryjelski
2021-07-09 11:06:48 -07:00
committed by GitHub
parent a17f83cedd
commit 3ad336a1eb
4 changed files with 78 additions and 17 deletions

View File

@@ -20,8 +20,16 @@ ethernet_settings ethernetBoards[] = {
// WT32-EHT01
// Please note, from my testing only these pins work for LED outputs:
// IO2, IO4, IO12, IO14, IO15
// These pins do not appear to work from my testing:
// IO35, IO36, IO39
// Pins IO34 through IO39 are input-only on ESP32, so
// the following exposed pins won't work to drive WLEDs
// IO35(*), IO36, IO39
// The following pins are also exposed via the headers,
// and likely can be used as general purpose IO:
// IO05(*), IO32 (CFG), IO33 (485_EN), IO33 (TXD)
//
// (*) silkscreen on board revision v1.2 may be wrong:
// IO5 silkscreen on v1.2 says IO35
// IO35 silkscreen on v1.2 says RXD
{
1, // eth_address,
16, // eth_power,