def efuse_perform_write(esp):
 esp.write_reg(EFUSE_REG_CONF, EFUSE_CONF_WRITE)
 esp.write_reg(EFUSE_REG_CMD, EFUSE_CMD_WRITE)
 def wait_idle():
  for _ in range(10):
   if (esp.read_reg(EFUSE_REG_CMD) == 0):
    return
  raise esptool.FatalError('Timed out waiting for Efuse controller command to complete')
 wait_idle()
 esp.write_reg(EFUSE_REG_CONF, EFUSE_CONF_READ)
 esp.write_reg(EFUSE_REG_CMD, EFUSE_CMD_READ)
 wait_idle()

def efuse_perform_write ( esp ) : esp . write_reg ( EFUSE_REG_CONF , EFUSE_CONF_WRITE ) esp . write_reg ( EFUSE_REG_CMD , EFUSE_CMD_WRITE ) def wait_idle ( ) : for _ in range ( 10 ) : if ( esp . read_reg ( EFUSE_REG_CMD ) == 0 ) : return raise esptool . FatalError ( 'Timed out waiting for Efuse controller command to complete' ) wait_idle ( ) esp . write_reg ( EFUSE_REG_CONF , EFUSE_CONF_READ ) esp . write_reg ( EFUSE_REG_CMD , EFUSE_CMD_READ ) wait_idle ( )
write the values in the efuse write registers to the efuse hardware .