1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-19 03:32:20 +01:00

[wifi] Use custom MAC address if programmed (#7498)

This commit is contained in:
Keith Burzinski
2024-09-26 17:24:18 -05:00
committed by GitHub
parent 3df25a183a
commit 529ff4bd52
3 changed files with 57 additions and 3 deletions

View File

@@ -635,6 +635,14 @@ std::string get_mac_address_pretty();
void set_mac_address(uint8_t *mac);
#endif
/// Check if a custom MAC address is set (ESP32 & variants)
/// @return True if a custom MAC address is set (ESP32 & variants), else false
bool has_custom_mac_address();
/// Check if the MAC address is not all zeros or all ones
/// @return True if MAC is valid, else false
bool mac_address_is_valid(const uint8_t *mac);
/// Delay for the given amount of microseconds, possibly yielding to other processes during the wait.
void delay_microseconds_safe(uint32_t us);