Skip to content

✨ feat(components/drivers/): delete cputime #8119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions components/drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -77,41 +77,6 @@ config RT_USING_HWTIMER
bool "Using hardware timer device drivers"
default n

config RT_USING_CPUTIME
bool "Enable CPU time for high resolution clock counter"
default n
help
When enable this option, the BSP should provide a rt_clock_cputime_ops
for CPU time by:
const static struct rt_clock_cputime_ops _ops = {...};
clock_cpu_setops(&_ops);

Then user can use high resolution clock counter with:

ts1 = clock_cpu_gettime();
ts2 = clock_cpu_gettime();

/* and get the ms of delta tick with API: */
ms_tick = clock_cpu_millisecond(t2 - t1);
us_tick = clock_cpu_microsecond(t2 - t1);

if RT_USING_CPUTIME
config RT_USING_CPUTIME_CORTEXM
bool "Support Cortex-M CPU"
default y
depends on ARCH_ARM_CORTEX_M0 || ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
select PKG_USING_PERF_COUNTER
config RT_USING_CPUTIME_RISCV
bool "Use rdtime instructions for CPU time"
default y
depends on ARCH_RISCV64
help
Some RISCV64 MCU Use rdtime instructions read CPU time.
config CPUTIME_TIMER_FREQ
int "CPUTIME timer freq"
default 0
endif

config RT_USING_I2C
bool "Using I2C device drivers"
default n
Expand Down
18 changes: 0 additions & 18 deletions components/drivers/cputime/SConscript

This file was deleted.

116 changes: 0 additions & 116 deletions components/drivers/cputime/cputime.c

This file was deleted.

69 changes: 0 additions & 69 deletions components/drivers/cputime/cputime_cortexm.c

This file was deleted.

37 changes: 0 additions & 37 deletions components/drivers/cputime/cputime_riscv.c

This file was deleted.

Loading