mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-30 13:56:36 +00:00
feat(phy): add esp32c5 beta3 phy support
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
*/
|
||||
|
||||
static bool s_wifi_adc_xpd_flag;
|
||||
#if CONFIG_SOC_TEMP_SENSOR_SUPPORTED // TODO: [ESP32C5] IDF-8727 remove me when fix IDF-8727
|
||||
static bool s_wifi_pwdet_xpd_flag;
|
||||
static bool s_wifi_tsens_xpd_flag;
|
||||
#endif
|
||||
|
||||
void include_esp_phy_override(void)
|
||||
{
|
||||
@@ -57,6 +59,7 @@ IRAM_ATTR void phy_i2c_exit_critical(void)
|
||||
|
||||
void phy_set_pwdet_power(bool en)
|
||||
{
|
||||
#if CONFIG_SOC_TEMP_SENSOR_SUPPORTED // TODO: [ESP32C5] IDF-8727 remove me when fix IDF-8727
|
||||
if (s_wifi_pwdet_xpd_flag == en) {
|
||||
/* ignore repeated calls to phy_set_pwdet_power when the state is already correct */
|
||||
return;
|
||||
@@ -68,10 +71,12 @@ void phy_set_pwdet_power(bool en)
|
||||
} else {
|
||||
sar_periph_ctrl_pwdet_power_release();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void phy_set_tsens_power(bool en)
|
||||
{
|
||||
#if CONFIG_SOC_TEMP_SENSOR_SUPPORTED // TODO: [ESP32C5] IDF-8727 remove me when fix IDF-8727
|
||||
if (s_wifi_tsens_xpd_flag == en) {
|
||||
/* ignore repeated calls to phy_set_tsens_power when the state is already correct */
|
||||
return;
|
||||
@@ -83,9 +88,14 @@ void phy_set_tsens_power(bool en)
|
||||
} else {
|
||||
temperature_sensor_power_release();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int16_t phy_get_tsens_value(void)
|
||||
{
|
||||
#if CONFIG_SOC_TEMP_SENSOR_SUPPORTED // TODO: [ESP32C5] IDF-8727 remove me when fix IDF-8727
|
||||
return temp_sensor_get_raw_value(NULL);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user