refactor(hal): clean up some hal file dependency on sdkconfig.h

This commit is contained in:
morris
2025-07-16 18:05:06 +08:00
parent 0296c30908
commit ccd092d7dc
35 changed files with 108 additions and 149 deletions

View File

@@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "soc/clkout_channel.h"
#include "hal/assert.h"
#include "hal/config.h"
#include "hal/clk_tree_hal.h"
#include "hal/clk_tree_ll.h"
#include "hal/gpio_ll.h"
@@ -78,8 +78,8 @@ uint32_t clk_hal_xtal_get_freq_mhz(void)
{
uint32_t freq = clk_ll_xtal_load_freq_mhz();
if (freq == 0) {
HAL_LOGW(CLK_HAL_TAG, "invalid RTC_XTAL_FREQ_REG value, assume %dMHz", CONFIG_XTAL_FREQ);
return CONFIG_XTAL_FREQ;
HAL_LOGW(CLK_HAL_TAG, "invalid RTC_XTAL_FREQ_REG value, assume %dMHz", HAL_CONFIG_XTAL_HINT_FREQ_MHZ);
return HAL_CONFIG_XTAL_HINT_FREQ_MHZ;
}
return freq;
}