fix(wifi): Add new api to get mac clock time

Closes https://github.com/espressif/esp-idf/issues/15348
This commit is contained in:
zhangyanjiao
2025-03-05 17:38:06 +08:00
parent e910c5755b
commit 82bce6c077

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -777,6 +777,14 @@ esp_err_t esp_wifi_connect_internal(void);
*/
esp_err_t esp_wifi_disconnect_internal(void);
/**
* @brief Get the time information from the MAC clock. The time is precise only if modem sleep or light sleep is not enabled.
*
* @return 32-bit time value, unit: microsecond. This time is only 32 bits, which means it will overflow and reset to 0 after approximately 71 minutes.
* Therefore, when using it, the time difference between two consecutive readings should not be too long.
*/
uint32_t esp_wifi_internal_get_mac_clock_time(void);
#ifdef __cplusplus
}
#endif