Kconfig 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. menu "Hardware Drivers Config"
  2. config SOC_STM32L476RG
  3. bool
  4. select SOC_SERIES_STM32L4
  5. select RT_USING_COMPONENTS_INIT
  6. select RT_USING_USER_MAIN
  7. default y
  8. menu "Onboard Peripheral Drivers"
  9. config BSP_USING_STLINK_TO_USART
  10. bool "Enable STLINK TO USART (uart2)"
  11. select BSP_USING_UART
  12. select BSP_USING_UART2
  13. default y
  14. config BSP_USING_ARDUINO
  15. bool "Compatible with Arduino Ecosystem (RTduino)"
  16. select PKG_USING_RTDUINO
  17. select BSP_USING_STLINK_TO_USART
  18. select BSP_USING_GPIO
  19. select BSP_USING_ADC
  20. select BSP_USING_ADC1
  21. select BSP_USING_PWM
  22. select BSP_USING_PWM2
  23. select BSP_USING_PWM2_CH2
  24. select BSP_USING_PWM2_CH3
  25. select BSP_USING_PWM3
  26. select BSP_USING_PWM3_CH0
  27. select BSP_USING_PWM3_CH1
  28. select BSP_USING_PWM4
  29. select BSP_USING_PWM4_CH1
  30. select BSP_USING_PWM17
  31. select BSP_USING_PWM17_CH1
  32. select BSP_USING_I2C
  33. select BSP_USING_I2C1
  34. imply RTDUINO_USING_SERVO
  35. imply RTDUINO_USING_WIRE
  36. default n
  37. endmenu
  38. menu "On-chip Peripheral Drivers"
  39. config BSP_USING_GPIO
  40. bool "Enable GPIO"
  41. select RT_USING_PIN
  42. default y
  43. menuconfig BSP_USING_UART
  44. bool "Enable UART"
  45. default y
  46. select RT_USING_SERIAL
  47. if BSP_USING_UART
  48. config BSP_USING_UART2
  49. bool "Enable UART2"
  50. default n
  51. config BSP_UART2_RX_USING_DMA
  52. bool "Enable UART2 RX DMA"
  53. depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
  54. default n
  55. endif
  56. menuconfig BSP_USING_I2C
  57. bool "Enable I2C (software simulation)"
  58. default n
  59. select RT_USING_I2C
  60. select RT_USING_I2C_BITOPS
  61. select RT_USING_PIN
  62. if BSP_USING_I2C
  63. config BSP_USING_I2C1
  64. bool "Enable I2C1 BUS (software simulation)"
  65. default n
  66. if BSP_USING_I2C1
  67. config BSP_I2C1_SCL_PIN
  68. int "i2c1 scl pin number (PB8)"
  69. range 1 176
  70. default 24
  71. config BSP_I2C1_SDA_PIN
  72. int "i2c1 sda pin number (PB9)"
  73. range 1 176
  74. default 25
  75. endif
  76. config BSP_USING_I2C2
  77. bool "Enable I2C2 BUS (software simulation)"
  78. default n
  79. if BSP_USING_I2C2
  80. config BSP_I2C2_SCL_PIN
  81. int "i2c2 scl pin number"
  82. range 1 176
  83. default 26
  84. config BSP_I2C2_SDA_PIN
  85. int "I2C2 sda pin number"
  86. range 1 176
  87. default 27
  88. endif
  89. config BSP_USING_I2C3
  90. bool "Enable I2C3 BUS (software simulation)"
  91. default n
  92. if BSP_USING_I2C3
  93. config BSP_I2C3_SCL_PIN
  94. int "i2c3 scl pin number"
  95. range 1 176
  96. default 32
  97. config BSP_I2C3_SDA_PIN
  98. int "I2C3 sda pin number"
  99. range 1 176
  100. default 33
  101. endif
  102. endif
  103. menuconfig BSP_USING_SPI
  104. bool "Enable SPI BUS"
  105. default n
  106. select RT_USING_SPI
  107. if BSP_USING_SPI
  108. config BSP_USING_SPI1
  109. bool "Enable SPI1 BUS"
  110. default n
  111. config BSP_SPI1_TX_USING_DMA
  112. bool "Enable SPI1 TX DMA"
  113. depends on BSP_USING_SPI1
  114. default n
  115. config BSP_SPI1_RX_USING_DMA
  116. bool "Enable SPI1 RX DMA"
  117. depends on BSP_USING_SPI1
  118. select BSP_SPI1_TX_USING_DMA
  119. default n
  120. config BSP_USING_SPI2
  121. bool "Enable SPI2 BUS"
  122. default n
  123. config BSP_SPI2_TX_USING_DMA
  124. bool "Enable SPI2 TX DMA"
  125. depends on BSP_USING_SPI2
  126. default n
  127. config BSP_SPI2_RX_USING_DMA
  128. bool "Enable SPI2 RX DMA"
  129. depends on BSP_USING_SPI2
  130. select BSP_SPI2_TX_USING_DMA
  131. default n
  132. config BSP_USING_SPI3
  133. bool "Enable SPI3 BUS"
  134. default n
  135. config BSP_SPI3_TX_USING_DMA
  136. bool "Enable SPI3 TX DMA"
  137. depends on BSP_USING_SPI3
  138. default n
  139. config BSP_SPI3_RX_USING_DMA
  140. bool "Enable SPI3 RX DMA"
  141. depends on BSP_USING_SPI3
  142. select BSP_SPI3_TX_USING_DMA
  143. default n
  144. endif
  145. menuconfig BSP_USING_TIM
  146. bool "Enable timer"
  147. default n
  148. select RT_USING_HWTIMER
  149. if BSP_USING_TIM
  150. config BSP_USING_TIM15
  151. bool "Enable TIM15"
  152. default n
  153. config BSP_USING_TIM16
  154. bool "Enable TIM16"
  155. default n
  156. config BSP_USING_TIM17
  157. bool "Enable TIM17"
  158. default n
  159. endif
  160. menuconfig BSP_USING_PWM
  161. bool "Enable PWM"
  162. default n
  163. select RT_USING_PWM
  164. if BSP_USING_PWM
  165. menuconfig BSP_USING_PWM2
  166. bool "Enable timer2 output PWM"
  167. default n
  168. if BSP_USING_PWM2
  169. config BSP_USING_PWM2_CH2
  170. bool "Enable PWM2 channel2"
  171. default n
  172. config BSP_USING_PWM2_CH3
  173. bool "Enable PWM2 channel3"
  174. default n
  175. endif
  176. menuconfig BSP_USING_PWM3
  177. bool "Enable timer3 output PWM"
  178. default n
  179. if BSP_USING_PWM3
  180. config BSP_USING_PWM3_CH0
  181. bool "Enable PWM3 channel0"
  182. default n
  183. config BSP_USING_PWM3_CH1
  184. bool "Enable PWM3 channel1"
  185. default n
  186. endif
  187. menuconfig BSP_USING_PWM4
  188. bool "Enable timer4 output PWM"
  189. default n
  190. if BSP_USING_PWM4
  191. config BSP_USING_PWM4_CH1
  192. bool "Enable PWM4 channel1"
  193. default n
  194. endif
  195. menuconfig BSP_USING_PWM17
  196. bool "Enable timer17 output PWM"
  197. default n
  198. if BSP_USING_PWM17
  199. config BSP_USING_PWM17_CH1
  200. bool "Enable PWM17 channel1"
  201. default n
  202. endif
  203. endif
  204. menuconfig BSP_USING_ADC
  205. bool "Enable ADC"
  206. default n
  207. select RT_USING_ADC
  208. if BSP_USING_ADC
  209. config BSP_USING_ADC1
  210. bool "Enable ADC1"
  211. default n
  212. config BSP_USING_ADC2
  213. bool "Enable ADC2"
  214. default n
  215. config BSP_USING_ADC3
  216. bool "Enable ADC3"
  217. default n
  218. endif
  219. menuconfig BSP_USING_ONCHIP_RTC
  220. bool "Enable RTC"
  221. select RT_USING_RTC
  222. default n
  223. if BSP_USING_ONCHIP_RTC
  224. choice
  225. prompt "Select clock source"
  226. default BSP_RTC_USING_LSE
  227. config BSP_RTC_USING_LSE
  228. bool "RTC USING LSE"
  229. config BSP_RTC_USING_LSI
  230. bool "RTC USING LSI"
  231. endchoice
  232. endif
  233. source "../libraries/HAL_Drivers/Kconfig"
  234. endmenu
  235. menu "Board extended module Drivers"
  236. endmenu
  237. endmenu