diff --git a/examples/Basic/AnalogMeter/AnalogMeter.ino b/examples/Basic/AnalogMeter/AnalogMeter.ino index 548adb94..45d70ab9 100644 --- a/examples/Basic/AnalogMeter/AnalogMeter.ino +++ b/examples/Basic/AnalogMeter/AnalogMeter.ino @@ -20,8 +20,8 @@ M5GFX display; //M5AtomDisplay display; // default setting //M5AtomDisplay display ( 320, 180 ); // width, height -// #include -// M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +// #include +// M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 static constexpr float deg_to_rad = 0.017453292519943295769236907684886; diff --git a/examples/Basic/BarGraph/BarGraph.ino b/examples/Basic/BarGraph/BarGraph.ino index d9b9eb71..0f84c46a 100644 --- a/examples/Basic/BarGraph/BarGraph.ino +++ b/examples/Basic/BarGraph/BarGraph.ino @@ -17,8 +17,8 @@ M5GFX display; // #include // M5AtomDisplay display; -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 static constexpr size_t BAR_COUNT = 64; static int max_y[BAR_COUNT]; diff --git a/examples/Basic/GameOfLife/GameOfLife.ino b/examples/Basic/GameOfLife/GameOfLife.ino index 0993dd6f..8d59659f 100644 --- a/examples/Basic/GameOfLife/GameOfLife.ino +++ b/examples/Basic/GameOfLife/GameOfLife.ino @@ -22,8 +22,8 @@ M5GFX display; //#include //M5AtomDisplay display; -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 M5Canvas canvas[2]; diff --git a/examples/Basic/LongTextScroll/LongTextScroll.ino b/examples/Basic/LongTextScroll/LongTextScroll.ino index c871f269..edee885e 100644 --- a/examples/Basic/LongTextScroll/LongTextScroll.ino +++ b/examples/Basic/LongTextScroll/LongTextScroll.ino @@ -17,8 +17,8 @@ M5GFX display; //#include //M5AtomDisplay display; -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 M5Canvas canvas(&display); diff --git a/examples/Basic/ScrollGraph/ScrollGraph.ino b/examples/Basic/ScrollGraph/ScrollGraph.ino index 14914d52..652796e2 100644 --- a/examples/Basic/ScrollGraph/ScrollGraph.ino +++ b/examples/Basic/ScrollGraph/ScrollGraph.ino @@ -20,8 +20,8 @@ M5GFX display; //#include //M5AtomDisplay display; -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 #define LINE_COUNT 6 diff --git a/examples/Basic/SpinTile/SpinTile.ino b/examples/Basic/SpinTile/SpinTile.ino index 28f098a2..5f85ff38 100644 --- a/examples/Basic/SpinTile/SpinTile.ino +++ b/examples/Basic/SpinTile/SpinTile.ino @@ -18,8 +18,8 @@ M5GFX display; //M5AtomDisplay display; // default setting //M5AtomDisplay display ( 320, 180 ); // width, height -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 static constexpr const int qsintab[256]={ 0x8000,0x80c9,0x8192,0x825b,0x8324,0x83ee,0x84b7,0x8580, diff --git a/examples/Basic/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino b/examples/Basic/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino index 28b8b356..d9451c26 100644 --- a/examples/Basic/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino +++ b/examples/Basic/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino @@ -18,8 +18,8 @@ M5GFX tft; // M5AtomDisplay tft(480, 270); // M5AtomDisplay tft(320, 180); -// #include -// M5UnitPoEP4HDMI tft; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +// #include +// M5UnitPoEP4DisplayOut tft; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 /* M5AtomDisplay tft( 240 // width , 360 // height diff --git a/examples/Basic/TextLogScroll/TextLogScroll.ino b/examples/Basic/TextLogScroll/TextLogScroll.ino index 8aec03c8..bf77e946 100644 --- a/examples/Basic/TextLogScroll/TextLogScroll.ino +++ b/examples/Basic/TextLogScroll/TextLogScroll.ino @@ -18,8 +18,8 @@ M5GFX display; //M5AtomDisplay display; // default setting //M5AtomDisplay display ( 320, 180 ); // width, height -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 static constexpr char text0[] = "hello world"; static constexpr char text1[] = "this"; diff --git a/examples/Basic/drawImageData/drawImageData.ino b/examples/Basic/drawImageData/drawImageData.ino index 4661da9e..a0e727c5 100644 --- a/examples/Basic/drawImageData/drawImageData.ino +++ b/examples/Basic/drawImageData/drawImageData.ino @@ -25,8 +25,8 @@ M5GFX display; //#include //M5AtomDisplay display; -//#include -//M5UnitPoEP4HDMI display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 +//#include +//M5UnitPoEP4DisplayOut display; // 1280x720@60 or 1920x1080@30 only; default 1280x720@60 extern const uint8_t jpg[]; diff --git a/extras/board_spec/README.md b/extras/board_spec/README.md index 9db3a45a..a55db225 100644 --- a/extras/board_spec/README.md +++ b/extras/board_spec/README.md @@ -129,6 +129,8 @@ Write `detect_class` only when the class holds in every state detection can meet cold boot, software reset, wake from sleep, and after an interrupted detection. Measure each of these states on real hardware before writing a value. +- Do not classify pins whose state users can change through buttons, connectors, + or headers. Validation rejects connector and button roles. - Use `up` / `down` / `floating` for pins defined by resistors alone. - Use `fixed` for a driven pin only when the driver is always powered. For example, an EPD BUSY output reads D normally and U while the EPD is in deep sleep, so it can diff --git a/extras/board_spec/boards/m5stack_tab5.json b/extras/board_spec/boards/m5stack_tab5.json index d52ac04e..d5fa8464 100644 --- a/extras/board_spec/boards/m5stack_tab5.json +++ b/extras/board_spec/boards/m5stack_tab5.json @@ -75,6 +75,36 @@ "roles": "generated" } }, + "8": { + "roles": [ + "bus:wifi_sdio.d3" + ] + }, + "9": { + "roles": [ + "bus:wifi_sdio.d2" + ] + }, + "10": { + "roles": [ + "bus:wifi_sdio.d1" + ] + }, + "11": { + "roles": [ + "bus:wifi_sdio.d0" + ] + }, + "12": { + "roles": [ + "bus:wifi_sdio.clk" + ] + }, + "13": { + "roles": [ + "bus:wifi_sdio.cmd" + ] + }, "16": { "roles": [ "conn:mbus.2" @@ -111,7 +141,8 @@ "22": { "roles": [ "dev:backlight.pwm" - ] + ], + "detect_class": "down" }, "23": { "roles": [ @@ -342,6 +373,18 @@ ], "preferred_host": 0, "fixed": false + }, + "wifi_sdio": { + "kind": "sdmmc", + "signals": [ + "clk", + "cmd", + "d0", + "d1", + "d2", + "d3" + ], + "fixed": false } }, "devices": { diff --git a/extras/board_spec/boards/m5stack_tab5x.json b/extras/board_spec/boards/m5stack_tab5x.json index 728f9152..ba32ce77 100644 --- a/extras/board_spec/boards/m5stack_tab5x.json +++ b/extras/board_spec/boards/m5stack_tab5x.json @@ -74,6 +74,36 @@ "roles": "generated" } }, + "8": { + "roles": [ + "bus:wifi_sdio.d3" + ] + }, + "9": { + "roles": [ + "bus:wifi_sdio.d2" + ] + }, + "10": { + "roles": [ + "bus:wifi_sdio.d1" + ] + }, + "11": { + "roles": [ + "bus:wifi_sdio.d0" + ] + }, + "12": { + "roles": [ + "bus:wifi_sdio.clk" + ] + }, + "13": { + "roles": [ + "bus:wifi_sdio.cmd" + ] + }, "16": { "roles": [ "conn:mbus.2" @@ -110,7 +140,8 @@ "22": { "roles": [ "dev:backlight.pwm" - ] + ], + "detect_class": "down" }, "23": { "roles": [ @@ -341,6 +372,18 @@ ], "preferred_host": 0, "fixed": false + }, + "wifi_sdio": { + "kind": "sdmmc", + "signals": [ + "clk", + "cmd", + "d0", + "d1", + "d2", + "d3" + ], + "fixed": false } }, "devices": { diff --git a/extras/board_spec/boards/m5stampp4.json b/extras/board_spec/boards/m5stampp4.json new file mode 100644 index 00000000..6655b6b6 --- /dev/null +++ b/extras/board_spec/boards/m5stampp4.json @@ -0,0 +1,11 @@ +{ + "schema_version": 1, + "id": "m5stampp4", + "name": "M5StampP4", + "official_name": "M5StampP4", + "legacy_board_id": 150, + "chip": "esp32p4", + "pins": {}, + "buses": {}, + "devices": {} +} diff --git a/extras/board_spec/boards/m5stampp4x.json b/extras/board_spec/boards/m5stampp4x.json new file mode 100644 index 00000000..5c0aaaf4 --- /dev/null +++ b/extras/board_spec/boards/m5stampp4x.json @@ -0,0 +1,11 @@ +{ + "schema_version": 1, + "id": "m5stampp4x", + "name": "M5StampP4X", + "official_name": "M5StampP4X", + "legacy_board_id": 156, + "chip": "esp32p4", + "pins": {}, + "buses": {}, + "devices": {} +} diff --git a/extras/board_spec/boards/m5stamps3mini.json b/extras/board_spec/boards/m5stamps3mini.json index e4aa1fc5..bd720747 100644 --- a/extras/board_spec/boards/m5stamps3mini.json +++ b/extras/board_spec/boards/m5stamps3mini.json @@ -3,7 +3,7 @@ "id": "m5stamps3mini", "name": "M5StampS3Mini", "official_name": "M5Stack M5StampS3Mini", - "legacy_board_id": 150, + "legacy_board_id": 155, "chip": "esp32s3", "pins": { "1": { diff --git a/extras/board_spec/boards/m5unitpoep4.json b/extras/board_spec/boards/m5unitpoep4.json new file mode 100644 index 00000000..0674031d --- /dev/null +++ b/extras/board_spec/boards/m5unitpoep4.json @@ -0,0 +1,95 @@ +{ + "schema_version": 1, + "id": "m5unitpoep4", + "name": "M5UnitPoEP4", + "official_name": "M5Stack Unit PoE-P4", + "legacy_board_id": 148, + "chip": "esp32p4", + "pins": { + "0": { + "roles": [ + "bus:internal_i2c.sda" + ], + "verified": { + "roles": "generated" + } + }, + "1": { + "roles": [ + "bus:internal_i2c.scl" + ], + "verified": { + "roles": "generated" + } + }, + "31": { + "roles": [ + "dev:ethernet.mdc" + ], + "detect_class": "up" + }, + "32": { + "roles": [], + "detect_class": "floating" + }, + "45": { + "roles": [ + "dev:btn_a.in" + ] + }, + "52": { + "roles": [ + "dev:ethernet.mdio" + ], + "detect_class": "up" + }, + "53": { + "roles": [ + "conn:port_a.2" + ], + "verified": { + "roles": "generated" + } + }, + "54": { + "roles": [ + "conn:port_a.1" + ], + "verified": { + "roles": "generated" + } + } + }, + "buses": { + "internal_i2c": { + "kind": "i2c", + "signals": [ + "sda", + "scl" + ], + "fixed": false, + "verified": { + "signals": "generated" + } + } + }, + "devices": { + "ethernet": { + "kind": "transceiver" + }, + "btn_a": { + "kind": "button", + "part": "button", + "spec": { + "active_low": true, + "pull": "external_up" + } + } + }, + "connectors": { + "port_a": { + "type": "hy2_4p", + "standard": "port_i2c" + } + } +} diff --git a/extras/board_spec/detector_order.json b/extras/board_spec/detector_order.json index 3d9ce0a7..341d9ac0 100644 --- a/extras/board_spec/detector_order.json +++ b/extras/board_spec/detector_order.json @@ -122,10 +122,53 @@ ] }, "esp32p4_detectors": { - "chip": "esp32p4", "source": "src/board_detect/m5/esp32p4.inl", "output": "esp32p4_detector_order.hpp", + "chip": "esp32p4", + "source": "src/board_detect/m5/esp32p4.inl", + "output": "esp32p4_detector_order.hpp", "families": [ - { "detector": "corep4x_detector", "boards": ["m5stack_corep4x"] }, - { "detector": "tab5_family_detector", "boards": ["m5stack_tab5", "m5stack_tab5x"] } + { + "detector": "corep4x_detector", + "boards": [ + "m5stack_corep4x" + ] + }, + { + "detector": "tab5_family_detector", + "boards": [ + "m5stack_tab5", + "m5stack_tab5x" + ] + }, + { + "detector": "unitpoep4_detector", + "boards": [ + "m5unitpoep4" + ] + }, + { + "detector": "stampp4_detector", + "boards": [ + "m5stampp4", + "m5stampp4x" + ] + } + ], + "constraints": [ + { + "before": "corep4x_detector", + "after": "tab5_family_detector", + "reason": "Probe the CoreP4X internal devices before Tab5" + }, + { + "before": "tab5_family_detector", + "after": "unitpoep4_detector", + "reason": "Probe Tab5 internal devices before driving Ethernet management pins" + }, + { + "before": "unitpoep4_detector", + "after": "stampp4_detector", + "reason": "StampP4 is only a fallback candidate after all P4 probes" + } ] } } diff --git a/extras/board_spec/dist/board_spec_editor.html b/extras/board_spec/dist/board_spec_editor.html index fde07d05..7c1145e8 100644 --- a/extras/board_spec/dist/board_spec_editor.html +++ b/extras/board_spec/dist/board_spec_editor.html @@ -909,6 +909,8 @@

"validation.E_PSRAM_PINS": { "en": "PSRAM pins do not match the chip definition", "zh": "PSRAM 引脚与芯片定义不一致", "ja": "PSRAM ピンがチップ定義と一致しません" }, "validation.E_PSRAM_CONFLICT": { "en": "PSRAM conflicts with another signal", "zh": "PSRAM 与其他信号冲突", "ja": "PSRAM が別の信号と衝突しています" }, "validation.E_PIN_KEY": { "en": "A SoC pin key is invalid or outside the chip range", "zh": "SoC pin key 无效或超出芯片范围", "ja": "SoC pin key が不正かチップ範囲外です" }, + "validation.E_DETECT_CLASS_CONNECTOR": { "en": "Detection cannot classify user connector pins", "zh": "检测不可使用用户连接器引脚", "ja": "利用者のコネクタピンは判別に使えません" }, + "validation.E_DETECT_CLASS_BUTTON": { "en": "Detection cannot classify user button pins", "zh": "检测不可使用用户按钮引脚", "ja": "利用者のボタンピンは判別に使えません" }, "validation.E_DETECT_CLASS_NO_PULL": { "en": "Detection classification requires internal GPIO pulls", "zh": "检测分类需要 GPIO 内部上下拉", "ja": "判別分類には GPIO の内部プルが必要です" }, "validation.E_CHIP_ABSENT": { "en": "This GPIO number does not exist on the chip", "zh": "该 GPIO 编号在芯片上不存在", "ja": "この GPIO 番号はチップに存在しません" }, "validation.E_CHIP_PACKAGE": { "en": "The chip package variant is unknown", "zh": "芯片封装变体未知", "ja": "チップの package variant が不明です" }, @@ -956,13 +958,13 @@

} - + - - + +