Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. menu "Hardware Drivers Config"
  2. config SOC_RP2040
  3. bool
  4. select SOC_SERIES_RP2040_PICO
  5. select RT_USING_COMPONENTS_INIT
  6. default y
  7. menu "Onboard Peripheral Drivers"
  8. config BSP_USING_LVGL
  9. bool "Enable LVGL for LCD"
  10. select PKG_USING_LVGL
  11. select BSP_USING_SPI_LCD
  12. default n
  13. if BSP_USING_LVGL
  14. config BSP_USING_LVGL_DEMO
  15. bool "Enable LVGL demo"
  16. select PKG_USING_LV_MUSIC_DEMO
  17. default y
  18. endif
  19. endmenu
  20. menu "On-chip Peripheral Drivers"
  21. config BSP_USING_PIN
  22. bool "Enable GPIO"
  23. select RT_USING_PIN
  24. default y
  25. menuconfig BSP_USING_UART
  26. bool "Enable UART"
  27. select RT_USING_SERIAL
  28. default y
  29. if BSP_USING_UART
  30. config BSP_USING_UART0
  31. bool "Enable UART0"
  32. default y
  33. if BSP_USING_UART0
  34. choice
  35. prompt "uart0 tx pin number (GP)"
  36. depends on BSP_USING_UART0
  37. default BSP_UART0_TX_PIN_0
  38. config BSP_UART0_TX_PIN_0
  39. bool "0"
  40. config BSP_UART0_TX_PIN_12
  41. bool "12"
  42. config BSP_UART0_TX_PIN_16
  43. bool "16"
  44. endchoice
  45. config BSP_UART0_TX_PIN
  46. int
  47. default 0 if BSP_UART0_TX_PIN_0
  48. default 12 if BSP_UART0_TX_PIN_12
  49. default 16 if BSP_UART0_TX_PIN_16
  50. choice
  51. prompt "uart0 rx pin number (GP)"
  52. depends on BSP_USING_UART0
  53. default BSP_UART0_RX_PIN_1
  54. config BSP_UART0_RX_PIN_1
  55. bool "1"
  56. config BSP_UART0_RX_PIN_13
  57. bool "13"
  58. config BSP_UART0_RX_PIN_17
  59. bool "17"
  60. endchoice
  61. config BSP_UART0_RX_PIN
  62. int
  63. default 1 if BSP_UART0_RX_PIN_1
  64. default 13 if BSP_UART0_RX_PIN_13
  65. default 17 if BSP_UART0_RX_PIN_17
  66. endif
  67. config BSP_USING_UART1
  68. bool "Enable UART1"
  69. default n
  70. if BSP_USING_UART1
  71. choice
  72. prompt "uart1 tx pin number (GP)"
  73. depends on BSP_USING_UART1
  74. default BSP_UART1_TX_PIN_4
  75. config BSP_UART1_TX_PIN_4
  76. bool "4"
  77. config BSP_UART1_TX_PIN_8
  78. bool "8"
  79. endchoice
  80. config BSP_UART1_TX_PIN
  81. int
  82. default 4 if BSP_UART1_TX_PIN_4
  83. default 8 if BSP_UART1_TX_PIN_8
  84. choice
  85. prompt "uart1 rx pin number (GP)"
  86. depends on BSP_USING_UART1
  87. default BSP_UART1_RX_PIN_5
  88. config BSP_UART1_RX_PIN_5
  89. bool "5"
  90. config BSP_UART1_RX_PIN_9
  91. bool "9"
  92. endchoice
  93. config BSP_UART1_RX_PIN
  94. int
  95. default 5 if BSP_UART1_RX_PIN_5
  96. default 9 if BSP_UART1_RX_PIN_9
  97. endif
  98. endif
  99. menuconfig BSP_USING_SOFT_I2C
  100. bool "Enable I2C BUS (software simulation)"
  101. default n
  102. select RT_USING_I2C
  103. select RT_USING_I2C_BITOPS
  104. select RT_USING_PIN
  105. if BSP_USING_SOFT_I2C
  106. config BSP_USING_SOFT_I2C1
  107. bool "Enable I2C1 Bus (software simulation)"
  108. default n
  109. if BSP_USING_SOFT_I2C1
  110. config BSP_SOFT_I2C1_SCL_PIN
  111. int "i2c1 scl pin number (GP)"
  112. range 0 28
  113. default 2
  114. config BSP_SOFT_I2C1_SDA_PIN
  115. int "I2C1 sda pin number (GP)"
  116. range 0 28
  117. default 3
  118. endif
  119. endif
  120. menuconfig BSP_USING_SOFT_SPI
  121. bool "Enable soft SPI BUS"
  122. default n
  123. select RT_USING_PIN
  124. select RT_USING_SPI_BITOPS
  125. select RT_USING_SPI
  126. if BSP_USING_SOFT_SPI
  127. config BSP_USING_SOFT_SPI0
  128. bool "Enable SPI0 Bus (software simulation)"
  129. default n
  130. if BSP_USING_SOFT_SPI0
  131. config BSP_S_SPI0_SCK_PIN
  132. int "spi0 sck pin number (GP)"
  133. range 0 28
  134. default 6
  135. config BSP_S_SPI0_MOSI_PIN
  136. int "spi0 mosi pin number (GP)"
  137. range 0 28
  138. default 7
  139. config BSP_S_SPI0_MISO_PIN
  140. int "spi0 miso pin number (GP)"
  141. range 0 28
  142. default 4
  143. endif
  144. config BSP_USING_SOFT_SPI1
  145. bool "Enable SPI1 Bus (software simulation)"
  146. default n
  147. if BSP_USING_SOFT_SPI1
  148. config BSP_S_SPI1_SCK_PIN
  149. int "spi1 sck pin number (GP)"
  150. range 0 28
  151. default 10
  152. config BSP_S_SPI1_MOSI_PIN
  153. int "spi1 mosi pin number (GP)"
  154. range 0 28
  155. default 11
  156. config BSP_S_SPI1_MISO_PIN
  157. int "spi1 miso pin number (GP)"
  158. range 0 28
  159. default 12
  160. endif
  161. endif
  162. menuconfig BSP_USING_ADC
  163. bool "Enable ADC"
  164. default n
  165. select RT_USING_ADC
  166. if BSP_USING_ADC
  167. config BSP_USING_ADC0
  168. bool "Enable ADC0 (GP26)"
  169. default n
  170. config BSP_USING_ADC1
  171. bool "Enable ADC1 (GP27)"
  172. default n
  173. config BSP_USING_ADC2
  174. bool "Enable ADC2 (GP28)"
  175. default n
  176. endif
  177. config BSP_USING_WDT
  178. bool "Enable WDT"
  179. select RT_USING_WDT
  180. default n
  181. menuconfig BSP_USING_SPI
  182. bool "Enable SPI"
  183. select RT_USING_SPI
  184. default n
  185. if BSP_USING_SPI
  186. config BSP_USING_SPI0
  187. bool "Enable SPI0"
  188. default n
  189. config BSP_USING_SPI1
  190. bool "Enable SPI1"
  191. default n
  192. endif
  193. menuconfig BSP_USING_I2C
  194. bool "Enable I2C"
  195. select RT_USING_I2C
  196. select RT_USING_I2C_BITOPS
  197. select RT_USING_PIN
  198. default n
  199. if BSP_USING_I2C
  200. config BSP_USING_I2C0
  201. bool "Enable I2C0"
  202. default n
  203. if BSP_USING_I2C0
  204. choice
  205. prompt "i2c0 scl pin number (GP)"
  206. depends on BSP_USING_I2C0
  207. default BSP_I2C0_SCL_PIN_21
  208. config BSP_I2C0_SCL_PIN_1
  209. bool "1"
  210. config BSP_I2C0_SCL_PIN_5
  211. bool "5"
  212. config BSP_I2C0_SCL_PIN_9
  213. bool "9"
  214. config BSP_I2C0_SCL_PIN_13
  215. bool "13"
  216. config BSP_I2C0_SCL_PIN_17
  217. bool "17"
  218. config BSP_I2C0_SCL_PIN_21
  219. bool "21"
  220. endchoice
  221. config BSP_I2C0_SCL_PIN
  222. int
  223. default 1 if BSP_I2C0_SCL_PIN_1
  224. default 5 if BSP_I2C0_SCL_PIN_5
  225. default 9 if BSP_I2C0_SCL_PIN_9
  226. default 13 if BSP_I2C0_SCL_PIN_13
  227. default 17 if BSP_I2C0_SCL_PIN_17
  228. default 21 if BSP_I2C0_SCL_PIN_21
  229. choice
  230. prompt "i2c0 sda pin number (GP)"
  231. depends on BSP_USING_I2C0
  232. default BSP_I2C0_SDA_PIN_20
  233. config BSP_I2C0_SDA_PIN_0
  234. bool "0"
  235. config BSP_I2C0_SDA_PIN_4
  236. bool "4"
  237. config BSP_I2C0_SDA_PIN_8
  238. bool "8"
  239. config BSP_I2C0_SDA_PIN_12
  240. bool "12"
  241. config BSP_I2C0_SDA_PIN_16
  242. bool "16"
  243. config BSP_I2C0_SDA_PIN_20
  244. bool "20"
  245. endchoice
  246. config BSP_I2C0_SDA_PIN
  247. int
  248. default 0 if BSP_I2C0_SDA_PIN_0
  249. default 4 if BSP_I2C0_SDA_PIN_4
  250. default 8 if BSP_I2C0_SDA_PIN_8
  251. default 12 if BSP_I2C0_SDA_PIN_12
  252. default 16 if BSP_I2C0_SDA_PIN_16
  253. default 20 if BSP_I2C0_SDA_PIN_20
  254. endif
  255. config BSP_USING_I2C1
  256. bool "Enable I2C1"
  257. default n
  258. if BSP_USING_I2C1
  259. choice
  260. prompt "i2c1 scl pin number (GP)"
  261. depends on BSP_USING_I2C1
  262. config BSP_I2C1_SCL_PIN_3
  263. bool "3"
  264. config BSP_I2C1_SCL_PIN_7
  265. bool "7"
  266. config BSP_I2C1_SCL_PIN_11
  267. bool "11"
  268. config BSP_I2C1_SCL_PIN_15
  269. bool "15"
  270. config BSP_I2C1_SCL_PIN_19
  271. bool "19"
  272. config BSP_I2C1_SCL_PIN_27
  273. bool "27"
  274. endchoice
  275. config BSP_I2C1_SCL_PIN
  276. int
  277. default 3 if BSP_I2C1_SCL_PIN_3
  278. default 7 if BSP_I2C1_SCL_PIN_7
  279. default 11 if BSP_I2C1_SCL_PIN_11
  280. default 15 if BSP_I2C1_SCL_PIN_15
  281. default 19 if BSP_I2C1_SCL_PIN_19
  282. default 27 if BSP_I2C1_SCL_PIN_27
  283. choice
  284. prompt "i2c1 sda pin number (GP)"
  285. depends on BSP_USING_I2C1
  286. config BSP_I2C1_SDA_PIN_2
  287. bool "2"
  288. config BSP_I2C1_SDA_PIN_6
  289. bool "6"
  290. config BSP_I2C1_SDA_PIN_10
  291. bool "10"
  292. config BSP_I2C1_SDA_PIN_14
  293. bool "14"
  294. config BSP_I2C1_SDA_PIN_18
  295. bool "18"
  296. config BSP_I2C1_SDA_PIN_26
  297. bool "26"
  298. endchoice
  299. config BSP_I2C1_SDA_PIN
  300. int
  301. default 2 if BSP_I2C1_SDA_PIN_2
  302. default 6 if BSP_I2C1_SDA_PIN_6
  303. default 10 if BSP_I2C1_SDA_PIN_10
  304. default 14 if BSP_I2C1_SDA_PIN_14
  305. default 18 if BSP_I2C1_SDA_PIN_18
  306. default 26 if BSP_I2C1_SDA_PIN_26
  307. endif
  308. endif
  309. endmenu
  310. endmenu