Skip to content

Commit 32d35ef

Browse files
committed
ESP: add MAC address to boot_out.txt (for wifi boards)
1 parent ad73d0b commit 32d35ef

File tree

1 file changed

+12
-0
lines changed
  • ports/espressif/supervisor

1 file changed

+12
-0
lines changed

ports/espressif/supervisor/port.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,18 @@ void port_idle_until_interrupt(void) {
493493
}
494494
}
495495

496+
#if CIRCUITPY_WIFI
497+
void port_boot_info(void) {
498+
uint8_t mac[6];
499+
esp_wifi_get_mac(ESP_IF_WIFI_STA, mac);
500+
mp_printf(&mp_plat_print, "MAC");
501+
for (int i = 0; i < 6; i++) {
502+
mp_printf(&mp_plat_print, ":%02X", mac[i]);
503+
}
504+
mp_printf(&mp_plat_print, "\n");
505+
}
506+
#endif
507+
496508
void port_post_boot_py(bool heap_valid) {
497509
if (!heap_valid && filesystem_present()) {
498510
}

0 commit comments

Comments
 (0)