Skip to content

Commit 782ccf2

Browse files
Raffael Rostagnonashif
authored andcommitted
drivers: hwinfo: esp32c2: Add support
Add hwinfo support to ESP32C2 and ESP8684 Signed-off-by: Raffael Rostagno <[email protected]>
1 parent 15aefe6 commit 782ccf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/hwinfo/hwinfo_esp32.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
ssize_t z_impl_hwinfo_get_device_id(uint8_t *buffer, size_t length)
1717
{
18-
#if !defined(CONFIG_SOC_SERIES_ESP32)
18+
#if defined(CONFIG_SOC_SERIES_ESP32C2)
19+
uint32_t rdata1 = sys_read32(EFUSE_RD_BLK2_DATA0_REG);
20+
uint32_t rdata2 = sys_read32(EFUSE_RD_BLK2_DATA1_REG);
21+
#elif !defined(CONFIG_SOC_SERIES_ESP32)
1922
uint32_t rdata1 = sys_read32(EFUSE_RD_MAC_SPI_SYS_0_REG);
2023
uint32_t rdata2 = sys_read32(EFUSE_RD_MAC_SPI_SYS_1_REG);
2124
#else

0 commit comments

Comments
 (0)