Kconfig 14.3 KB
Newer Older
B
bernard 已提交
1 2
menu "Device Drivers"

B
bernard 已提交
3 4 5 6
config RT_USING_DEVICE_IPC
    bool "Using device drivers IPC"
    default y

7 8 9 10 11 12
if RT_USING_DEVICE_IPC
    config RT_PIPE_BUFSZ
        int "Set pipe buffer size"
        default 512
endif

B
bernard 已提交
13
config RT_USING_SERIAL
B
bernard 已提交
14
    bool "Using serial device drivers"
杭州_燕十三's avatar
杭州_燕十三 已提交
15
    select RT_USING_DEVICE_IPC
B
BernardXiong 已提交
16
    select RT_USING_DEVICE
B
bernard 已提交
17
    default y
B
bernard 已提交
18 19

config RT_USING_CAN
B
bernard 已提交
20 21
    bool "Using CAN device drivers"
    default n
B
bernard 已提交
22

23 24 25 26 27 28
if RT_USING_CAN
    config RT_CAN_USING_HDR
        bool "Enable CAN hardware filter"
        default y
endif

B
bernard 已提交
29
config RT_USING_HWTIMER
B
bernard 已提交
30 31
    bool "Using hardware timer device drivers"
    default n
B
bernard 已提交
32

B
Bernard Xiong 已提交
33 34 35 36 37 38
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:
B
BernardXiong 已提交
39 40
        const static struct rt_clock_cputime_ops _ops = {...};
        clock_cpu_setops(&_ops);
B
Bernard Xiong 已提交
41

B
BernardXiong 已提交
42
        Then user can use high resolution clock counter with:
B
Bernard Xiong 已提交
43

B
BernardXiong 已提交
44 45 46 47 48 49
        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);
B
Bernard Xiong 已提交
50

L
liang yongxiang 已提交
51
if RT_USING_CPUTIME
B
Bernard Xiong 已提交
52 53 54 55 56
    config RT_USING_CPUTIME_CORTEXM
        bool "Use DWT for CPU time"
        default y
        depends on ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
        help
L
liang yongxiang 已提交
57
            Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use
B
Bernard Xiong 已提交
58 59 60
            the cycle counter in DWT for CPU time.
endif

B
bernard 已提交
61
config RT_USING_I2C
B
bernard 已提交
62 63
    bool "Using I2C device drivers"
    default n
B
bernard 已提交
64

S
SummerGift 已提交
65 66
if RT_USING_I2C
    config RT_USING_I2C_BITOPS
B
bernard 已提交
67
        bool "Use GPIO to simulate I2C"
S
SummerGift 已提交
68 69
        default y
endif
B
bernard 已提交
70 71

config RT_USING_PIN
B
bernard 已提交
72 73
    bool "Using generic GPIO device drivers"
    default y
B
bernard 已提交
74

C
chenchaoqun@rt-thread.com 已提交
75 76 77 78
config RT_USING_ADC
    bool "Using ADC device drivers"
    default n

79 80 81 82
config RT_USING_PWM
    bool "Using PWM device drivers"
    default n

B
bernard 已提交
83
config RT_USING_MTD_NOR
B
bernard 已提交
84 85
    bool "Using MTD Nor Flash device drivers"
    default n
B
bernard 已提交
86 87

config RT_USING_MTD_NAND
B
bernard 已提交
88 89
    bool "Using MTD Nand Flash device drivers"
    default n
B
bernard 已提交
90 91 92 93 94 95

    if RT_USING_MTD_NAND
    config RT_MTD_NAND_DEBUG
        bool "Enable MTD Nand operations debug information"
        default n
    endif
B
bernard 已提交
96

H
heyuanjie87 已提交
97 98 99 100 101 102 103 104 105 106 107 108 109 110
config RT_USING_MTD
    bool "Using Memory Technology Device (MTD)"
    default n

    if RT_USING_MTD
    config MTD_USING_NOR
        bool "Using MTD Nor Flash device"
        default n

    config MTD_USING_NAND
        bool "Using MTD Nand Flash device"
        default n
    endif

111 112 113 114
config RT_USING_PM
    bool "Using Power Management device drivers"
    default n

B
bernard 已提交
115
config RT_USING_RTC
B
bernard 已提交
116 117
    bool "Using RTC device drivers"
    default n
B
bernard 已提交
118

119 120 121 122 123 124
    if RT_USING_RTC
    config RT_USING_SOFT_RTC
        bool "Using software simulation RTC device"
        default n
    config RTC_SYNC_USING_NTP
        bool "Using NTP auto sync RTC time"
125 126
        depends on PKG_NETUTILS_NTP
        default y
L
liang yongxiang 已提交
127

128 129 130 131 132 133 134 135 136 137
        if RTC_SYNC_USING_NTP
        config RTC_NTP_FIRST_SYNC_DELAY
            int "NTP first sync delay time(second) for network connect"
            default 30
        config RTC_NTP_SYNC_PERIOD
            int "NTP auto sync period(second)"
            default 3600
       endif
    endif

B
bernard 已提交
138
config RT_USING_SDIO
B
bernard 已提交
139 140
    bool "Using SD/MMC device drivers"
    default n
B
bernard 已提交
141

142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
    if RT_USING_SDIO
        config RT_SDIO_STACK_SIZE
            int "The stack size for sdio irq thread"
            default 512

        config RT_SDIO_THREAD_PRIORITY
            int "The priority level value of sdio irq thread"
            default 15

        config RT_MMCSD_STACK_SIZE
            int "The stack size for mmcsd thread"
            default 1024

        config RT_MMCSD_THREAD_PREORITY
            int "The priority level value of mmcsd thread"
            default 22

        config RT_MMCSD_MAX_PARTITION
            int "mmcsd max partition"
            default 16
162 163 164
        config RT_SDIO_DEBUG
            bool "Enable SDIO debug log output"
        default n
165 166
    endif

B
bernard 已提交
167
config RT_USING_SPI
B
bernard 已提交
168 169
    bool "Using SPI Bus/Device device drivers"
    default n
B
bernard 已提交
170

B
bernard 已提交
171
    if RT_USING_SPI
172 173 174 175 176
        config RT_USING_SPI_MSD
            bool "Using SD/TF card driver with spi"
            select RT_USING_DFS
            default n

armink_ztl's avatar
armink_ztl 已提交
177 178 179
        config RT_USING_SFUD
            bool "Using Serial Flash Universal Driver"
            default n
L
liang yongxiang 已提交
180
            if RT_USING_SFUD
armink_ztl's avatar
armink_ztl 已提交
181 182 183
                config RT_SFUD_USING_SFDP
                bool "Using auto probe flash JEDEC SFDP parameter"
                default y
L
liang yongxiang 已提交
184

armink_ztl's avatar
armink_ztl 已提交
185 186 187
                config RT_SFUD_USING_FLASH_INFO_TABLE
                bool "Using defined supported flash chip information table"
                default y
188 189 190 191
                
                config RT_SFUD_USING_QSPI
                bool "Using QSPI mode support"
                default n
L
liang yongxiang 已提交
192

193
                config RT_DEBUG_SFUD
armink_ztl's avatar
armink_ztl 已提交
194 195 196
                bool "Show more SFUD debug information"
                default n
            endif
L
liang yongxiang 已提交
197

B
bernard 已提交
198 199 200
        config RT_USING_W25QXX
            bool "Using W25QXX SPI NorFlash"
            default n
B
bernard 已提交
201

B
bernard 已提交
202 203 204
        config RT_USING_GD
            bool "Using GD SPI NorFlash"
            default n
B
bernard 已提交
205

B
bernard 已提交
206 207 208 209
        config RT_USING_ENC28J60
            bool "Using ENC28J60 SPI Ethernet network interface"
            select RT_USING_LWIP
            default n
B
bernard 已提交
210

B
bernard 已提交
211 212 213 214 215
        config RT_USING_SPI_WIFI
            bool "Using RW009/007 SPI Wi-Fi wireless interface"
            select RT_USING_LWIP
            default n
    endif
B
bernard 已提交
216 217

config RT_USING_WDT
B
bernard 已提交
218 219
    bool "Using Watch Dog device drivers"
    default n
B
bernard 已提交
220

221 222 223 224 225 226 227
config RT_USING_AUDIO
    bool "Using Audio device drivers"
    default n

menu "Using WiFi"
    config RT_USING_WIFI
    bool "Using Wi-Fi framework"
B
bernard 已提交
228
    default n
B
bernard 已提交
229

230
    if RT_USING_WIFI
231
        config RT_WLAN_DEVICE_STA_NAME
232
            string "The WiFi device name for station"
233 234 235
            default "wlan0"

        config RT_WLAN_DEVICE_AP_NAME
236
            string "The WiFi device name for ap"
237 238 239 240 241 242 243
            default "wlan1"

        config RT_WLAN_DEFAULT_PROT
            string "Default transport protocol"
            default "lwip"

        config RT_WLAN_SCAN_WAIT_MS
244
            int "Set scan timeout time(ms)"
W
weety 已提交
245
            default 10000
246 247

        config RT_WLAN_CONNECT_WAIT_MS
248
            int "Set connect timeout time(ms)"
W
weety 已提交
249
            default 10000
250 251 252 253 254 255 256 257 258 259 260

        config RT_WLAN_SSID_MAX_LENGTH
            int "SSID name maximum length"
            default 32

        config RT_WLAN_PASSWORD_MAX_LENGTH
            int "Maximum password length"
            default 32

        config RT_WLAN_SCAN_SORT
            bool "Automatic sorting of scan results"
261
            default y
262

263 264 265
        config RT_WLAN_CFG_INFO_MAX
            int "Maximum number of WiFi information automatically saved"
            default 3
266

267 268 269
        config RT_WLAN_WORKQUEUE_THREAD_NAME
            string "WiFi work queue thread name"
            default "wlan_job"
270

271 272 273
        config RT_WLAN_WORKQUEUE_THREAD_SIZE
            int "wifi work queue thread size"
            default 2048
274

275 276 277 278 279 280 281 282 283 284 285
        config RT_WLAN_WORKQUEUE_THREAD_PRIO
            int "WiFi work queue thread priority"
            default 22

        config RT_WLAN_DEV_EVENT_NUM
            int "Maximum number of driver events"
            default 2

        config RT_WLAN_PROT_LWIP_PBUF_FORCE
            bool "Forced use of PBUF transmission"
            default n
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315

        menuconfig RT_WLAN_DEBUG
            bool "Enable WLAN Debugging Options"
            default n

        if RT_WLAN_DEBUG
            config RT_WLAN_CMD_DEBUG
                bool "Enable Debugging of wlan_cmd.c"
                default n

            config RT_WLAN_MGNT_DEBUG
                bool "Enable Debugging of wlan_mgnt.c"
                default n

            config RT_WLAN_DEV_DEBUG
                bool "Enable Debugging of wlan_dev.c"
                default n

            config RT_WLAN_PROT_DEBUG
                bool "Enable Debugging of wlan_prot.c"
                default n

            config RT_WLAN_CFG_DEBUG
                bool "Enable Debugging of wlan_cfg.c"
                default n

            config RT_WLAN_LWIP_DEBUG
                bool "Enable Debugging of wlan_lwip.c"
                default n
        endif
316 317
    endif
endmenu
318

319 320 321 322
menu "Using USB"
    config RT_USING_USB_HOST
        bool "Using USB host"
        default n
B
bernard 已提交
323

324
        if RT_USING_USB_HOST
325 326
            config RT_USBH_MSTORAGE
                bool "Enable Udisk Drivers"
327
                default n
328 329 330 331 332
                if RT_USBH_MSTORAGE
                    config UDISK_MOUNTPOINT
                    string "Udisk mount dir"
                    default "/"
                endif
333 334 335 336
        endif
    config RT_USING_USB_DEVICE
        bool "Using USB device"
        default n
lymzzyh's avatar
lymzzyh 已提交
337 338 339 340 341
        if RT_USING_USB_DEVICE || RT_USING_USB_HOST
            config RT_USBD_THREAD_STACK_SZ
                int "usb thread stack size"
                default 4096
        endif
342
        if RT_USING_USB_DEVICE
343
            config USB_VENDOR_ID
344 345
                hex "USB Vendor ID"
                default 0x0FFE
346
            config USB_PRODUCT_ID
347 348
                hex "USB Product ID"
                default 0x0001
L
liang yongxiang 已提交
349

350 351 352 353 354
            config RT_USB_DEVICE_COMPOSITE
                bool "Enable composite device"
                default n
                choice
                    prompt "Device type"
355
                    default _RT_USB_DEVICE_NONE
356
                    depends on !RT_USB_DEVICE_COMPOSITE
357 358 359
                    config _RT_USB_DEVICE_NONE
                        bool "Using custom class by register interface"
                        select RT_USB_DEVICE_NONE
360 361 362 363 364 365 366 367 368
                    config _RT_USB_DEVICE_CDC
                        bool "Enable to use device as CDC device"
                        select RT_USB_DEVICE_CDC
                    config _RT_USB_DEVICE_MSTORAGE
                        bool "Enable to use device as Mass Storage device"
                        select RT_USB_DEVICE_MSTORAGE
                    config _RT_USB_DEVICE_HID
                        bool "Enable to use device as HID device"
                        select RT_USB_DEVICE_HID
lymzzyh's avatar
lymzzyh 已提交
369 370 371 372
                    config _RT_USB_DEVICE_RNDIS
                        bool "Enable to use device as rndis device"
                        select RT_USB_DEVICE_RNDIS
                        depends on RT_USING_LWIP
373 374 375 376
                    config _RT_USB_DEVICE_ECM
                        bool "Enable to use device as ecm device"
                        select RT_USB_DEVICE_ECM
                        depends on RT_USING_LWIP
377 378 379
                    config _RT_USB_DEVICE_WINUSB
                        bool "Enable to use device as winusb device"
                        select RT_USB_DEVICE_WINUSB
380 381 382 383
                endchoice
                if RT_USB_DEVICE_COMPOSITE
                    config RT_USB_DEVICE_CDC
                        bool "Enable to use device as CDC device"
384 385
                        default n
                    config RT_USB_DEVICE_NONE
386
                        bool
387 388 389 390 391 392 393
                        default y
                    config RT_USB_DEVICE_MSTORAGE
                        bool "Enable to use device as Mass Storage device"
                        default n
                    config RT_USB_DEVICE_HID
                        bool "Enable to use device as HID device"
                        default n
lymzzyh's avatar
lymzzyh 已提交
394 395 396 397
                    config RT_USB_DEVICE_RNDIS
                        bool "Enable to use device as rndis device"
                        default n
                        depends on RT_USING_LWIP
398 399 400 401
                    config RT_USB_DEVICE_ECM
                        bool "Enable to use device as ecm device"
                        default n
                        depends on RT_USING_LWIP
402 403 404
                    config RT_USB_DEVICE_WINUSB
                        bool "Enable to use device as winusb device"
                        default n
405
                endif
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
                if RT_USB_DEVICE_CDC
                    config RT_VCOM_TASK_STK_SIZE
                        int "virtual com thread stack size"
                        default 512
                    config RT_VCOM_TX_USE_DMA
                        bool "Enable to use dma for vcom tx"
                        default n
                    config RT_VCOM_SERNO
                        string "serial number of virtual com"
                        default "32021919830108"
                    config RT_VCOM_SER_LEN
                        int "serial number length of virtual com"
                        default 14
                    config RT_VCOM_TX_TIMEOUT
                        int "tx timeout(ticks) of virtual com"
                        default 1000
                endif
423 424 425 426 427
                if RT_USB_DEVICE_WINUSB
                    config RT_WINUSB_GUID
                    string "Guid for winusb"
                    default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
                endif
428 429 430 431 432
                if RT_USB_DEVICE_MSTORAGE
                    config RT_USB_MSTORAGE_DISK_NAME
                    string "msc class disk name"
                    default "flash0"
                endif
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
                if RT_USB_DEVICE_HID
                    config RT_USB_DEVICE_HID_KEYBOARD
                        bool "Use to HID device as Keyboard"
                        default n
                    if RT_USB_DEVICE_HID_KEYBOARD
                        config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
                        int "Number of Keyboard(max 3)"
                        default 1
                        range 1 3
                    endif
                    config RT_USB_DEVICE_HID_MOUSE
                        bool "Use to HID device as Mouse"
                        default n
                    config RT_USB_DEVICE_HID_GENERAL
                        bool "Use to HID device as General HID device"
                        default y
                        if RT_USB_DEVICE_HID_GENERAL
                            config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
                                int "General HID device out report length"
                                default 63
                                range 0 63

                            config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
                                int "General HID device in report length"
                                default 63
                                range 0 63
                        endif
                    config RT_USB_DEVICE_HID_MEDIA
                        bool "Use to HID device as media keyboard"
                        default y
                endif
        endif
    endmenu
B
bernard 已提交
466
endmenu