From 4ed561e227b03719a454a623c26d7dabe2c1c5f8 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 23 Jun 2024 16:26:04 +0200 Subject: [PATCH] add legacy `get_chip_revision` to all --- esp_flasher/own_esptool.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/esp_flasher/own_esptool.py b/esp_flasher/own_esptool.py index d9af3ce..b97f20d 100644 --- a/esp_flasher/own_esptool.py +++ b/esp_flasher/own_esptool.py @@ -2559,6 +2559,10 @@ class ESP32C6ROM(ESP32C3ROM): UF2_FAMILY_ID = 0x540DDF62 + # Returns old version format (ECO number). Use the new format get_chip_full_revision(). + def get_chip_revision(self): + return self.get_major_chip_version() + def get_pkg_version(self): num_word = 3 return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 24) & 0x07 @@ -2665,6 +2669,10 @@ class ESP32H2ROM(ESP32C6ROM): UF2_FAMILY_ID = 0x332726F6 + # Returns old version format (ECO number). Use the new format get_chip_full_revision(). + def get_chip_revision(self): + return self.get_major_chip_version() + def get_pkg_version(self): num_word = 4 return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 0) & 0x07 @@ -2747,6 +2755,10 @@ class ESP32C2ROM(ESP32C3ROM): UF2_FAMILY_ID = 0x2B88D29C + # Returns old version format (ECO number). Use the new format get_chip_full_revision(). + def get_chip_revision(self): + return self.get_major_chip_version() + def get_pkg_version(self): num_word = 1 return (self.read_reg(self.EFUSE_BLOCK2_ADDR + (4 * num_word)) >> 22) & 0x07