feat(phy): support to query phy used time

This commit is contained in:
liuning
2024-02-28 11:54:23 +08:00
parent 11608b18b5
commit f7e29d28be
4 changed files with 144 additions and 2 deletions

View File

@@ -33,6 +33,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;
/**
@@ -281,6 +282,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