Skip to content

Commit

Permalink
fix(esp32c2): Added get_flash_cap and get_flash_vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-kocka authored and peterdragun committed Jul 16, 2024
1 parent 38efd90 commit 0b49bc2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions esptool/targets/esp32c2.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ def get_major_chip_version(self):
num_word = 1
return (self.read_reg(self.EFUSE_BLOCK2_ADDR + (4 * num_word)) >> 20) & 0x3

def get_flash_cap(self):
# ESP32-C2 doesn't have eFuse field FLASH_CAP.
# Can't get info about the flash chip.
return 0

def get_flash_vendor(self):
# ESP32-C2 doesn't have eFuse field FLASH_VENDOR.
# Can't get info about the flash chip.
return ""

def get_crystal_freq(self):
# The crystal detection algorithm of ESP32/ESP8266 works for ESP32-C2 as well.
return ESPLoader.get_crystal_freq(self)
Expand Down

0 comments on commit 0b49bc2

Please sign in to comment.