Add SPI Selection for Ethernet

This commit is contained in:
Luc
2024-09-12 11:39:33 +08:00
parent 49f72a6561
commit c19b927ffa
3 changed files with 32 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@@ -811,6 +811,36 @@
"setting": true,
"usedescforoptions": true
},
{
"id": "ethernetspi",
"define": "",
"label": "Ethernet Dedicated SPI",
"description": "SPI Used by Ethernet",
"type": "select",
"value": "ETHERNET_SPI_USE_SPI2",
"depend": [
{
"id": "ethernetboard",
"value": "TYPE_ETH_PHY_W5500"
},
{
"id": "ethernet",
"value": "true"
}
],
"setting": true,
"usedescforoptions": true,
"options": [
{
"label": "SPI",
"value": "ETHERNET_SPI_USE_SPI"
},
{
"label": "SPI2",
"value": "ETHERNET_SPI_USE_SPI2"
}
]
},
{
"id": "ethernetspicspin",
"define": "ETH_PHY_CS",
@@ -2320,20 +2350,6 @@
"value": "SETTINGS_IN_PREFERENCES"
}
]
},
{
"id": "serialTask",
"define": "SERIAL_INDEPENDANT_TASK",
"label": "Add serial task",
"description": "ESP32 need to add a task to handle serial communication",
"type": "boolean",
"value": true,
"setting": true,
"disableiffalse": true,
"depend": {
"id": "targetmcu",
"value": ["esp32", "esp32s3"]
}
}
]
}

View File

@@ -570,7 +570,7 @@ const convertToText = (data) => {
(element.header ? element.header : "") +
(element.define
? `#define ${element.define} ${element.value}\n`
: "")
: `#define ${element.value}\n`)
)
} else if (element.type == "boolean") {
return (