4.3.2. 参数配置

4.3.2.1. 驱动配置

在 ZX-RTT 根目录下执行 scons --menuconfig,进入menuconfig的功能配置界面,按如下选择(配置只打开了HRTimer0,作为示例):

Board options  --->
    [*] Using HRTimer0
    [ ] Using HRTimer1
    [ ] Using HRTimer2

当使用 RT-Thread 内核的时候,HRTimer 驱动需要依赖RT-Thread的 hwtimer 设备驱动框架,也是在menuconfig界面中打开:

Rt-Thread options  --->
    RT-Thread Components  --->
        Device Drivers  --->
            [*]  Using hardware timer device drivers

小技巧

为了简化使用,Using HRTimerx 会自动打开 RT-Thread 的 hwtimer设备驱动框架。