2021-01-28 19:59:31 +08:00
|
|
|
mainmenu "RT-Thread Configuration"
|
|
|
|
|
|
|
|
config BSP_DIR
|
|
|
|
string
|
|
|
|
option env="BSP_ROOT"
|
|
|
|
default "."
|
|
|
|
|
|
|
|
config RTT_DIR
|
|
|
|
string
|
|
|
|
option env="RTT_ROOT"
|
|
|
|
default "../.."
|
|
|
|
|
|
|
|
config PKGS_DIR
|
|
|
|
string
|
|
|
|
option env="PKGS_ROOT"
|
|
|
|
default "packages"
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2021-01-28 19:59:31 +08:00
|
|
|
source "$RTT_DIR/Kconfig"
|
|
|
|
source "$PKGS_DIR/Kconfig"
|
2023-09-28 08:46:43 +08:00
|
|
|
|
|
|
|
menu "Hardware Drivers Config"
|
2021-01-28 19:59:31 +08:00
|
|
|
|
|
|
|
config SOC_RP2040
|
|
|
|
bool
|
|
|
|
select ARCH_ARM_CORTEX_M0
|
|
|
|
select RT_USING_COMPONENTS_INIT
|
|
|
|
select RT_USING_USER_MAIN
|
2023-09-28 08:46:43 +08:00
|
|
|
select SOC_SERIES_RP2040_PICO
|
|
|
|
select PKG_USING_RASPBERRYPI_PICO_SDK
|
2021-01-28 19:59:31 +08:00
|
|
|
default y
|
2023-09-28 08:46:43 +08:00
|
|
|
|
|
|
|
menu "Onboard Peripheral Drivers"
|
|
|
|
|
|
|
|
config BSP_USING_LVGL
|
|
|
|
bool "Enable LVGL for LCD"
|
|
|
|
select PKG_USING_LVGL
|
|
|
|
select BSP_USING_SPI_LCD
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_LVGL
|
|
|
|
config BSP_USING_LVGL_DEMO
|
|
|
|
bool "Enable LVGL demo"
|
|
|
|
select PKG_USING_LV_MUSIC_DEMO
|
|
|
|
default y
|
|
|
|
endif
|
2023-10-20 07:05:30 +08:00
|
|
|
|
|
|
|
config BSP_USING_ON_CHIP_FLASH
|
|
|
|
bool "Enable On-Chip FLASH"
|
|
|
|
select FAL_DEBUG_CONFIG
|
|
|
|
select FAL_PART_HAS_TABLE_CFG
|
|
|
|
default n
|
2023-09-28 08:46:43 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "On-chip Peripheral Drivers"
|
|
|
|
|
|
|
|
config BSP_USING_PIN
|
|
|
|
bool "Enable GPIO"
|
|
|
|
select RT_USING_PIN
|
|
|
|
default y
|
|
|
|
|
|
|
|
menuconfig BSP_USING_UART
|
|
|
|
bool "Enable UART"
|
|
|
|
select RT_USING_SERIAL
|
|
|
|
default y
|
|
|
|
if BSP_USING_UART
|
|
|
|
config BSP_USING_UART0
|
|
|
|
bool "Enable UART0"
|
|
|
|
default y
|
|
|
|
if BSP_USING_UART0
|
|
|
|
choice
|
|
|
|
prompt "uart0 tx pin number (GP)"
|
|
|
|
depends on BSP_USING_UART0
|
|
|
|
default BSP_UART0_TX_PIN_0
|
|
|
|
config BSP_UART0_TX_PIN_0
|
|
|
|
bool "0"
|
|
|
|
config BSP_UART0_TX_PIN_12
|
|
|
|
bool "12"
|
|
|
|
config BSP_UART0_TX_PIN_16
|
|
|
|
bool "16"
|
|
|
|
endchoice
|
|
|
|
config BSP_UART0_TX_PIN
|
|
|
|
int
|
|
|
|
default 0 if BSP_UART0_TX_PIN_0
|
|
|
|
default 12 if BSP_UART0_TX_PIN_12
|
|
|
|
default 16 if BSP_UART0_TX_PIN_16
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "uart0 rx pin number (GP)"
|
|
|
|
depends on BSP_USING_UART0
|
|
|
|
default BSP_UART0_RX_PIN_1
|
|
|
|
config BSP_UART0_RX_PIN_1
|
|
|
|
bool "1"
|
|
|
|
config BSP_UART0_RX_PIN_13
|
|
|
|
bool "13"
|
|
|
|
config BSP_UART0_RX_PIN_17
|
|
|
|
bool "17"
|
|
|
|
endchoice
|
|
|
|
config BSP_UART0_RX_PIN
|
|
|
|
int
|
|
|
|
default 1 if BSP_UART0_RX_PIN_1
|
|
|
|
default 13 if BSP_UART0_RX_PIN_13
|
|
|
|
default 17 if BSP_UART0_RX_PIN_17
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_UART1
|
|
|
|
bool "Enable UART1"
|
|
|
|
default n
|
|
|
|
if BSP_USING_UART1
|
|
|
|
choice
|
|
|
|
prompt "uart1 tx pin number (GP)"
|
|
|
|
depends on BSP_USING_UART1
|
|
|
|
default BSP_UART1_TX_PIN_4
|
|
|
|
config BSP_UART1_TX_PIN_4
|
|
|
|
bool "4"
|
|
|
|
config BSP_UART1_TX_PIN_8
|
|
|
|
bool "8"
|
|
|
|
endchoice
|
|
|
|
config BSP_UART1_TX_PIN
|
|
|
|
int
|
|
|
|
default 4 if BSP_UART1_TX_PIN_4
|
|
|
|
default 8 if BSP_UART1_TX_PIN_8
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "uart1 rx pin number (GP)"
|
|
|
|
depends on BSP_USING_UART1
|
|
|
|
default BSP_UART1_RX_PIN_5
|
|
|
|
config BSP_UART1_RX_PIN_5
|
|
|
|
bool "5"
|
|
|
|
config BSP_UART1_RX_PIN_9
|
|
|
|
bool "9"
|
|
|
|
endchoice
|
|
|
|
config BSP_UART1_RX_PIN
|
|
|
|
int
|
|
|
|
default 5 if BSP_UART1_RX_PIN_5
|
|
|
|
default 9 if BSP_UART1_RX_PIN_9
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
menuconfig BSP_USING_SOFT_I2C
|
|
|
|
bool "Enable I2C BUS (software simulation)"
|
|
|
|
default n
|
|
|
|
select RT_USING_I2C
|
|
|
|
select RT_USING_I2C_BITOPS
|
|
|
|
select RT_USING_PIN
|
|
|
|
if BSP_USING_SOFT_I2C
|
|
|
|
config BSP_USING_SOFT_I2C1
|
|
|
|
bool "Enable I2C1 Bus (software simulation)"
|
|
|
|
default n
|
|
|
|
if BSP_USING_SOFT_I2C1
|
|
|
|
config BSP_SOFT_I2C1_SCL_PIN
|
|
|
|
int "i2c1 scl pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 2
|
|
|
|
config BSP_SOFT_I2C1_SDA_PIN
|
|
|
|
int "I2C1 sda pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 3
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
menuconfig BSP_USING_SOFT_SPI
|
|
|
|
bool "Enable soft SPI BUS"
|
|
|
|
default n
|
|
|
|
select RT_USING_PIN
|
|
|
|
select RT_USING_SPI_BITOPS
|
|
|
|
select RT_USING_SPI
|
|
|
|
if BSP_USING_SOFT_SPI
|
|
|
|
config BSP_USING_SOFT_SPI0
|
|
|
|
bool "Enable SPI0 Bus (software simulation)"
|
|
|
|
default n
|
|
|
|
if BSP_USING_SOFT_SPI0
|
|
|
|
config BSP_S_SPI0_SCK_PIN
|
|
|
|
int "spi0 sck pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 6
|
|
|
|
config BSP_S_SPI0_MOSI_PIN
|
|
|
|
int "spi0 mosi pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 7
|
|
|
|
config BSP_S_SPI0_MISO_PIN
|
|
|
|
int "spi0 miso pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 4
|
|
|
|
endif
|
|
|
|
config BSP_USING_SOFT_SPI1
|
|
|
|
bool "Enable SPI1 Bus (software simulation)"
|
|
|
|
default n
|
|
|
|
if BSP_USING_SOFT_SPI1
|
|
|
|
config BSP_S_SPI1_SCK_PIN
|
|
|
|
int "spi1 sck pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 10
|
|
|
|
config BSP_S_SPI1_MOSI_PIN
|
|
|
|
int "spi1 mosi pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 11
|
|
|
|
config BSP_S_SPI1_MISO_PIN
|
|
|
|
int "spi1 miso pin number (GP)"
|
|
|
|
range 0 28
|
|
|
|
default 12
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
menuconfig BSP_USING_ADC
|
|
|
|
bool "Enable ADC"
|
|
|
|
default n
|
|
|
|
select RT_USING_ADC
|
|
|
|
if BSP_USING_ADC
|
|
|
|
config BSP_USING_ADC0
|
|
|
|
bool "Enable ADC0 (GP26)"
|
|
|
|
default n
|
|
|
|
config BSP_USING_ADC1
|
|
|
|
bool "Enable ADC1 (GP27)"
|
|
|
|
default n
|
|
|
|
config BSP_USING_ADC2
|
|
|
|
bool "Enable ADC2 (GP28)"
|
|
|
|
default n
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_WDT
|
|
|
|
bool "Enable WDT"
|
|
|
|
select RT_USING_WDT
|
|
|
|
default n
|
|
|
|
|
|
|
|
menuconfig BSP_USING_SPI
|
|
|
|
bool "Enable SPI"
|
|
|
|
select RT_USING_SPI
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_SPI
|
|
|
|
config BSP_USING_SPI0
|
|
|
|
bool "Enable SPI0"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config BSP_USING_SPI1
|
|
|
|
bool "Enable SPI1"
|
|
|
|
default n
|
|
|
|
endif
|
|
|
|
|
|
|
|
menuconfig BSP_USING_I2C
|
|
|
|
bool "Enable I2C"
|
|
|
|
select RT_USING_I2C
|
|
|
|
select RT_USING_I2C_BITOPS
|
|
|
|
select RT_USING_PIN
|
|
|
|
default n
|
|
|
|
|
|
|
|
if BSP_USING_I2C
|
|
|
|
config BSP_USING_I2C0
|
|
|
|
bool "Enable I2C0"
|
|
|
|
default n
|
|
|
|
if BSP_USING_I2C0
|
|
|
|
choice
|
|
|
|
prompt "i2c0 scl pin number (GP)"
|
|
|
|
depends on BSP_USING_I2C0
|
|
|
|
default BSP_I2C0_SCL_PIN_21
|
|
|
|
config BSP_I2C0_SCL_PIN_1
|
|
|
|
bool "1"
|
|
|
|
config BSP_I2C0_SCL_PIN_5
|
|
|
|
bool "5"
|
|
|
|
config BSP_I2C0_SCL_PIN_9
|
|
|
|
bool "9"
|
|
|
|
config BSP_I2C0_SCL_PIN_13
|
|
|
|
bool "13"
|
|
|
|
config BSP_I2C0_SCL_PIN_17
|
|
|
|
bool "17"
|
|
|
|
config BSP_I2C0_SCL_PIN_21
|
|
|
|
bool "21"
|
|
|
|
endchoice
|
|
|
|
config BSP_I2C0_SCL_PIN
|
|
|
|
int
|
|
|
|
default 1 if BSP_I2C0_SCL_PIN_1
|
|
|
|
default 5 if BSP_I2C0_SCL_PIN_5
|
|
|
|
default 9 if BSP_I2C0_SCL_PIN_9
|
|
|
|
default 13 if BSP_I2C0_SCL_PIN_13
|
|
|
|
default 17 if BSP_I2C0_SCL_PIN_17
|
|
|
|
default 21 if BSP_I2C0_SCL_PIN_21
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "i2c0 sda pin number (GP)"
|
|
|
|
depends on BSP_USING_I2C0
|
|
|
|
default BSP_I2C0_SDA_PIN_20
|
|
|
|
config BSP_I2C0_SDA_PIN_0
|
|
|
|
bool "0"
|
|
|
|
config BSP_I2C0_SDA_PIN_4
|
|
|
|
bool "4"
|
|
|
|
config BSP_I2C0_SDA_PIN_8
|
|
|
|
bool "8"
|
|
|
|
config BSP_I2C0_SDA_PIN_12
|
|
|
|
bool "12"
|
|
|
|
config BSP_I2C0_SDA_PIN_16
|
|
|
|
bool "16"
|
|
|
|
config BSP_I2C0_SDA_PIN_20
|
|
|
|
bool "20"
|
|
|
|
endchoice
|
|
|
|
config BSP_I2C0_SDA_PIN
|
|
|
|
int
|
|
|
|
default 0 if BSP_I2C0_SDA_PIN_0
|
|
|
|
default 4 if BSP_I2C0_SDA_PIN_4
|
|
|
|
default 8 if BSP_I2C0_SDA_PIN_8
|
|
|
|
default 12 if BSP_I2C0_SDA_PIN_12
|
|
|
|
default 16 if BSP_I2C0_SDA_PIN_16
|
|
|
|
default 20 if BSP_I2C0_SDA_PIN_20
|
|
|
|
endif
|
|
|
|
|
|
|
|
config BSP_USING_I2C1
|
|
|
|
bool "Enable I2C1"
|
|
|
|
default n
|
|
|
|
if BSP_USING_I2C1
|
|
|
|
choice
|
|
|
|
prompt "i2c1 scl pin number (GP)"
|
|
|
|
depends on BSP_USING_I2C1
|
|
|
|
config BSP_I2C1_SCL_PIN_3
|
|
|
|
bool "3"
|
|
|
|
config BSP_I2C1_SCL_PIN_7
|
|
|
|
bool "7"
|
|
|
|
config BSP_I2C1_SCL_PIN_11
|
|
|
|
bool "11"
|
|
|
|
config BSP_I2C1_SCL_PIN_15
|
|
|
|
bool "15"
|
|
|
|
config BSP_I2C1_SCL_PIN_19
|
|
|
|
bool "19"
|
|
|
|
config BSP_I2C1_SCL_PIN_27
|
|
|
|
bool "27"
|
|
|
|
endchoice
|
|
|
|
config BSP_I2C1_SCL_PIN
|
|
|
|
int
|
|
|
|
default 3 if BSP_I2C1_SCL_PIN_3
|
|
|
|
default 7 if BSP_I2C1_SCL_PIN_7
|
|
|
|
default 11 if BSP_I2C1_SCL_PIN_11
|
|
|
|
default 15 if BSP_I2C1_SCL_PIN_15
|
|
|
|
default 19 if BSP_I2C1_SCL_PIN_19
|
|
|
|
default 27 if BSP_I2C1_SCL_PIN_27
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "i2c1 sda pin number (GP)"
|
|
|
|
depends on BSP_USING_I2C1
|
|
|
|
config BSP_I2C1_SDA_PIN_2
|
|
|
|
bool "2"
|
|
|
|
config BSP_I2C1_SDA_PIN_6
|
|
|
|
bool "6"
|
|
|
|
config BSP_I2C1_SDA_PIN_10
|
|
|
|
bool "10"
|
|
|
|
config BSP_I2C1_SDA_PIN_14
|
|
|
|
bool "14"
|
|
|
|
config BSP_I2C1_SDA_PIN_18
|
|
|
|
bool "18"
|
|
|
|
config BSP_I2C1_SDA_PIN_26
|
|
|
|
bool "26"
|
|
|
|
endchoice
|
|
|
|
config BSP_I2C1_SDA_PIN
|
|
|
|
int
|
|
|
|
default 2 if BSP_I2C1_SDA_PIN_2
|
|
|
|
default 6 if BSP_I2C1_SDA_PIN_6
|
|
|
|
default 10 if BSP_I2C1_SDA_PIN_10
|
|
|
|
default 14 if BSP_I2C1_SDA_PIN_14
|
|
|
|
default 18 if BSP_I2C1_SDA_PIN_18
|
|
|
|
default 26 if BSP_I2C1_SDA_PIN_26
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
endmenu
|