mirror of
https://github.com/espressif/esptool.git
synced 2025-10-20 13:23:38 +08:00
feat(espefuse): Clean up efuse code for ESP32H2
This commit is contained in:
@@ -306,22 +306,9 @@ class EfuseField(base_fields.EfuseFieldBase):
|
||||
"keypurpose": EfuseKeyPurposeField,
|
||||
"t_sensor": EfuseTempSensor,
|
||||
"adc_tp": EfuseAdcPointCalibration,
|
||||
"wafer": EfuseWafer,
|
||||
}.get(efuse.class_type, EfuseField)(parent, efuse)
|
||||
|
||||
|
||||
class EfuseWafer(EfuseField):
|
||||
def get(self, from_read=True):
|
||||
hi_bits = self.parent["WAFER_VERSION_MINOR_HI"].get(from_read)
|
||||
assert self.parent["WAFER_VERSION_MINOR_HI"].bit_len == 1
|
||||
lo_bits = self.parent["WAFER_VERSION_MINOR_LO"].get(from_read)
|
||||
assert self.parent["WAFER_VERSION_MINOR_LO"].bit_len == 3
|
||||
return (hi_bits << 3) + lo_bits
|
||||
|
||||
def save(self, new_value):
|
||||
raise esptool.FatalError("Burning %s is not supported" % self.name)
|
||||
|
||||
|
||||
class EfuseTempSensor(EfuseField):
|
||||
def get(self, from_read=True):
|
||||
value = self.get_bitstring(from_read)
|
||||
|
Reference in New Issue
Block a user