feat(phy): support to query phy used time

This commit is contained in:
liuning
2024-02-28 11:54:23 +08:00
committed by BOT
parent 7aaab5a3ff
commit f0701b265d
4 changed files with 143 additions and 2 deletions
+18
View File
@@ -38,6 +38,7 @@ typedef enum {
PHY_MODEM_WIFI = 1, /*!< PHY modem WIFI */
PHY_MODEM_BT = 2, /*!< PHY modem BT */
PHY_MODEM_IEEE802154 = 4, /*!< PHY modem IEEE802154 */
PHY_MODEM_MAX, /*!< Don't use it. Used by ESP_PHY_MODEM_COUNT_MAX */
} esp_phy_modem_t;
/**
@@ -286,6 +287,23 @@ void phy_init_param_set(uint8_t param);
*/
void phy_wifi_enable_set(uint8_t enable);
#if CONFIG_ESP_PHY_RECORD_USED_TIME
/**
* @brief Get phy used time from different modem
* @param used_time pointer of variable to get used time, in microseconds
* @param modem modem type
* @return ESP_ERR_INVALID_ARG on incorrect modem type.
*/
esp_err_t phy_query_used_time(uint64_t *used_time, esp_phy_modem_t modem);
/**
* @brief Clear phy used time for different modem
* @param modem modem type
* @return ESP_ERR_INVALID_ARG on incorrect modem type.
*/
esp_err_t phy_clear_used_time(esp_phy_modem_t modem);
#endif
#ifdef __cplusplus
}
#endif