Kconfig 20 KB

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