zhkag 0f85648cfb
Improve timer accuracy and realize (#6926)
* add cputimer frame

* add cputime sleep

* ctime use cputime

* Processing cputime has no timeout function

* Migration cputime Code

* formatting file

* 整理代码

* add document copyright information

* 改 cputime_timer 为 cputimer

* 简化 _cputimer_list 初始化

* rt_cputimer_create -> rt_cputimer_init

* Remove RT_USING_CPUTIME and code cleanup.

* Remove RT_USING_CPUTIME in cputimer.c
* Set set_next_timeout as static function.

---------

Co-authored-by: Bernard Xiong <bernard.xiong@gmail.com>
2023-02-15 20:46:22 +08:00

19 lines
388 B
Python

from building import *
cwd = GetCurrentDir()
CPPPATH = [cwd + '/../include']
src = Split('''
cputime.c
cputimer.c
''')
if GetDepend('RT_USING_CPUTIME_CORTEXM'):
src += ['cputime_cortexm.c']
if GetDepend('RT_USING_CPUTIME_RISCV'):
src += ['cputime_riscv.c']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_CPUTIME'], CPPPATH = CPPPATH)
Return('group')