-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add board and variant for WT32-ETH01 (variant wt32-eth01) from Wirele…
…ss-Tag (#5946) - supports the WiFi/Ethernet board with WT32-S1 module and LAN8720A Ethernet PHY - documentation available at http://www.wireless-tag.com/portfolio/wt32-eth01/
- Loading branch information
Showing
2 changed files
with
150 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
/** | ||
* Variant: WT32-ETH01 | ||
* Vendor: Wireless-Tag | ||
* Url: http://www.wireless-tag.com/portfolio/wt32-eth01/ | ||
*/ | ||
|
||
#include <stdint.h> | ||
|
||
#define EXTERNAL_NUM_INTERRUPTS 16 | ||
#define NUM_DIGITAL_PINS 40 | ||
#define NUM_ANALOG_INPUTS 16 | ||
|
||
#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) | ||
#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) | ||
#define digitalPinHasPWM(p) (p < 34) | ||
|
||
// interface to Ethernet PHY (LAN8720A) | ||
#define ETH_PHY_ADDR 1 | ||
#define ETH_PHY_POWER 16 | ||
#define ETH_PHY_MDC 23 | ||
#define ETH_PHY_MDIO 18 | ||
#define ETH_PHY_TYPE ETH_PHY_LAN8720 | ||
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN | ||
|
||
// general purpose IO pins | ||
static const uint8_t IO0 = 0; | ||
static const uint8_t IO1 = 1; // TXD0 / TX0 pin | ||
static const uint8_t IO2 = 2; | ||
static const uint8_t IO3 = 3; // RXD0 / RX0 pin | ||
static const uint8_t IO4 = 4; | ||
static const uint8_t IO5 = 5; // RXD2 / RXD pin | ||
static const uint8_t IO12 = 12; | ||
static const uint8_t IO14 = 14; | ||
static const uint8_t IO15 = 15; | ||
static const uint8_t IO17 = 17; // TXD2 / TXD pin | ||
static const uint8_t IO32 = 32; // CFG pin | ||
static const uint8_t IO33 = 33; // 485_EN pin | ||
|
||
// input-only pins | ||
static const uint8_t IO35 = 35; | ||
static const uint8_t IO36 = 36; | ||
static const uint8_t IO39 = 39; | ||
|
||
// UART interfaces | ||
static const uint8_t TXD0 = IO1, TX0 = IO1; | ||
static const uint8_t RXD0 = IO3, RX0 = IO3; | ||
static const uint8_t TXD2 = IO17, TXD = IO17; | ||
static const uint8_t RXD2 = IO5, RXD = IO5; | ||
static const uint8_t TX = TX0; | ||
static const uint8_t RX = TX0; | ||
|
||
#endif /* Pins_Arduino_h */ |