fix(es3c35p): align runtime configuration
This commit is contained in:
@@ -311,11 +311,39 @@ def test_compile_missing_config():
|
|||||||
print("PASSED")
|
print("PASSED")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def test_es3c35p_uses_current_runtime_contract():
|
||||||
|
print("Running test_es3c35p_uses_current_runtime_contract...")
|
||||||
|
repository_root = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", ".."))
|
||||||
|
device_dir = os.path.join(repository_root, "Devices", "es3c35p")
|
||||||
|
with open(os.path.join(device_dir, "device.properties")) as f:
|
||||||
|
properties = f.read()
|
||||||
|
with open(os.path.join(device_dir, "es3c35p.dts")) as f:
|
||||||
|
devicetree = f.read()
|
||||||
|
|
||||||
|
requirements = [
|
||||||
|
("apps.launcherAppId=tactility.launcher" in properties, "current launcher app id"),
|
||||||
|
("hardware.tinyUsb=" not in properties, "no obsolete hardware.tinyUsb property"),
|
||||||
|
('wifi0 {\n\t\tcompatible = "espressif,esp32-wifi-pinned";\n\t};' in devicetree,
|
||||||
|
"Wi-Fi enabled for web server and MCP"),
|
||||||
|
('ble0 {\n\t\tcompatible = "espressif,esp32-ble";\n\t};' in devicetree,
|
||||||
|
"BLE node matches hardware.bluetooth=true"),
|
||||||
|
]
|
||||||
|
missing = [description for condition, description in requirements if not condition]
|
||||||
|
if missing:
|
||||||
|
print("FAILED: " + ", ".join(missing))
|
||||||
|
return False
|
||||||
|
|
||||||
|
print("PASSED")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
tests = [
|
tests = [
|
||||||
test_compile_success,
|
test_compile_success,
|
||||||
test_compile_invalid_dts,
|
test_compile_invalid_dts,
|
||||||
test_compile_missing_config,
|
test_compile_missing_config,
|
||||||
|
test_es3c35p_uses_current_runtime_contract,
|
||||||
test_minmax_within_range_succeeds,
|
test_minmax_within_range_succeeds,
|
||||||
test_minmax_below_minimum_fails,
|
test_minmax_below_minimum_fails,
|
||||||
test_minmax_above_maximum_fails,
|
test_minmax_above_maximum_fails,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
general.vendor=LCDWIKI/Hosyond
|
general.vendor=LCDWIKI/Hosyond
|
||||||
general.name=ES3C35P
|
general.name=ES3C35P
|
||||||
|
|
||||||
apps.launcherAppId=Launcher
|
apps.launcherAppId=tactility.launcher
|
||||||
|
|
||||||
hardware.target=ESP32S3
|
hardware.target=ESP32S3
|
||||||
hardware.flashSize=16MB
|
hardware.flashSize=16MB
|
||||||
@@ -9,7 +9,6 @@ hardware.spiRam=true
|
|||||||
hardware.spiRamMode=OCT
|
hardware.spiRamMode=OCT
|
||||||
hardware.spiRamSpeed=120M
|
hardware.spiRamSpeed=120M
|
||||||
hardware.esptoolFlashFreq=120M
|
hardware.esptoolFlashFreq=120M
|
||||||
hardware.tinyUsb=true
|
|
||||||
hardware.bluetooth=true
|
hardware.bluetooth=true
|
||||||
|
|
||||||
display.size=3.5"
|
display.size=3.5"
|
||||||
|
|||||||
@@ -23,12 +23,10 @@
|
|||||||
|
|
||||||
wifi0 {
|
wifi0 {
|
||||||
compatible = "espressif,esp32-wifi-pinned";
|
compatible = "espressif,esp32-wifi-pinned";
|
||||||
status = "disabled";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ble0 {
|
ble0 {
|
||||||
compatible = "espressif,esp32-ble";
|
compatible = "espressif,esp32-ble";
|
||||||
status = "disabled";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gpio0 {
|
gpio0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user