Kconfig 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. endmenu
  15. menu "On-chip Peripheral Drivers"
  16. config BSP_USING_GPIO
  17. bool "Enable GPIO"
  18. select RT_USING_PIN
  19. default y
  20. menuconfig BSP_USING_UART
  21. bool "Enable UART"
  22. default y
  23. select RT_USING_SERIAL
  24. if BSP_USING_UART
  25. config BSP_USING_UART2
  26. bool "Enable UART2"
  27. default n
  28. config BSP_UART2_RX_USING_DMA
  29. bool "Enable UART2 RX DMA"
  30. depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
  31. default n
  32. endif
  33. menuconfig BSP_USING_I2C
  34. bool "Enable I2C (software simulation)"
  35. default n
  36. select RT_USING_I2C
  37. select RT_USING_I2C_BITOPS
  38. select RT_USING_PIN
  39. if BSP_USING_I2C
  40. config BSP_USING_I2C1
  41. bool "Enable I2C1 BUS (software simulation)"
  42. default n
  43. if BSP_USING_I2C1
  44. config BSP_I2C1_SCL_PIN
  45. int "i2c1 scl pin number"
  46. range 1 176
  47. default 22
  48. config BSP_I2C1_SDA_PIN
  49. int "I2C1 sda pin number"
  50. range 1 176
  51. default 23
  52. endif
  53. config BSP_USING_I2C2
  54. bool "Enable I2C2 BUS (software simulation)"
  55. default n
  56. if BSP_USING_I2C2
  57. config BSP_I2C2_SCL_PIN
  58. int "i2c2 scl pin number"
  59. range 1 176
  60. default 26
  61. config BSP_I2C2_SDA_PIN
  62. int "I2C2 sda pin number"
  63. range 1 176
  64. default 27
  65. endif
  66. config BSP_USING_I2C3
  67. bool "Enable I2C3 BUS (software simulation)"
  68. default n
  69. if BSP_USING_I2C3
  70. config BSP_I2C3_SCL_PIN
  71. int "i2c3 scl pin number"
  72. range 1 176
  73. default 32
  74. config BSP_I2C3_SDA_PIN
  75. int "I2C3 sda pin number"
  76. range 1 176
  77. default 33
  78. endif
  79. endif
  80. menuconfig BSP_USING_SPI
  81. bool "Enable SPI BUS"
  82. default n
  83. select RT_USING_SPI
  84. if BSP_USING_SPI
  85. config BSP_USING_SPI1
  86. bool "Enable SPI1 BUS"
  87. default n
  88. config BSP_SPI1_TX_USING_DMA
  89. bool "Enable SPI1 TX DMA"
  90. depends on BSP_USING_SPI1
  91. default n
  92. config BSP_SPI1_RX_USING_DMA
  93. bool "Enable SPI1 RX DMA"
  94. depends on BSP_USING_SPI1
  95. select BSP_SPI1_TX_USING_DMA
  96. default n
  97. config BSP_USING_SPI2
  98. bool "Enable SPI2 BUS"
  99. default n
  100. config BSP_SPI2_TX_USING_DMA
  101. bool "Enable SPI2 TX DMA"
  102. depends on BSP_USING_SPI2
  103. default n
  104. config BSP_SPI2_RX_USING_DMA
  105. bool "Enable SPI2 RX DMA"
  106. depends on BSP_USING_SPI2
  107. select BSP_SPI2_TX_USING_DMA
  108. default n
  109. config BSP_USING_SPI3
  110. bool "Enable SPI3 BUS"
  111. default n
  112. config BSP_SPI3_TX_USING_DMA
  113. bool "Enable SPI3 TX DMA"
  114. depends on BSP_USING_SPI3
  115. default n
  116. config BSP_SPI3_RX_USING_DMA
  117. bool "Enable SPI3 RX DMA"
  118. depends on BSP_USING_SPI3
  119. select BSP_SPI3_TX_USING_DMA
  120. default n
  121. endif
  122. menuconfig BSP_USING_TIM
  123. bool "Enable timer"
  124. default n
  125. select RT_USING_HWTIMER
  126. if BSP_USING_TIM
  127. config BSP_USING_TIM15
  128. bool "Enable TIM15"
  129. default n
  130. config BSP_USING_TIM16
  131. bool "Enable TIM16"
  132. default n
  133. config BSP_USING_TIM17
  134. bool "Enable TIM17"
  135. default n
  136. endif
  137. menuconfig BSP_USING_ADC
  138. bool "Enable ADC"
  139. default n
  140. select RT_USING_ADC
  141. if BSP_USING_ADC
  142. config BSP_USING_ADC1
  143. bool "Enable ADC1"
  144. default n
  145. config BSP_USING_ADC2
  146. bool "Enable ADC2"
  147. default n
  148. config BSP_USING_ADC3
  149. bool "Enable ADC3"
  150. default n
  151. endif
  152. menuconfig BSP_USING_ONCHIP_RTC
  153. bool "Enable RTC"
  154. select RT_USING_RTC
  155. default n
  156. if BSP_USING_ONCHIP_RTC
  157. choice
  158. prompt "Select clock source"
  159. default BSP_RTC_USING_LSE
  160. config BSP_RTC_USING_LSE
  161. bool "RTC USING LSE"
  162. config BSP_RTC_USING_LSI
  163. bool "RTC USING LSI"
  164. endchoice
  165. endif
  166. source "../libraries/HAL_Drivers/Kconfig"
  167. endmenu
  168. menu "Board extended module Drivers"
  169. endmenu
  170. endmenu