-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add support for all Tube's ZB gateways - Rework board detecting mechanism - now supports more board configs and detects more accurate (need more tests on T-Internet-POE) - Update de.json Thanks @Sn00kiT 🚀 #29 - Fix Error switching to USB mode Thanks @OlegBrailean #26 - Keep working on cz.json Thanks @leroyloren 🚀 #27, #28
- Loading branch information
Showing
11 changed files
with
181 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
#include "const/hw.h" | ||
|
||
// Ethernet configurations | ||
// !!! Don't forget to edit ETH_CFG_CNT !!! | ||
EthConfig ethConfigs[] = { | ||
{.addr = 0, .pwrPin = 12, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = -1}, // 0 Olimex-ESP32-POE | ||
{.addr = 1, .pwrPin = 16, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO0_IN, .pwrAltPin = -1}, // 1 WT32-ETH01 | ||
{.addr = 0, .pwrPin = -1, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = 5}, // 2 T-Internet-POE | ||
}; | ||
|
||
// ZigBee configurations | ||
// !!! Don't forget to edit ZB_CFG_CNT !!! | ||
ZbConfig zbConfigs[] = { | ||
{.txPin = 4, .rxPin = 36, .rstPin = 16, .bslPin = 32}, // 0 | ||
{.txPin = 17, .rxPin = 5, .rstPin = 33, .bslPin = 32}, // 1 | ||
{.txPin = 33, .rxPin = 32, .rstPin = 12, .bslPin = 14}, // 2 | ||
{.txPin = 4, .rxPin = 36, .rstPin = 5, .bslPin = 16}, // 3 | ||
{.txPin = 5, .rxPin = 17, .rstPin = 33, .bslPin = 32}, // 4 | ||
{.txPin = 16, .rxPin = 5, .rstPin = 33, .bslPin = 32}, // 5 | ||
{.txPin = 16, .rxPin = 5, .rstPin = 13, .bslPin = 4}, // 6 | ||
{.txPin = 4, .rxPin = 36, .rstPin = 5, .bslPin = 16}, // 7 | ||
}; | ||
|
||
// Mist configurations | ||
// !!! Don't forget to edit MIST_CFG_CNT !!! | ||
MistConfig mistConfigs[] = { | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, // 0 | ||
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 33, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, // 1 | ||
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 4, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, // 2 | ||
}; | ||
|
||
// Board configurations | ||
// !!! Don't forget to edit BOARD_CFG_CNT !!! | ||
BrdConfigStruct brdConfigs[] = { | ||
// BOARD_CFG_CNT | ||
{"UZG-01", | ||
{.addr = 0, .pwrPin = -1, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = 5}, | ||
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 33, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, | ||
{.txPin = 4, .rxPin = 36, .rstPin = 16, .bslPin = 32}}, | ||
{"SLZB-06", | ||
{.addr = 1, .pwrPin = 16, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO0_IN, .pwrAltPin = -1}, | ||
{.btnPin = 35, .btnPlr = 1, .uartSelPin = 4, .uartSelPlr = 1, .ledModePin = 12, .ledModePlr = 1, .ledPwrPin = 14, .ledPwrPlr = 1}, | ||
{.txPin = 17, .rxPin = 5, .rstPin = 33, .bslPin = 32}}, | ||
{"Olimex-ESP32-POE", | ||
{.addr = 0, .pwrPin = 12, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = -1}, | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, | ||
{.txPin = 4, .rxPin = 36, .rstPin = 16, .bslPin = 32}}, | ||
{"WT32-ETH01", | ||
{.addr = 1, .pwrPin = 16, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO0_IN, .pwrAltPin = -1}, | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, | ||
{.txPin = 17, .rxPin = 5, .rstPin = 33, .bslPin = 32}}, | ||
{"T-Internet-POE", | ||
{.addr = 0, .pwrPin = -1, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = -1}, | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, | ||
{.txPin = 4, .rxPin = 36, .rstPin = 16, .bslPin = 32}}, | ||
{"China-GW", | ||
{.addr = 0, .pwrPin = 12, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = -1}, | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, | ||
{.txPin = 33, .rxPin = 32, .rstPin = 12, .bslPin = 14}}, | ||
{"TubeZB - Olimex", | ||
{.addr = 0, .pwrPin = 12, .mdcPin = 23, .mdiPin = 18, .phyType = ETH_PHY_LAN8720, .clkMode = ETH_CLOCK_GPIO17_OUT, .pwrAltPin = -1}, | ||
{.btnPin = -1, .btnPlr = 0, .uartSelPin = -1, .uartSelPlr = 0, .ledModePin = -1, .ledModePlr = 0, .ledPwrPin = -1, .ledPwrPlr = 0}, | ||
{.txPin = 4, .rxPin = 36, .rstPin = 5, .bslPin = 16}}, | ||
{"UZG-01", .ethConfigIndex = 2, .zbConfigIndex = 0, .mistConfigIndex = 1}, | ||
{"SLZB-06", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 2}, | ||
{"WT32-ETH01", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 0}, | ||
{"T-Internet-POE", .ethConfigIndex = 2, .zbConfigIndex = 0, .mistConfigIndex = 0}, | ||
{"Olimex-ESP32-POE", .ethConfigIndex = 0, .zbConfigIndex = 0, .mistConfigIndex = 0}, | ||
{"China-GW", .ethConfigIndex = 0, .zbConfigIndex = 2, .mistConfigIndex = 0}, | ||
{"TubesZB-eth", .ethConfigIndex = 1, .zbConfigIndex = 1, .mistConfigIndex = 0}, | ||
{"TubesZB-eth_usb", .ethConfigIndex = 1, .zbConfigIndex = 4, .mistConfigIndex = 0}, | ||
{"TubesZB-poe", .ethConfigIndex = 0, .zbConfigIndex = 5, .mistConfigIndex = 0}, | ||
{"TubesZB-poe-2022", .ethConfigIndex = 0, .zbConfigIndex = 6, .mistConfigIndex = 0}, | ||
{"TubesZB-poe-2023", .ethConfigIndex = 0, .zbConfigIndex = 7, .mistConfigIndex = 0}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.