配置驱动
在 Luban-Lite 根目录下执行 scons --menuconfig,进入menuconfig的功能配置界面,按如下选择(配置只打开了HRTimer0,作为示例):
Board options --->
Using HRTIMER --->
[*] Using HRTimer0
[ ] Using HRTimer1
[ ] Using HRTimer21
2
3
4
5
2
3
4
5
当使用 RT-Thread 内核的时候,HRTimer 驱动需要依赖RT-Thread的 hwtimer 设备驱动框架,也是在menuconfig界面中打开:
Rt-Thread options --->
RT-Thread Components --->
Device Drivers --->
[*] Using hardware timer device drivers1
2
3
4
2
3
4
TIP
为了简化使用,Using HRTimerx 会自动打开 RT-Thread 的 hwtimer设备驱动框架。