clk_tree: added default clock source for peripheral

This commit is contained in:
morris
2022-04-13 13:12:30 +08:00
parent 11abb67e65
commit f32a89826c
61 changed files with 578 additions and 215 deletions

View File

@@ -22,6 +22,7 @@
#include "soc/soc.h"
#include "soc/soc_caps.h"
#include "hal/temperature_sensor_types.h"
#include "hal/assert.h"
#ifdef __cplusplus
extern "C" {
@@ -78,7 +79,6 @@ static inline void temperature_sensor_ll_clk_sel(temperature_sensor_clk_src_t cl
{
uint8_t clk_sel = 0;
switch (clk_src) {
case TEMPERATURE_SENSOR_CLK_SRC_DEFAULT:
case TEMPERATURE_SENSOR_CLK_SRC_XTAL:
clk_sel = 1;
break;
@@ -86,7 +86,7 @@ static inline void temperature_sensor_ll_clk_sel(temperature_sensor_clk_src_t cl
clk_sel = 0;
break;
default:
abort();
HAL_ASSERT(false);
break;
}
APB_SARADC.apb_tsens_ctrl2.tsens_clk_sel = clk_sel;