* fix(eth): Add ETH support for ESP32-P4 Also adds configuration to pins_arduino.h * fix(eth): Enable TLK110 Example on P4 * fix(eth): Fix Ethernet examples * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
74 lines
2 KiB
C
74 lines
2 KiB
C
#ifndef Pins_Arduino_h
|
|
#define Pins_Arduino_h
|
|
|
|
#include <stdint.h>
|
|
#include "soc/soc_caps.h"
|
|
|
|
#define PIN_NEOPIXEL 44
|
|
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
|
|
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
|
|
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
|
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
|
|
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
|
|
#define RGB_BUILTIN LED_BUILTIN
|
|
#define RGB_BRIGHTNESS 64
|
|
|
|
// BOOT_MODE 35
|
|
// BOOT_MODE2 36 pullup
|
|
|
|
static const uint8_t TX = 37;
|
|
static const uint8_t RX = 38;
|
|
|
|
static const uint8_t SDA = 7;
|
|
static const uint8_t SCL = 8;
|
|
|
|
static const uint8_t SS = 27;
|
|
static const uint8_t MOSI = 46;
|
|
static const uint8_t MISO = 47;
|
|
static const uint8_t SCK = 48;
|
|
|
|
static const uint8_t A0 = 16;
|
|
static const uint8_t A1 = 17;
|
|
static const uint8_t A2 = 18;
|
|
static const uint8_t A3 = 19;
|
|
static const uint8_t A4 = 20;
|
|
static const uint8_t A5 = 21;
|
|
static const uint8_t A6 = 22;
|
|
static const uint8_t A7 = 23;
|
|
static const uint8_t A8 = 49;
|
|
static const uint8_t A9 = 50;
|
|
static const uint8_t A10 = 51;
|
|
static const uint8_t A11 = 52;
|
|
static const uint8_t A12 = 53;
|
|
static const uint8_t A13 = 54;
|
|
|
|
static const uint8_t T0 = 2;
|
|
static const uint8_t T1 = 3;
|
|
static const uint8_t T2 = 4;
|
|
static const uint8_t T3 = 5;
|
|
static const uint8_t T4 = 6;
|
|
static const uint8_t T5 = 7;
|
|
static const uint8_t T6 = 8;
|
|
static const uint8_t T7 = 9;
|
|
static const uint8_t T8 = 10;
|
|
static const uint8_t T9 = 11;
|
|
static const uint8_t T10 = 12;
|
|
static const uint8_t T11 = 13;
|
|
static const uint8_t T12 = 14;
|
|
static const uint8_t T13 = 15;
|
|
|
|
#define ETH_PHY_TYPE ETH_PHY_TLK110
|
|
#define ETH_PHY_ADDR 1
|
|
#define ETH_PHY_MDC 31
|
|
#define ETH_PHY_MDIO 52
|
|
#define ETH_PHY_POWER 51
|
|
#define ETH_RMII_TX_EN 49
|
|
#define ETH_RMII_TX0 34
|
|
#define ETH_RMII_TX1 35
|
|
#define ETH_RMII_RX0 29
|
|
#define ETH_RMII_RX1_EN 30
|
|
#define ETH_RMII_CRS_DV 28
|
|
#define ETH_RMII_CLK 50
|
|
#define ETH_CLK_MODE EMAC_CLK_EXT_IN
|
|
|
|
#endif /* Pins_Arduino_h */
|