Skip to content

Commit

Permalink
add legacy get_chip_revision to all
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Jun 23, 2024
1 parent 92e0214 commit 4ed561e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions esp_flasher/own_esptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4ed561e

Please sign in to comment.