xref: /nrf52832-nimble/rt-thread/components/drivers/Kconfig (revision 104654410c56c573564690304ae786df310c91fc)
1menu "Device Drivers"
2
3config RT_USING_DEVICE_IPC
4    bool "Using device drivers IPC"
5    default y
6
7if RT_USING_DEVICE_IPC
8    config RT_PIPE_BUFSZ
9        int "Set pipe buffer size"
10        default 512
11endif
12
13config RT_USING_SERIAL
14    bool "Using serial device drivers"
15    select RT_USING_DEVICE_IPC
16    select RT_USING_DEVICE
17    default y
18
19if RT_USING_SERIAL
20    config RT_SERIAL_USING_DMA
21        bool "Enable serial DMA mode"
22        default y
23endif
24
25config RT_USING_CAN
26    bool "Using CAN device drivers"
27    default n
28
29if RT_USING_CAN
30    config RT_CAN_USING_HDR
31        bool "Enable CAN hardware filter"
32        default y
33endif
34
35config RT_USING_HWTIMER
36    bool "Using hardware timer device drivers"
37    default n
38
39config RT_USING_CPUTIME
40    bool "Enable CPU time for high resolution clock counter"
41    default n
42    help
43        When enable this option, the BSP should provide a rt_clock_cputime_ops
44        for CPU time by:
45        const static struct rt_clock_cputime_ops _ops = {...};
46        clock_cpu_setops(&_ops);
47
48        Then user can use high resolution clock counter with:
49
50        ts1 = clock_cpu_gettime();
51        ts2 = clock_cpu_gettime();
52
53        /* and get the ms of delta tick with API: */
54        ms_tick = clock_cpu_millisecond(t2 - t1);
55        us_tick = clock_cpu_microsecond(t2 - t1);
56
57if RT_USING_CPUTIME
58    config RT_USING_CPUTIME_CORTEXM
59        bool "Use DWT for CPU time"
60        default y
61        depends on ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
62        help
63            Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use
64            the cycle counter in DWT for CPU time.
65endif
66
67config RT_USING_I2C
68    bool "Using I2C device drivers"
69    default n
70
71if RT_USING_I2C
72    config RT_USING_I2C_BITOPS
73        bool "Use GPIO to simulate I2C"
74        default y
75endif
76
77config RT_USING_PIN
78    bool "Using generic GPIO device drivers"
79    default y
80
81config RT_USING_ADC
82    bool "Using ADC device drivers"
83    default n
84
85config RT_USING_PWM
86    bool "Using PWM device drivers"
87    default n
88
89config RT_USING_MTD_NOR
90    bool "Using MTD Nor Flash device drivers"
91    default n
92
93config RT_USING_MTD_NAND
94    bool "Using MTD Nand Flash device drivers"
95    default n
96
97    if RT_USING_MTD_NAND
98    config RT_MTD_NAND_DEBUG
99        bool "Enable MTD Nand operations debug information"
100        default n
101    endif
102
103config RT_USING_MTD
104    bool "Using Memory Technology Device (MTD)"
105    default n
106
107    if RT_USING_MTD
108    config MTD_USING_NOR
109        bool "Using MTD Nor Flash device"
110        default n
111
112    config MTD_USING_NAND
113        bool "Using MTD Nand Flash device"
114        default n
115    endif
116
117config RT_USING_PM
118    bool "Using Power Management device drivers"
119    default n
120
121config RT_USING_RTC
122    bool "Using RTC device drivers"
123    default n
124
125    if RT_USING_RTC
126    config RT_USING_SOFT_RTC
127        bool "Using software simulation RTC device"
128        default n
129    config RTC_SYNC_USING_NTP
130        bool "Using NTP auto sync RTC time"
131        depends on PKG_NETUTILS_NTP
132        default y
133
134        if RTC_SYNC_USING_NTP
135        config RTC_NTP_FIRST_SYNC_DELAY
136            int "NTP first sync delay time(second) for network connect"
137            default 30
138        config RTC_NTP_SYNC_PERIOD
139            int "NTP auto sync period(second)"
140            default 3600
141       endif
142    endif
143
144config RT_USING_SDIO
145    bool "Using SD/MMC device drivers"
146    default n
147
148    if RT_USING_SDIO
149        config RT_SDIO_STACK_SIZE
150            int "The stack size for sdio irq thread"
151            default 512
152
153        config RT_SDIO_THREAD_PRIORITY
154            int "The priority level value of sdio irq thread"
155            default 15
156
157        config RT_MMCSD_STACK_SIZE
158            int "The stack size for mmcsd thread"
159            default 1024
160
161        config RT_MMCSD_THREAD_PREORITY
162            int "The priority level value of mmcsd thread"
163            default 22
164
165        config RT_MMCSD_MAX_PARTITION
166            int "mmcsd max partition"
167            default 16
168        config RT_SDIO_DEBUG
169            bool "Enable SDIO debug log output"
170        default n
171    endif
172
173config RT_USING_SPI
174    bool "Using SPI Bus/Device device drivers"
175    default n
176
177    if RT_USING_SPI
178        config RT_USING_QSPI
179            bool "Enable QSPI mode"
180            default n
181
182        config RT_USING_SPI_MSD
183            bool "Using SD/TF card driver with spi"
184            select RT_USING_DFS
185            default n
186
187        config RT_USING_SFUD
188            bool "Using Serial Flash Universal Driver"
189            default n
190            if RT_USING_SFUD
191                config RT_SFUD_USING_SFDP
192                bool "Using auto probe flash JEDEC SFDP parameter"
193                default y
194
195                config RT_SFUD_USING_FLASH_INFO_TABLE
196                bool "Using defined supported flash chip information table"
197                default y
198
199                config RT_SFUD_USING_QSPI
200                bool "Using QSPI mode support"
201                select RT_USING_QSPI
202                default n
203
204                config RT_DEBUG_SFUD
205                bool "Show more SFUD debug information"
206                default n
207            endif
208
209        config RT_USING_W25QXX
210            bool "Using W25QXX SPI NorFlash"
211            default n
212
213        config RT_USING_GD
214            bool "Using GD SPI NorFlash"
215            default n
216
217        config RT_USING_ENC28J60
218            bool "Using ENC28J60 SPI Ethernet network interface"
219            select RT_USING_LWIP
220            default n
221
222        config RT_USING_SPI_WIFI
223            bool "Using RW009/007 SPI Wi-Fi wireless interface"
224            select RT_USING_LWIP
225            default n
226    endif
227
228config RT_USING_WDT
229    bool "Using Watch Dog device drivers"
230    default n
231
232config RT_USING_AUDIO
233    bool "Using Audio device drivers"
234    default n
235
236menu "Using WiFi"
237    config RT_USING_WIFI
238    bool "Using Wi-Fi framework"
239    default n
240
241    if RT_USING_WIFI
242        config RT_WLAN_DEVICE_STA_NAME
243            string "The WiFi device name for station"
244            default "wlan0"
245
246        config RT_WLAN_DEVICE_AP_NAME
247            string "The WiFi device name for ap"
248            default "wlan1"
249
250        config RT_WLAN_DEFAULT_PROT
251            string "Default transport protocol"
252            default "lwip"
253
254        config RT_WLAN_SCAN_WAIT_MS
255            int "Set scan timeout time(ms)"
256            default 10000
257
258        config RT_WLAN_CONNECT_WAIT_MS
259            int "Set connect timeout time(ms)"
260            default 10000
261
262        config RT_WLAN_SSID_MAX_LENGTH
263            int "SSID name maximum length"
264            default 32
265
266        config RT_WLAN_PASSWORD_MAX_LENGTH
267            int "Maximum password length"
268            default 32
269
270        config RT_WLAN_SCAN_SORT
271            bool "Automatic sorting of scan results"
272            default y
273
274        config RT_WLAN_CFG_INFO_MAX
275            int "Maximum number of WiFi information automatically saved"
276            default 3
277
278        config RT_WLAN_WORKQUEUE_THREAD_NAME
279            string "WiFi work queue thread name"
280            default "wlan_job"
281
282        config RT_WLAN_WORKQUEUE_THREAD_SIZE
283            int "wifi work queue thread size"
284            default 2048
285
286        config RT_WLAN_WORKQUEUE_THREAD_PRIO
287            int "WiFi work queue thread priority"
288            default 22
289
290        config RT_WLAN_DEV_EVENT_NUM
291            int "Maximum number of driver events"
292            default 2
293
294        config RT_WLAN_PROT_LWIP_PBUF_FORCE
295            bool "Forced use of PBUF transmission"
296            default n
297
298        menuconfig RT_WLAN_DEBUG
299            bool "Enable WLAN Debugging Options"
300            default n
301
302        if RT_WLAN_DEBUG
303            config RT_WLAN_CMD_DEBUG
304                bool "Enable Debugging of wlan_cmd.c"
305                default n
306
307            config RT_WLAN_MGNT_DEBUG
308                bool "Enable Debugging of wlan_mgnt.c"
309                default n
310
311            config RT_WLAN_DEV_DEBUG
312                bool "Enable Debugging of wlan_dev.c"
313                default n
314
315            config RT_WLAN_PROT_DEBUG
316                bool "Enable Debugging of wlan_prot.c"
317                default n
318
319            config RT_WLAN_CFG_DEBUG
320                bool "Enable Debugging of wlan_cfg.c"
321                default n
322
323            config RT_WLAN_LWIP_DEBUG
324                bool "Enable Debugging of wlan_lwip.c"
325                default n
326        endif
327    endif
328endmenu
329
330menu "Using USB"
331    config RT_USING_USB_HOST
332        bool "Using USB host"
333        default n
334
335        if RT_USING_USB_HOST
336            config RT_USBH_MSTORAGE
337                bool "Enable Udisk Drivers"
338                default n
339                if RT_USBH_MSTORAGE
340                    config UDISK_MOUNTPOINT
341                    string "Udisk mount dir"
342                    default "/"
343                endif
344        endif
345    config RT_USING_USB_DEVICE
346        bool "Using USB device"
347        default n
348        if RT_USING_USB_DEVICE || RT_USING_USB_HOST
349            config RT_USBD_THREAD_STACK_SZ
350                int "usb thread stack size"
351                default 4096
352        endif
353        if RT_USING_USB_DEVICE
354            config USB_VENDOR_ID
355                hex "USB Vendor ID"
356                default 0x0FFE
357            config USB_PRODUCT_ID
358                hex "USB Product ID"
359                default 0x0001
360
361            config RT_USB_DEVICE_COMPOSITE
362                bool "Enable composite device"
363                default n
364                choice
365                    prompt "Device type"
366                    default _RT_USB_DEVICE_NONE
367                    depends on !RT_USB_DEVICE_COMPOSITE
368                    config _RT_USB_DEVICE_NONE
369                        bool "Using custom class by register interface"
370                        select RT_USB_DEVICE_NONE
371                    config _RT_USB_DEVICE_CDC
372                        bool "Enable to use device as CDC device"
373                        select RT_USB_DEVICE_CDC
374                    config _RT_USB_DEVICE_MSTORAGE
375                        bool "Enable to use device as Mass Storage device"
376                        select RT_USB_DEVICE_MSTORAGE
377                    config _RT_USB_DEVICE_HID
378                        bool "Enable to use device as HID device"
379                        select RT_USB_DEVICE_HID
380                    config _RT_USB_DEVICE_RNDIS
381                        bool "Enable to use device as rndis device"
382                        select RT_USB_DEVICE_RNDIS
383                        depends on RT_USING_LWIP
384                    config _RT_USB_DEVICE_ECM
385                        bool "Enable to use device as ecm device"
386                        select RT_USB_DEVICE_ECM
387                        depends on RT_USING_LWIP
388                    config _RT_USB_DEVICE_WINUSB
389                        bool "Enable to use device as winusb device"
390                        select RT_USB_DEVICE_WINUSB
391                endchoice
392                if RT_USB_DEVICE_COMPOSITE
393                    config RT_USB_DEVICE_CDC
394                        bool "Enable to use device as CDC device"
395                        default n
396                    config RT_USB_DEVICE_NONE
397                        bool
398                        default y
399                    config RT_USB_DEVICE_MSTORAGE
400                        bool "Enable to use device as Mass Storage device"
401                        default n
402                    config RT_USB_DEVICE_HID
403                        bool "Enable to use device as HID device"
404                        default n
405                    config RT_USB_DEVICE_RNDIS
406                        bool "Enable to use device as rndis device"
407                        default n
408                        depends on RT_USING_LWIP
409                    config RT_USB_DEVICE_ECM
410                        bool "Enable to use device as ecm device"
411                        default n
412                        depends on RT_USING_LWIP
413                    config RT_USB_DEVICE_WINUSB
414                        bool "Enable to use device as winusb device"
415                        default n
416                endif
417                if RT_USB_DEVICE_CDC
418                    config RT_VCOM_TASK_STK_SIZE
419                        int "virtual com thread stack size"
420                        default 512
421                    config RT_VCOM_TX_USE_DMA
422                        bool "Enable to use dma for vcom tx"
423                        default n
424                    config RT_VCOM_SERNO
425                        string "serial number of virtual com"
426                        default "32021919830108"
427                    config RT_VCOM_SER_LEN
428                        int "serial number length of virtual com"
429                        default 14
430                    config RT_VCOM_TX_TIMEOUT
431                        int "tx timeout(ticks) of virtual com"
432                        default 1000
433                endif
434                if RT_USB_DEVICE_WINUSB
435                    config RT_WINUSB_GUID
436                    string "Guid for winusb"
437                    default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
438                endif
439                if RT_USB_DEVICE_MSTORAGE
440                    config RT_USB_MSTORAGE_DISK_NAME
441                    string "msc class disk name"
442                    default "flash0"
443                endif
444                if RT_USB_DEVICE_HID
445                    config RT_USB_DEVICE_HID_KEYBOARD
446                        bool "Use to HID device as Keyboard"
447                        default n
448                    if RT_USB_DEVICE_HID_KEYBOARD
449                        config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
450                        int "Number of Keyboard(max 3)"
451                        default 1
452                        range 1 3
453                    endif
454                    config RT_USB_DEVICE_HID_MOUSE
455                        bool "Use to HID device as Mouse"
456                        default n
457                    config RT_USB_DEVICE_HID_GENERAL
458                        bool "Use to HID device as General HID device"
459                        default y
460                        if RT_USB_DEVICE_HID_GENERAL
461                            config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
462                                int "General HID device out report length"
463                                default 63
464                                range 0 63
465
466                            config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
467                                int "General HID device in report length"
468                                default 63
469                                range 0 63
470                        endif
471                    config RT_USB_DEVICE_HID_MEDIA
472                        bool "Use to HID device as media keyboard"
473                        default y
474                endif
475        endif
476    endmenu
477endmenu
478