Kconfig 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. mainmenu "RT-Thread Configuration"
  2. config BSP_DIR
  3. string
  4. option env="BSP_ROOT"
  5. default "."
  6. config RTT_DIR
  7. string
  8. option env="RTT_ROOT"
  9. default "../.."
  10. config PKGS_DIR
  11. string
  12. option env="PKGS_ROOT"
  13. default "packages"
  14. source "$RTT_DIR/Kconfig"
  15. source "$PKGS_DIR/Kconfig"
  16. menu "Hardware Drivers Config"
  17. config SOC_RP2040
  18. bool
  19. select ARCH_ARM_CORTEX_M0
  20. select RT_USING_COMPONENTS_INIT
  21. select RT_USING_USER_MAIN
  22. select SOC_SERIES_RP2040_PICO
  23. select PKG_USING_RASPBERRYPI_PICO_SDK
  24. default y
  25. menu "Onboard Peripheral Drivers"
  26. config BSP_USING_LVGL
  27. bool "Enable LVGL for LCD"
  28. select PKG_USING_LVGL
  29. select BSP_USING_SPI_LCD
  30. default n
  31. if BSP_USING_LVGL
  32. config BSP_USING_LVGL_DEMO
  33. bool "Enable LVGL demo"
  34. select PKG_USING_LV_MUSIC_DEMO
  35. default y
  36. endif
  37. config BSP_USING_ARDUINO
  38. bool "Compatible with Arduino Ecosystem (RTduino)"
  39. select PKG_USING_RTDUINO
  40. select BSP_USING_UART0
  41. select BSP_UART0_TX_PIN_0
  42. select BSP_UART0_RX_PIN_1
  43. select BSP_USING_UART1
  44. select BSP_UART1_TX_PIN_8
  45. select BSP_UART1_RX_PIN_9
  46. select BSP_USING_GPIO
  47. default n
  48. config BSP_USING_ON_CHIP_FLASH
  49. bool "Enable On-Chip FLASH"
  50. select FAL_DEBUG_CONFIG
  51. select FAL_PART_HAS_TABLE_CFG
  52. default n
  53. endmenu
  54. menu "On-chip Peripheral Drivers"
  55. config BSP_USING_PIN
  56. bool "Enable GPIO"
  57. select RT_USING_PIN
  58. default y
  59. menuconfig BSP_USING_UART
  60. bool "Enable UART"
  61. select RT_USING_SERIAL
  62. default y
  63. if BSP_USING_UART
  64. config BSP_USING_UART0
  65. bool "Enable UART0"
  66. default y
  67. if BSP_USING_UART0
  68. choice
  69. prompt "uart0 tx pin number (GP)"
  70. depends on BSP_USING_UART0
  71. default BSP_UART0_TX_PIN_0
  72. config BSP_UART0_TX_PIN_0
  73. bool "0"
  74. config BSP_UART0_TX_PIN_12
  75. bool "12"
  76. config BSP_UART0_TX_PIN_16
  77. bool "16"
  78. endchoice
  79. config BSP_UART0_TX_PIN
  80. int
  81. default 0 if BSP_UART0_TX_PIN_0
  82. default 12 if BSP_UART0_TX_PIN_12
  83. default 16 if BSP_UART0_TX_PIN_16
  84. choice
  85. prompt "uart0 rx pin number (GP)"
  86. depends on BSP_USING_UART0
  87. default BSP_UART0_RX_PIN_1
  88. config BSP_UART0_RX_PIN_1
  89. bool "1"
  90. config BSP_UART0_RX_PIN_13
  91. bool "13"
  92. config BSP_UART0_RX_PIN_17
  93. bool "17"
  94. endchoice
  95. config BSP_UART0_RX_PIN
  96. int
  97. default 1 if BSP_UART0_RX_PIN_1
  98. default 13 if BSP_UART0_RX_PIN_13
  99. default 17 if BSP_UART0_RX_PIN_17
  100. endif
  101. config BSP_USING_UART1
  102. bool "Enable UART1"
  103. default n
  104. if BSP_USING_UART1
  105. choice
  106. prompt "uart1 tx pin number (GP)"
  107. depends on BSP_USING_UART1
  108. default BSP_UART1_TX_PIN_4
  109. config BSP_UART1_TX_PIN_4
  110. bool "4"
  111. config BSP_UART1_TX_PIN_8
  112. bool "8"
  113. endchoice
  114. config BSP_UART1_TX_PIN
  115. int
  116. default 4 if BSP_UART1_TX_PIN_4
  117. default 8 if BSP_UART1_TX_PIN_8
  118. choice
  119. prompt "uart1 rx pin number (GP)"
  120. depends on BSP_USING_UART1
  121. default BSP_UART1_RX_PIN_5
  122. config BSP_UART1_RX_PIN_5
  123. bool "5"
  124. config BSP_UART1_RX_PIN_9
  125. bool "9"
  126. endchoice
  127. config BSP_UART1_RX_PIN
  128. int
  129. default 5 if BSP_UART1_RX_PIN_5
  130. default 9 if BSP_UART1_RX_PIN_9
  131. endif
  132. endif
  133. menuconfig BSP_USING_SOFT_I2C
  134. bool "Enable I2C BUS (software simulation)"
  135. default n
  136. select RT_USING_I2C
  137. select RT_USING_I2C_BITOPS
  138. select RT_USING_PIN
  139. if BSP_USING_SOFT_I2C
  140. config BSP_USING_SOFT_I2C1
  141. bool "Enable I2C1 Bus (software simulation)"
  142. default n
  143. if BSP_USING_SOFT_I2C1
  144. config BSP_SOFT_I2C1_SCL_PIN
  145. int "i2c1 scl pin number (GP)"
  146. range 0 28
  147. default 2
  148. config BSP_SOFT_I2C1_SDA_PIN
  149. int "I2C1 sda pin number (GP)"
  150. range 0 28
  151. default 3
  152. endif
  153. endif
  154. menuconfig BSP_USING_SOFT_SPI
  155. bool "Enable soft SPI BUS"
  156. default n
  157. select RT_USING_PIN
  158. select RT_USING_SPI_BITOPS
  159. select RT_USING_SPI
  160. if BSP_USING_SOFT_SPI
  161. config BSP_USING_SOFT_SPI0
  162. bool "Enable SPI0 Bus (software simulation)"
  163. default n
  164. if BSP_USING_SOFT_SPI0
  165. config BSP_S_SPI0_SCK_PIN
  166. int "spi0 sck pin number (GP)"
  167. range 0 28
  168. default 6
  169. config BSP_S_SPI0_MOSI_PIN
  170. int "spi0 mosi pin number (GP)"
  171. range 0 28
  172. default 7
  173. config BSP_S_SPI0_MISO_PIN
  174. int "spi0 miso pin number (GP)"
  175. range 0 28
  176. default 4
  177. endif
  178. config BSP_USING_SOFT_SPI1
  179. bool "Enable SPI1 Bus (software simulation)"
  180. default n
  181. if BSP_USING_SOFT_SPI1
  182. config BSP_S_SPI1_SCK_PIN
  183. int "spi1 sck pin number (GP)"
  184. range 0 28
  185. default 10
  186. config BSP_S_SPI1_MOSI_PIN
  187. int "spi1 mosi pin number (GP)"
  188. range 0 28
  189. default 11
  190. config BSP_S_SPI1_MISO_PIN
  191. int "spi1 miso pin number (GP)"
  192. range 0 28
  193. default 12
  194. endif
  195. endif
  196. menuconfig BSP_USING_ADC
  197. bool "Enable ADC"
  198. default n
  199. select RT_USING_ADC
  200. if BSP_USING_ADC
  201. config BSP_USING_ADC0
  202. bool "Enable ADC0 (GP26)"
  203. default n
  204. config BSP_USING_ADC1
  205. bool "Enable ADC1 (GP27)"
  206. default n
  207. config BSP_USING_ADC2
  208. bool "Enable ADC2 (GP28)"
  209. default n
  210. endif
  211. config BSP_USING_WDT
  212. bool "Enable WDT"
  213. select RT_USING_WDT
  214. default n
  215. config BSP_USING_RTC
  216. bool "Enable RTC"
  217. select RT_USING_RTC
  218. default n
  219. menuconfig BSP_USING_SPI
  220. bool "Enable SPI"
  221. select RT_USING_SPI
  222. default n
  223. if BSP_USING_SPI
  224. config BSP_USING_SPI0
  225. bool "Enable SPI0"
  226. default n
  227. if BSP_USING_SPI0
  228. choice
  229. prompt "spi0 tx pin number (GP)"
  230. depends on BSP_USING_SPI0
  231. default BSP_SPI0_TX_PIN_3
  232. config BSP_SPI0_TX_PIN_3
  233. bool "3"
  234. config BSP_SPI0_TX_PIN_7
  235. bool "7"
  236. config BSP_SPI0_TX_PIN_19
  237. bool "19"
  238. endchoice
  239. config BSP_SPI0_TX_PIN
  240. int
  241. default 3 if BSP_SPI0_TX_PIN_3
  242. default 7 if BSP_SPI0_TX_PIN_7
  243. default 19 if BSP_SPI0_TX_PIN_19
  244. choice
  245. prompt "spi0 rx pin number (GP)"
  246. depends on BSP_USING_SPI0
  247. default BSP_SPI0_RX_PIN_4
  248. config BSP_SPI0_RX_PIN_0
  249. bool "0"
  250. config BSP_SPI0_RX_PIN_4
  251. bool "4"
  252. config BSP_SPI0_RX_PIN_16
  253. bool "16"
  254. endchoice
  255. config BSP_SPI0_RX_PIN
  256. int
  257. default 0 if BSP_SPI0_RX_PIN_0
  258. default 4 if BSP_SPI0_RX_PIN_4
  259. default 16 if BSP_SPI0_RX_PIN_16
  260. choice
  261. prompt "spi0 sck pin number (GP)"
  262. depends on BSP_USING_SPI0
  263. default BSP_SPI0_SCK_PIN_2
  264. config BSP_SPI0_SCK_PIN_2
  265. bool "2"
  266. config BSP_SPI0_SCK_PIN_6
  267. bool "6"
  268. config BSP_SPI0_SCK_PIN_8
  269. bool "8"
  270. endchoice
  271. config BSP_SPI0_SCK_PIN
  272. int
  273. default 2 if BSP_SPI0_SCK_PIN_2
  274. default 6 if BSP_SPI0_SCK_PIN_6
  275. default 8 if BSP_SPI0_SCK_PIN_8
  276. choice
  277. prompt "spi0 cs pin number (GP)"
  278. depends on BSP_USING_SPI0
  279. default BSP_SPI0_CS_PIN_5
  280. config BSP_SPI0_CS_PIN_1
  281. bool "1"
  282. config BSP_SPI0_CS_PIN_5
  283. bool "5"
  284. config BSP_SPI0_CS_PIN_17
  285. bool "17"
  286. endchoice
  287. config BSP_SPI0_CS_PIN
  288. int
  289. default 1 if BSP_SPI0_CS_PIN_1
  290. default 5 if BSP_SPI0_CS_PIN_5
  291. default 17 if BSP_SPI0_CS_PIN_17
  292. endif
  293. config BSP_USING_SPI1
  294. bool "Enable SPI1"
  295. default n
  296. if BSP_USING_SPI1
  297. choice
  298. prompt "spi1 tx pin number (GP)"
  299. depends on BSP_USING_SPI1
  300. default BSP_SPI1_TX_PIN_11
  301. config BSP_SPI1_TX_PIN_11
  302. bool "11"
  303. config BSP_SPI1_TX_PIN_15
  304. bool "15"
  305. endchoice
  306. config BSP_SPI1_TX_PIN
  307. int
  308. default 11 if BSP_SPI1_TX_PIN_11
  309. default 15 if BSP_SPI1_TX_PIN_15
  310. choice
  311. prompt "spi1 rx pin number (GP)"
  312. depends on BSP_USING_SPI1
  313. default BSP_SPI1_RX_PIN_12
  314. config BSP_SPI1_RX_PIN_8
  315. bool "8"
  316. config BSP_SPI1_RX_PIN_12
  317. bool "12"
  318. endchoice
  319. config BSP_SPI1_RX_PIN
  320. int
  321. default 8 if BSP_SPI1_RX_PIN_8
  322. default 12 if BSP_SPI1_RX_PIN_12
  323. choice
  324. prompt "spi1 sck pin number (GP)"
  325. depends on BSP_USING_SPI0
  326. default BSP_SPI1_SCK_PIN_10
  327. config BSP_SPI1_SCK_PIN_10
  328. bool "10"
  329. config BSP_SPI1_SCK_PIN_14
  330. bool "14"
  331. endchoice
  332. config BSP_SPI1_SCK_PIN
  333. int
  334. default 10 if BSP_SPI1_SCK_PIN_10
  335. default 14 if BSP_SPI1_SCK_PIN_14
  336. choice
  337. prompt "spi1 cs pin number (GP)"
  338. depends on BSP_USING_SPI0
  339. default BSP_SPI1_CS_PIN_13
  340. config BSP_SPI1_CS_PIN_9
  341. bool "9"
  342. config BSP_SPI1_CS_PIN_13
  343. bool "13"
  344. endchoice
  345. config BSP_SPI1_CS_PIN
  346. int
  347. default 9 if BSP_SPI1_CS_PIN_9
  348. default 13 if BSP_SPI1_CS_PIN_13
  349. endif
  350. endif
  351. menuconfig BSP_USING_PWM
  352. bool "Enable PWM(A:CH_0 B:CH_1)"
  353. default n
  354. select RT_USING_PWM
  355. if BSP_USING_PWM
  356. config BSP_USING_PWM0
  357. bool "Enable PWM0"
  358. default n
  359. if BSP_USING_PWM0
  360. choice
  361. prompt "pwm slice A pin number (GP)"
  362. depends on BSP_USING_PWM0
  363. default BSP_PWM0_A_PIN_0
  364. config BSP_PWM0_A_PIN_0
  365. bool "0"
  366. config BSP_PWM0_A_PIN_16
  367. bool "16"
  368. endchoice
  369. config BSP_PWM0_A_PIN
  370. int
  371. default 0 if BSP_PWM0_A_PIN_0
  372. default 16 if BSP_PWM0_A_PIN_16
  373. choice
  374. prompt "pwm slice B pin number (GP)"
  375. depends on BSP_USING_PWM0
  376. default BSP_PWM0_B_PIN_1
  377. config BSP_PWM0_B_PIN_1
  378. bool "1"
  379. config BSP_PWM0_B_PIN_17
  380. bool "17"
  381. endchoice
  382. config BSP_PWM0_B_PIN
  383. int
  384. default 1 if BSP_PWM0_B_PIN_1
  385. default 17 if BSP_PWM0_B_PIN_17
  386. config BSP_PWM0_A_ALL
  387. bool "pwm slice use all A pin"
  388. default n
  389. config BSP_PWM0_B_ALL
  390. bool "pwm slice use all B pin"
  391. default n
  392. endif
  393. config BSP_USING_PWM1
  394. bool "Enable PWM1"
  395. default n
  396. if BSP_USING_PWM1
  397. choice
  398. prompt "pwm slice A pin number (GP)"
  399. depends on BSP_USING_PWM1
  400. default BSP_PWM1_A_PIN_2
  401. config BSP_PWM1_A_PIN_2
  402. bool "2"
  403. config BSP_PWM1_A_PIN_18
  404. bool "18"
  405. endchoice
  406. config BSP_PWM1_A_PIN
  407. int
  408. default 2 if BSP_PWM1_A_PIN_2
  409. default 18 if BSP_PWM1_A_PIN_18
  410. choice
  411. prompt "pwm slice B pin number (GP)"
  412. depends on BSP_USING_PWM1
  413. default BSP_PWM1_B_PIN_3
  414. config BSP_PWM1_B_PIN_3
  415. bool "3"
  416. config BSP_PWM1_B_PIN_19
  417. bool "19"
  418. endchoice
  419. config BSP_PWM1_B_PIN
  420. int
  421. default 3 if BSP_PWM1_B_PIN_3
  422. default 19 if BSP_PWM1_B_PIN_19
  423. config BSP_PWM1_A_ALL
  424. bool "pwm slice use all A pin"
  425. default n
  426. config BSP_PWM1_B_ALL
  427. bool "pwm slice use all B pin"
  428. default n
  429. endif
  430. config BSP_USING_PWM2
  431. bool "Enable PWM2"
  432. default n
  433. if BSP_USING_PWM2
  434. choice
  435. prompt "pwm slice A pin number (GP)"
  436. depends on BSP_USING_PWM2
  437. default BSP_PWM2_A_PIN_4
  438. config BSP_PWM2_A_PIN_4
  439. bool "4"
  440. config BSP_PWM2_A_PIN_20
  441. bool "20"
  442. endchoice
  443. config BSP_PWM2_A_PIN
  444. int
  445. default 4 if BSP_PWM2_A_PIN_4
  446. default 20 if BSP_PWM2_A_PIN_20
  447. choice
  448. prompt "pwm slice B pin number (GP)"
  449. depends on BSP_USING_PWM2
  450. default BSP_PWM2_B_PIN_5
  451. config BSP_PWM2_B_PIN_5
  452. bool "5"
  453. config BSP_PWM2_B_PIN_21
  454. bool "21"
  455. endchoice
  456. config BSP_PWM2_B_PIN
  457. int
  458. default 5 if BSP_PWM2_B_PIN_5
  459. default 21 if BSP_PWM2_B_PIN_21
  460. config BSP_PWM2_A_ALL
  461. bool "pwm slice use all A pin"
  462. default n
  463. config BSP_PWM2_B_ALL
  464. bool "pwm slice use all B pin"
  465. default n
  466. endif
  467. config BSP_USING_PWM3
  468. bool "Enable PWM3"
  469. default n
  470. if BSP_USING_PWM3
  471. choice
  472. prompt "pwm slice A pin number (GP)"
  473. depends on BSP_USING_PWM3
  474. default BSP_PWM3_A_PIN_6
  475. config BSP_PWM3_A_PIN_6
  476. bool "6"
  477. config BSP_PWM3_A_PIN_22
  478. bool "22"
  479. endchoice
  480. config BSP_PWM3_A_PIN
  481. int
  482. default 6 if BSP_PWM3_A_PIN_6
  483. default 22 if BSP_PWM3_A_PIN_22
  484. choice
  485. prompt "pwm slice B pin number (GP)"
  486. depends on BSP_USING_PWM3
  487. default BSP_PWM3_B_PIN_7
  488. config BSP_PWM3_B_PIN_7
  489. bool "7"
  490. config BSP_PWM3_B_PIN_23
  491. bool "23"
  492. endchoice
  493. config BSP_PWM3_B_PIN
  494. int
  495. default 7 if BSP_PWM3_B_PIN_7
  496. default 23 if BSP_PWM3_B_PIN_23
  497. config BSP_PWM3_A_ALL
  498. bool "pwm slice use all A pin"
  499. default n
  500. config BSP_PWM3_B_ALL
  501. bool "pwm slice use all B pin"
  502. default n
  503. endif
  504. config BSP_USING_PWM4
  505. bool "Enable PWM4"
  506. default n
  507. if BSP_USING_PWM4
  508. choice
  509. prompt "pwm slice A pin number (GP)"
  510. depends on BSP_USING_PWM4
  511. default BSP_PWM4_A_PIN_8
  512. config BSP_PWM4_A_PIN_8
  513. bool "8"
  514. config BSP_PWM4_A_PIN_24
  515. bool "24"
  516. endchoice
  517. config BSP_PWM4_A_PIN
  518. int
  519. default 8 if BSP_PWM4_A_PIN_8
  520. default 24 if BSP_PWM4_A_PIN_24
  521. choice
  522. prompt "pwm slice B pin number (GP)"
  523. depends on BSP_USING_PWM4
  524. default BSP_PWM4_B_PIN_9
  525. config BSP_PWM4_B_PIN_9
  526. bool "9"
  527. config BSP_PWM4_B_PIN_25
  528. bool "25"
  529. endchoice
  530. config BSP_PWM4_B_PIN
  531. int
  532. default 9 if BSP_PWM4_B_PIN_9
  533. default 25 if BSP_PWM4_B_PIN_25
  534. config BSP_PWM4_A_ALL
  535. bool "pwm slice use all A pin"
  536. default n
  537. config BSP_PWM4_B_ALL
  538. bool "pwm slice use all B pin"
  539. default n
  540. endif
  541. config BSP_USING_PWM5
  542. bool "Enable PWM5"
  543. default n
  544. if BSP_USING_PWM5
  545. choice
  546. prompt "pwm slice A pin number (GP)"
  547. depends on BSP_USING_PWM5
  548. default BSP_PWM5_A_PIN_10
  549. config BSP_PWM5_A_PIN_10
  550. bool "10"
  551. config BSP_PWM5_A_PIN_26
  552. bool "26"
  553. endchoice
  554. config BSP_PWM5_A_PIN
  555. int
  556. default 10 if BSP_PWM5_A_PIN_10
  557. default 26 if BSP_PWM5_A_PIN_26
  558. choice
  559. prompt "pwm slice B pin number (GP)"
  560. depends on BSP_USING_PWM5
  561. default BSP_PWM5_B_PIN_11
  562. config BSP_PWM5_B_PIN_11
  563. bool "11"
  564. config BSP_PWM5_B_PIN_27
  565. bool "27"
  566. endchoice
  567. config BSP_PWM5_B_PIN
  568. int
  569. default 10 if BSP_PWM5_B_PIN_10
  570. default 27 if BSP_PWM5_B_PIN_27
  571. config BSP_PWM5_A_ALL
  572. bool "pwm slice use all A pin"
  573. default n
  574. config BSP_PWM5_B_ALL
  575. bool "pwm slice use all B pin"
  576. default n
  577. endif
  578. config BSP_USING_PWM6
  579. bool "Enable PWM6"
  580. default n
  581. if BSP_USING_PWM6
  582. choice
  583. prompt "pwm slice A pin number (GP)"
  584. depends on BSP_USING_PWM6
  585. default BSP_PWM6_A_PIN_12
  586. config BSP_PWM6_A_PIN_12
  587. bool "12"
  588. config BSP_PWM6_A_PIN_28
  589. bool "28"
  590. endchoice
  591. config BSP_PWM6_A_PIN
  592. int
  593. default 12 if BSP_PWM6_A_PIN_12
  594. default 28 if BSP_PWM6_A_PIN_28
  595. choice
  596. prompt "pwm slice B pin number (GP)"
  597. depends on BSP_USING_PWM6
  598. default BSP_PWM6_B_PIN_13
  599. config BSP_PWM6_B_PIN_13
  600. bool "13"
  601. config BSP_PWM6_B_PIN_29
  602. bool "29"
  603. endchoice
  604. config BSP_PWM6_B_PIN
  605. int
  606. default 13 if BSP_PWM6_B_PIN_13
  607. default 29 if BSP_PWM6_B_PIN_29
  608. config BSP_PWM6_A_ALL
  609. bool "pwm slice use all A pin"
  610. default n
  611. config BSP_PWM6_B_ALL
  612. bool "pwm slice use all B pin"
  613. default n
  614. endif
  615. config BSP_USING_PWM7
  616. bool "Enable PWM7"
  617. default n
  618. if BSP_USING_PWM7
  619. choice
  620. prompt "pwm slice A pin number (GP)"
  621. depends on BSP_USING_PWM7
  622. default BSP_PWM7_A_PIN_14
  623. config BSP_PWM7_A_PIN_14
  624. bool "14"
  625. endchoice
  626. config BSP_PWM7_A_PIN
  627. int
  628. default 14 if BSP_PWM7_A_PIN_14
  629. choice
  630. prompt "pwm slice B pin number (GP)"
  631. depends on BSP_USING_PWM7
  632. default BSP_PWM7_B_PIN_15
  633. config BSP_PWM7_B_PIN_15
  634. bool "15"
  635. endchoice
  636. config BSP_PWM7_B_PIN
  637. int
  638. default 15 if BSP_PWM7_B_PIN_15
  639. endif
  640. endif
  641. menuconfig BSP_USING_HWTIMER
  642. bool "Enable HWTIMER"
  643. default n
  644. select RT_USING_HWTIMER
  645. if BSP_USING_HWTIMER
  646. config BSP_USING_TIMER0
  647. bool "Enable HWTIMER0"
  648. default n
  649. config BSP_USING_TIMER1
  650. bool "Enable HWTIMER1"
  651. default n
  652. config BSP_USING_TIMER2
  653. bool "Enable HWTIMER2"
  654. default n
  655. config BSP_USING_TIMER3
  656. bool "Enable HWTIMER3"
  657. default n
  658. endif
  659. menuconfig BSP_USING_I2C
  660. bool "Enable I2C"
  661. select RT_USING_I2C
  662. select RT_USING_I2C_BITOPS
  663. select RT_USING_PIN
  664. default n
  665. if BSP_USING_I2C
  666. config BSP_USING_I2C0
  667. bool "Enable I2C0"
  668. default n
  669. if BSP_USING_I2C0
  670. choice
  671. prompt "i2c0 scl pin number (GP)"
  672. depends on BSP_USING_I2C0
  673. default BSP_I2C0_SCL_PIN_21
  674. config BSP_I2C0_SCL_PIN_1
  675. bool "1"
  676. config BSP_I2C0_SCL_PIN_5
  677. bool "5"
  678. config BSP_I2C0_SCL_PIN_9
  679. bool "9"
  680. config BSP_I2C0_SCL_PIN_13
  681. bool "13"
  682. config BSP_I2C0_SCL_PIN_17
  683. bool "17"
  684. config BSP_I2C0_SCL_PIN_21
  685. bool "21"
  686. endchoice
  687. config BSP_I2C0_SCL_PIN
  688. int
  689. default 1 if BSP_I2C0_SCL_PIN_1
  690. default 5 if BSP_I2C0_SCL_PIN_5
  691. default 9 if BSP_I2C0_SCL_PIN_9
  692. default 13 if BSP_I2C0_SCL_PIN_13
  693. default 17 if BSP_I2C0_SCL_PIN_17
  694. default 21 if BSP_I2C0_SCL_PIN_21
  695. choice
  696. prompt "i2c0 sda pin number (GP)"
  697. depends on BSP_USING_I2C0
  698. default BSP_I2C0_SDA_PIN_20
  699. config BSP_I2C0_SDA_PIN_0
  700. bool "0"
  701. config BSP_I2C0_SDA_PIN_4
  702. bool "4"
  703. config BSP_I2C0_SDA_PIN_8
  704. bool "8"
  705. config BSP_I2C0_SDA_PIN_12
  706. bool "12"
  707. config BSP_I2C0_SDA_PIN_16
  708. bool "16"
  709. config BSP_I2C0_SDA_PIN_20
  710. bool "20"
  711. endchoice
  712. config BSP_I2C0_SDA_PIN
  713. int
  714. default 0 if BSP_I2C0_SDA_PIN_0
  715. default 4 if BSP_I2C0_SDA_PIN_4
  716. default 8 if BSP_I2C0_SDA_PIN_8
  717. default 12 if BSP_I2C0_SDA_PIN_12
  718. default 16 if BSP_I2C0_SDA_PIN_16
  719. default 20 if BSP_I2C0_SDA_PIN_20
  720. endif
  721. config BSP_USING_I2C1
  722. bool "Enable I2C1"
  723. default n
  724. if BSP_USING_I2C1
  725. choice
  726. prompt "i2c1 scl pin number (GP)"
  727. depends on BSP_USING_I2C1
  728. config BSP_I2C1_SCL_PIN_3
  729. bool "3"
  730. config BSP_I2C1_SCL_PIN_7
  731. bool "7"
  732. config BSP_I2C1_SCL_PIN_11
  733. bool "11"
  734. config BSP_I2C1_SCL_PIN_15
  735. bool "15"
  736. config BSP_I2C1_SCL_PIN_19
  737. bool "19"
  738. config BSP_I2C1_SCL_PIN_27
  739. bool "27"
  740. endchoice
  741. config BSP_I2C1_SCL_PIN
  742. int
  743. default 3 if BSP_I2C1_SCL_PIN_3
  744. default 7 if BSP_I2C1_SCL_PIN_7
  745. default 11 if BSP_I2C1_SCL_PIN_11
  746. default 15 if BSP_I2C1_SCL_PIN_15
  747. default 19 if BSP_I2C1_SCL_PIN_19
  748. default 27 if BSP_I2C1_SCL_PIN_27
  749. choice
  750. prompt "i2c1 sda pin number (GP)"
  751. depends on BSP_USING_I2C1
  752. config BSP_I2C1_SDA_PIN_2
  753. bool "2"
  754. config BSP_I2C1_SDA_PIN_6
  755. bool "6"
  756. config BSP_I2C1_SDA_PIN_10
  757. bool "10"
  758. config BSP_I2C1_SDA_PIN_14
  759. bool "14"
  760. config BSP_I2C1_SDA_PIN_18
  761. bool "18"
  762. config BSP_I2C1_SDA_PIN_26
  763. bool "26"
  764. endchoice
  765. config BSP_I2C1_SDA_PIN
  766. int
  767. default 2 if BSP_I2C1_SDA_PIN_2
  768. default 6 if BSP_I2C1_SDA_PIN_6
  769. default 10 if BSP_I2C1_SDA_PIN_10
  770. default 14 if BSP_I2C1_SDA_PIN_14
  771. default 18 if BSP_I2C1_SDA_PIN_18
  772. default 26 if BSP_I2C1_SDA_PIN_26
  773. endif
  774. endif
  775. endmenu
  776. endmenu