Kconfig 9.2 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

B
bernard 已提交
7
config RT_USING_SERIAL
B
bernard 已提交
8
    bool "Using serial device drivers"
杭州_燕十三's avatar
杭州_燕十三 已提交
9
    select RT_USING_DEVICE_IPC
B
BernardXiong 已提交
10
    select RT_USING_DEVICE
B
bernard 已提交
11
    default y
B
bernard 已提交
12 13

config RT_USING_CAN
B
bernard 已提交
14 15
    bool "Using CAN device drivers"
    default n
B
bernard 已提交
16

17 18 19 20 21 22
if RT_USING_CAN
    config RT_CAN_USING_HDR
        bool "Enable CAN hardware filter"
        default y
endif

B
bernard 已提交
23
config RT_USING_HWTIMER
B
bernard 已提交
24 25
    bool "Using hardware timer device drivers"
    default n
B
bernard 已提交
26

B
Bernard Xiong 已提交
27 28 29 30 31 32
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 已提交
33 34
        const static struct rt_clock_cputime_ops _ops = {...};
        clock_cpu_setops(&_ops);
B
Bernard Xiong 已提交
35

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

B
BernardXiong 已提交
38 39 40 41 42 43
        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 已提交
44 45 46 47 48 49 50 51 52 53 54

if RT_USING_CPUTIME 
    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
            Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use 
            the cycle counter in DWT for CPU time.
endif

B
bernard 已提交
55
config RT_USING_I2C
B
bernard 已提交
56 57
    bool "Using I2C device drivers"
    default n
B
bernard 已提交
58

S
SummerGift 已提交
59 60
if RT_USING_I2C
    config RT_USING_I2C_BITOPS
B
bernard 已提交
61
        bool "Use GPIO to simulate I2C"
S
SummerGift 已提交
62 63
        default y
endif
B
bernard 已提交
64 65

config RT_USING_PIN
B
bernard 已提交
66 67
    bool "Using generic GPIO device drivers"
    default y
B
bernard 已提交
68 69

config RT_USING_MTD_NOR
B
bernard 已提交
70 71
    bool "Using MTD Nor Flash device drivers"
    default n
B
bernard 已提交
72 73

config RT_USING_MTD_NAND
B
bernard 已提交
74 75
    bool "Using MTD Nand Flash device drivers"
    default n
B
bernard 已提交
76 77 78 79 80 81

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

config RT_USING_RTC
B
bernard 已提交
84 85
    bool "Using RTC device drivers"
    default n
B
bernard 已提交
86

87 88 89 90 91 92
    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"
93
        select PKG_USING_NETUTILS
94 95 96 97 98 99 100 101 102 103 104 105 106
        select PKG_NETUTILS_NTP
        default n
        
        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 已提交
107
config RT_USING_SDIO
B
bernard 已提交
108 109
    bool "Using SD/MMC device drivers"
    default n
B
bernard 已提交
110 111

config RT_USING_SPI
B
bernard 已提交
112 113
    bool "Using SPI Bus/Device device drivers"
    default n
B
bernard 已提交
114

B
bernard 已提交
115
    if RT_USING_SPI
116 117 118 119 120
        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 已提交
121 122 123 124 125 126 127 128 129 130 131 132
        config RT_USING_SFUD
            bool "Using Serial Flash Universal Driver"
            default n
            if RT_USING_SFUD            
                config RT_SFUD_USING_SFDP
                bool "Using auto probe flash JEDEC SFDP parameter"
                default y
                
                config RT_SFUD_USING_FLASH_INFO_TABLE
                bool "Using defined supported flash chip information table"
                default y
                
133
                config RT_DEBUG_SFUD
armink_ztl's avatar
armink_ztl 已提交
134 135 136 137
                bool "Show more SFUD debug information"
                default n
            endif
    
B
bernard 已提交
138 139 140
        config RT_USING_W25QXX
            bool "Using W25QXX SPI NorFlash"
            default n
B
bernard 已提交
141

B
bernard 已提交
142 143 144
        config RT_USING_GD
            bool "Using GD SPI NorFlash"
            default n
B
bernard 已提交
145

B
bernard 已提交
146 147 148 149
        config RT_USING_ENC28J60
            bool "Using ENC28J60 SPI Ethernet network interface"
            select RT_USING_LWIP
            default n
B
bernard 已提交
150

B
bernard 已提交
151 152 153 154 155
        config RT_USING_SPI_WIFI
            bool "Using RW009/007 SPI Wi-Fi wireless interface"
            select RT_USING_LWIP
            default n
    endif
B
bernard 已提交
156 157

config RT_USING_WDT
B
bernard 已提交
158 159
    bool "Using Watch Dog device drivers"
    default n
B
bernard 已提交
160

B
bernard 已提交
161 162 163
config RT_USING_WIFI
    bool "Using Wi-Fi network"
    default n
B
bernard 已提交
164

165 166 167 168
menu "Using USB"
    config RT_USING_USB_HOST
        bool "Using USB host"
        default n
B
bernard 已提交
169

170
        if RT_USING_USB_HOST
171 172
            config RT_USBH_MSTORAGE
                bool "Enable Udisk Drivers"
173
                default n
174 175 176 177 178
                if RT_USBH_MSTORAGE
                    config UDISK_MOUNTPOINT
                    string "Udisk mount dir"
                    default "/"
                endif
179 180 181 182
        endif
    config RT_USING_USB_DEVICE
        bool "Using USB device"
        default n
B
bernard 已提交
183

184
        if RT_USING_USB_DEVICE
185
            config USB_VENDOR_ID
186 187
                hex "USB Vendor ID"
                default 0x0FFE
188
            config USB_PRODUCT_ID
189 190 191
                hex "USB Product ID"
                default 0x0001
            
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
            config RT_USB_DEVICE_COMPOSITE
                bool "Enable composite device"
                default n
                choice
                    prompt "Device type"
                    default _RT_USB_DEVICE_CDC
                    depends on !RT_USB_DEVICE_COMPOSITE
                    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 已提交
208 209 210 211
                    config _RT_USB_DEVICE_RNDIS
                        bool "Enable to use device as rndis device"
                        select RT_USB_DEVICE_RNDIS
                        depends on RT_USING_LWIP
212 213 214 215
                    config _RT_USB_DEVICE_ECM
                        bool "Enable to use device as ecm device"
                        select RT_USB_DEVICE_ECM
                        depends on RT_USING_LWIP
216 217 218
                    config _RT_USB_DEVICE_WINUSB
                        bool "Enable to use device as winusb device"
                        select RT_USB_DEVICE_WINUSB
219 220 221 222 223 224 225 226 227 228 229
                endchoice
                if RT_USB_DEVICE_COMPOSITE
                    config RT_USB_DEVICE_CDC
                        bool "Enable to use device as CDC device"
                        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 已提交
230 231 232 233
                    config RT_USB_DEVICE_RNDIS
                        bool "Enable to use device as rndis device"
                        default n
                        depends on RT_USING_LWIP
234 235 236 237
                    config RT_USB_DEVICE_ECM
                        bool "Enable to use device as ecm device"
                        default n
                        depends on RT_USING_LWIP
238 239 240
                    config RT_USB_DEVICE_WINUSB
                        bool "Enable to use device as winusb device"
                        default n
241
                endif
242 243 244 245 246
                if RT_USB_DEVICE_WINUSB
                    config RT_WINUSB_GUID
                    string "Guid for winusb"
                    default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
                endif
247 248 249 250 251
                if RT_USB_DEVICE_MSTORAGE
                    config RT_USB_MSTORAGE_DISK_NAME
                    string "msc class disk name"
                    default "flash0"
                endif
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
                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 已提交
285
endmenu