efuse: fix esp32h2 get ext_mac

pull/7830/head
zhangwenxu 2021-10-27 19:22:22 +08:00 zatwierdzone przez KonstantinKondrashov
rodzic bd2a524a12
commit 55fd8cb685
4 zmienionych plików z 12 dodań i 10 usunięć

Wyświetl plik

@ -9,7 +9,7 @@
#include <assert.h>
#include "esp_efuse_table.h"
// md5_digest_table a007943ae37fe41884a23d505a6e7dbb
// md5_digest_table 6aaac59bd3f6d31bea4aef43b1f0d78a
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -349,8 +349,8 @@ static const esp_efuse_desc_t MAC_FACTORY[] = {
};
static const esp_efuse_desc_t MAC_EXT[] = {
{EFUSE_BLK1, 123, 8}, // Factory MAC addr [6],
{EFUSE_BLK1, 131, 8}, // Factory MAC addr [7],
{EFUSE_BLK1, 123, 8}, // Extend MAC addr [0],
{EFUSE_BLK1, 131, 8}, // Extend MAC addr [1],
};
static const esp_efuse_desc_t SPI_PAD_CONFIG_CLK[] = {
@ -913,8 +913,8 @@ const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = {
};
const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = {
&MAC_EXT[6], // Factory MAC addr [6]
&MAC_EXT[7], // Factory MAC addr [7]
&MAC_EXT[0], // Extend MAC addr [0]
&MAC_EXT[1], // Extend MAC addr [1]
NULL
};

Wyświetl plik

@ -115,8 +115,8 @@
, EFUSE_BLK1, 16, 8, Factory MAC addr [3]
, EFUSE_BLK1, 8, 8, Factory MAC addr [4]
, EFUSE_BLK1, 0, 8, Factory MAC addr [5]
MAC_EXT, EFUSE_BLK1, 123, 8, Factory MAC addr [6]
, EFUSE_BLK1, 131, 8, Factory MAC addr [7]
MAC_EXT, EFUSE_BLK1, 123, 8, Extend MAC addr [0]
, EFUSE_BLK1, 131, 8, Extend MAC addr [1]
SPI_PAD_CONFIG_CLK, EFUSE_BLK1, 48, 6, SPI_PAD_configure CLK
SPI_PAD_CONFIG_Q_D1, EFUSE_BLK1, 54, 6, SPI_PAD_configure Q(D1)
SPI_PAD_CONFIG_D_D0, EFUSE_BLK1, 60, 6, SPI_PAD_configure D(D0)

Nie można renderować tego pliku, ponieważ zawiera nieoczekiwany znak w wierszu 7 i kolumnie 87.

Wyświetl plik

@ -9,7 +9,7 @@ extern "C" {
#endif
// md5_digest_table a007943ae37fe41884a23d505a6e7dbb
// md5_digest_table 6aaac59bd3f6d31bea4aef43b1f0d78a
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.

Wyświetl plik

@ -75,8 +75,9 @@ esp_err_t esp_efuse_mac_get_custom(uint8_t *mac)
return ESP_ERR_INVALID_MAC;
}
#if (ESP_MAC_ADDRESS_LEN == 8)
err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN - size);
err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN * 8 - size_bits);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Reading MAC_EXT failed, error=%d", err);
return err;
}
#endif
@ -111,8 +112,9 @@ esp_err_t esp_efuse_mac_get_default(uint8_t *mac)
return err;
}
#if (ESP_MAC_ADDRESS_LEN == 8)
err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN - size_bits / 8);
err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN * 8 - size_bits);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Reading MAC_EXT failed, error=%d", err);
return err;
}
#endif