We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8ea6c6 commit a268140Copy full SHA for a268140
bsp/cvitek/drivers/drv_rtc.c
@@ -90,16 +90,21 @@ static int rtc_month_days(unsigned int month, unsigned int year)
90
91
static void hal_cvi_rtc_clk_set(int enable)
92
{
93
+#ifdef RT_USING_SMART
94
+ rt_ubase_t clk = (rt_ubase_t)DRV_IOREMAP((void *)CLK_EN_0,0x1000);
95
+#else
96
+ rt_ubase_t clk = CLK_EN_0;
97
+#endif
98
uint32_t clk_state;
99
- clk_state = mmio_read_32((long unsigned int)CLK_EN_0);
100
+ clk_state = mmio_read_32(clk);
101
102
if(enable)
103
clk_state |= CLK_RTC_25M_BIT;
104
else
105
clk_state &= ~(CLK_RTC_25M_BIT);
106
- mmio_write_32((long unsigned int)CLK_EN_0, clk_state);
107
+ mmio_write_32(clk, clk_state);
108
}
109
110
static void hal_cvi_rtc_enable_sec_counter(uintptr_t rtc_base)
0 commit comments