mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-18 11:53:05 +08:00
[DM][HWTIMER] Enable arm arch timer more API for cpuidle in the future
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
@@ -201,7 +201,7 @@ static timer_value_handle value_handle[] =
|
||||
os_vtimer_value,
|
||||
};
|
||||
|
||||
static rt_err_t arm_arch_timer_local_enable(void)
|
||||
rt_err_t arm_arch_timer_local_enable(void)
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
|
||||
@@ -222,8 +222,7 @@ static rt_err_t arm_arch_timer_local_enable(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
rt_used
|
||||
static rt_err_t arm_arch_timer_local_disable(void)
|
||||
rt_err_t arm_arch_timer_local_disable(void)
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
|
||||
@@ -240,8 +239,7 @@ static rt_err_t arm_arch_timer_local_disable(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
rt_used
|
||||
static rt_err_t arm_arch_timer_set_frequency(rt_uint64_t frq)
|
||||
rt_err_t arm_arch_timer_set_frequency(rt_uint64_t frq)
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
|
||||
@@ -256,8 +254,7 @@ static rt_err_t arm_arch_timer_set_frequency(rt_uint64_t frq)
|
||||
return ret;
|
||||
}
|
||||
|
||||
rt_used
|
||||
static rt_uint64_t arm_arch_timer_get_frequency(void)
|
||||
rt_uint64_t arm_arch_timer_get_frequency(void)
|
||||
{
|
||||
rt_uint64_t frq;
|
||||
|
||||
@@ -268,8 +265,7 @@ static rt_uint64_t arm_arch_timer_get_frequency(void)
|
||||
return frq;
|
||||
}
|
||||
|
||||
rt_used
|
||||
static rt_err_t arm_arch_timer_set_value(rt_uint64_t val)
|
||||
rt_err_t arm_arch_timer_set_value(rt_uint64_t val)
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
|
||||
@@ -285,8 +281,7 @@ static rt_err_t arm_arch_timer_set_value(rt_uint64_t val)
|
||||
return ret;
|
||||
}
|
||||
|
||||
rt_used
|
||||
static rt_uint64_t arm_arch_timer_get_value(void)
|
||||
rt_uint64_t arm_arch_timer_get_value(void)
|
||||
{
|
||||
rt_uint64_t val = 0;
|
||||
|
||||
@@ -298,6 +293,15 @@ static rt_uint64_t arm_arch_timer_get_value(void)
|
||||
return val;
|
||||
}
|
||||
|
||||
rt_uint64_t arm_arch_timer_get_count(void)
|
||||
{
|
||||
rt_uint64_t cntpct;
|
||||
|
||||
rt_hw_sysreg_read(CNTPCT, cntpct);
|
||||
|
||||
return cntpct;
|
||||
}
|
||||
|
||||
static void arm_arch_timer_isr(int vector, void *param)
|
||||
{
|
||||
arm_arch_timer_set_value(timer_step);
|
||||
|
||||
Reference in New Issue
Block a user