4.4.2. 参数配置

4.4.2.1. 驱动配置

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

Board options  --->
    [*] Using GPTIMER0
    [ ] Using GPTIMER1
    [ ] Using GPTIMER2
    [ ] Using GPTIMER3
    [ ] Using GPTIMER4
    [ ] Using GPTIMER5
    [ ] Using GPTIMER6
    [ ] Using GPTIMER7
    [ ] Using GPTIMER8
    [ ] Using GPTIMER9

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

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

小技巧

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