init commit
This commit is contained in:
265
main/Kconfig.projbuild
Normal file
265
main/Kconfig.projbuild
Normal file
@ -0,0 +1,265 @@
|
||||
menu "Ethernet Configuration"
|
||||
choice ETH_USE_ETHERNET
|
||||
prompt "Ethernet Type"
|
||||
default ETH_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
|
||||
default ETH_USE_DM9051 if !IDF_TARGET_ESP32
|
||||
help
|
||||
Select which kind of Ethernet will be used in the example.
|
||||
|
||||
config ETH_USE_INTERNAL_ETHERNET
|
||||
depends on IDF_TARGET_ESP32
|
||||
select ETH_USE_ESP32_EMAC
|
||||
bool "Internal EMAC"
|
||||
help
|
||||
Select internal Ethernet MAC controller.
|
||||
|
||||
config ETH_USE_DM9051
|
||||
bool "DM9051 Module"
|
||||
select ETH_USE_SPI_ETHERNET
|
||||
select ETH_SPI_ETHERNET_DM9051
|
||||
help
|
||||
Select external SPI-Ethernet module (DM9051).
|
||||
|
||||
endchoice
|
||||
|
||||
if ETH_USE_INTERNAL_ETHERNET
|
||||
choice ETH_ETH_PHY_MODEL
|
||||
prompt "Ethernet PHY Device"
|
||||
default ETH_ETH_PHY_IP101
|
||||
help
|
||||
Select the Ethernet PHY device to use in the example.
|
||||
|
||||
config ETH_ETH_PHY_IP101
|
||||
bool "IP101"
|
||||
help
|
||||
IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
|
||||
Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
|
||||
|
||||
config ETH_ETH_PHY_RTL8201
|
||||
bool "RTL8201/SR8201"
|
||||
help
|
||||
RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
|
||||
Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
|
||||
|
||||
config ETH_ETH_PHY_LAN8720
|
||||
bool "LAN8720"
|
||||
help
|
||||
LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
|
||||
Goto https://www.microchip.com/LAN8720A for more information about it.
|
||||
|
||||
config ETH_ETH_PHY_DP83848
|
||||
bool "DP83848"
|
||||
help
|
||||
DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
|
||||
Goto http://www.ti.com/product/DP83848J for more information about it.
|
||||
endchoice
|
||||
|
||||
config ETH_ETH_MDC_GPIO
|
||||
int "SMI MDC GPIO number"
|
||||
default 23
|
||||
help
|
||||
Set the GPIO number used by SMI MDC.
|
||||
|
||||
config ETH_ETH_MDIO_GPIO
|
||||
int "SMI MDIO GPIO number"
|
||||
default 18
|
||||
help
|
||||
Set the GPIO number used by SMI MDIO.
|
||||
endif
|
||||
|
||||
if ETH_USE_DM9051
|
||||
config ETH_DM9051_SPI_HOST
|
||||
int "SPI Host Number"
|
||||
range 0 2
|
||||
default 1
|
||||
help
|
||||
Set the SPI host used to communicate with the SPI Ethernet Controller.
|
||||
|
||||
config ETH_DM9051_SCLK_GPIO
|
||||
int "SPI SCLK GPIO number"
|
||||
range 0 33
|
||||
default 19
|
||||
help
|
||||
Set the GPIO number used by SPI SCLK.
|
||||
|
||||
config ETH_DM9051_MOSI_GPIO
|
||||
int "SPI MOSI GPIO number"
|
||||
range 0 33
|
||||
default 23
|
||||
help
|
||||
Set the GPIO number used by SPI MOSI.
|
||||
|
||||
config ETH_DM9051_MISO_GPIO
|
||||
int "SPI MISO GPIO number"
|
||||
range 0 33
|
||||
default 25
|
||||
help
|
||||
Set the GPIO number used by SPI MISO.
|
||||
|
||||
config ETH_DM9051_CS_GPIO
|
||||
int "SPI CS GPIO number"
|
||||
range 0 33
|
||||
default 22
|
||||
help
|
||||
Set the GPIO number used by SPI CS.
|
||||
|
||||
config ETH_DM9051_SPI_CLOCK_MHZ
|
||||
int "SPI clock speed (MHz)"
|
||||
range 5 80
|
||||
default 20
|
||||
help
|
||||
Set the clock speed (MHz) of SPI interface.
|
||||
|
||||
config ETH_DM9051_INT_GPIO
|
||||
int "Interrupt GPIO number"
|
||||
default 4
|
||||
help
|
||||
Set the GPIO number used by DM9051 interrupt.
|
||||
endif
|
||||
|
||||
config ETH_ETH_PHY_RST_GPIO
|
||||
int "PHY Reset GPIO number"
|
||||
default 5
|
||||
help
|
||||
Set the GPIO number used to reset PHY chip.
|
||||
Set to -1 to disable PHY chip hardware reset.
|
||||
|
||||
config ETH_ETH_PHY_ADDR
|
||||
int "PHY Address"
|
||||
range 0 31 if ETH_USE_INTERNAL_ETHERNET
|
||||
range 1 1 if !ETH_USE_INTERNAL_ETHERNET
|
||||
default 1
|
||||
help
|
||||
Set PHY address according your board schematic.
|
||||
endmenu
|
||||
|
||||
menu "SSD1306 Configuration"
|
||||
|
||||
choice INTERFACE
|
||||
prompt "Interface"
|
||||
default I2C_INTERFACE
|
||||
help
|
||||
Select Interface.
|
||||
config I2C_INTERFACE
|
||||
bool "I2C Interface"
|
||||
help
|
||||
I2C Interface.
|
||||
config SPI_INTERFACE
|
||||
bool "SPI Interface"
|
||||
help
|
||||
SPI Interface.
|
||||
endchoice
|
||||
|
||||
choice PANEL
|
||||
prompt "Panel Type"
|
||||
default SSD1306_128x64
|
||||
help
|
||||
Select Panel Type.
|
||||
config SSD1306_128x32
|
||||
bool "128x32 Panel"
|
||||
help
|
||||
Panel is 128x32.
|
||||
config SSD1306_128x64
|
||||
bool "128x64 Panel"
|
||||
help
|
||||
Panel is 128x64.
|
||||
endchoice
|
||||
|
||||
config OFFSETX
|
||||
int "GRAM X OFFSET"
|
||||
range 0 99
|
||||
default 0
|
||||
help
|
||||
When your TFT have offset(X), set it.
|
||||
|
||||
config FLIP
|
||||
bool "Flip upside down"
|
||||
default false
|
||||
help
|
||||
Flip upside down.
|
||||
|
||||
config SCL_GPIO
|
||||
depends on I2C_INTERFACE
|
||||
int "SCL GPIO number"
|
||||
range 0 46
|
||||
default 22 if IDF_TARGET_ESP32
|
||||
default 12 if IDF_TARGET_ESP32S2
|
||||
default 9 if IDF_TARGET_ESP32C3
|
||||
help
|
||||
GPIO number (IOxx) to I2C SCL.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to I2C.
|
||||
GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
|
||||
config SDA_GPIO
|
||||
depends on I2C_INTERFACE
|
||||
int "SDA GPIO number"
|
||||
range 0 46
|
||||
default 21 if IDF_TARGET_ESP32
|
||||
default 11 if IDF_TARGET_ESP32S2
|
||||
default 10 if IDF_TARGET_ESP32C3
|
||||
help
|
||||
GPIO number (IOxx) to I2C SDA.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to I2C.
|
||||
GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
|
||||
config RESET_GPIO
|
||||
int "RESET GPIO number"
|
||||
range -1 46
|
||||
default -1
|
||||
help
|
||||
GPIO number (IOxx) to RESET.
|
||||
When it is -1, RESET isn't performed.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to Reset.
|
||||
GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
|
||||
config MOSI_GPIO
|
||||
depends on SPI_INTERFACE
|
||||
int "MOSI GPIO number"
|
||||
range 0 46
|
||||
default 23 if IDF_TARGET_ESP32
|
||||
default 35 if IDF_TARGET_ESP32S2
|
||||
default 0 if IDF_TARGET_ESP32C3
|
||||
help
|
||||
GPIO number (IOxx) to SPI MOSI.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to DC.
|
||||
On the ESP32, GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
On the ESP32-S2, GPIO 46 is input-only so cannot be used as outputs.
|
||||
|
||||
config SCLK_GPIO
|
||||
depends on SPI_INTERFACE
|
||||
int "SCLK GPIO number"
|
||||
range 0 46
|
||||
default 18 if IDF_TARGET_ESP32
|
||||
default 36 if IDF_TARGET_ESP32S2
|
||||
default 1 if IDF_TARGET_ESP32C3
|
||||
help
|
||||
GPIO number (IOxx) to SPI SCLK.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to DC.
|
||||
On the ESP32, GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
On the ESP32-S2, GPIO 46 is input-only so cannot be used as outputs.
|
||||
|
||||
config CS_GPIO
|
||||
depends on SPI_INTERFACE
|
||||
int "CS GPIO number"
|
||||
range 0 34
|
||||
default 5 if IDF_TARGET_ESP32
|
||||
default 34 if IDF_TARGET_ESP32S2
|
||||
default 10 if IDF_TARGET_ESP32C3
|
||||
help
|
||||
GPIO number (IOxx) to SPI CS.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to CS.
|
||||
GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
|
||||
config DC_GPIO
|
||||
depends on SPI_INTERFACE
|
||||
int "DC GPIO number"
|
||||
range 0 34
|
||||
default 2
|
||||
help
|
||||
GPIO number (IOxx) to SPI DC.
|
||||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to DC.
|
||||
GPIOs 35-39 are input-only so cannot be used as outputs.
|
||||
|
||||
|
||||
endmenu
|
||||
|
||||
Reference in New Issue
Block a user