rt-thread-official/bsp/raspberry-pico/Kconfig

821 lines
30 KiB
Plaintext

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"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
menu "Hardware Drivers Config"
config SOC_RP2040
bool
select ARCH_ARM_CORTEX_M0
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
select SOC_SERIES_RP2040_PICO
select PKG_USING_RASPBERRYPI_PICO_SDK
default y
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
config BSP_USING_ARDUINO
bool "Compatible with Arduino Ecosystem (RTduino)"
select PKG_USING_RTDUINO
select BSP_USING_UART0
select BSP_UART0_TX_PIN_0
select BSP_UART0_RX_PIN_1
select BSP_USING_UART1
select BSP_UART1_TX_PIN_8
select BSP_UART1_RX_PIN_9
select BSP_USING_GPIO
default n
config BSP_USING_ON_CHIP_FLASH
bool "Enable On-Chip FLASH"
select FAL_DEBUG_CONFIG
select FAL_PART_HAS_TABLE_CFG
default n
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
if BSP_USING_SPI0
choice
prompt "spi0 tx pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI0_TX_PIN_3
config BSP_SPI0_TX_PIN_3
bool "3"
config BSP_SPI0_TX_PIN_7
bool "7"
config BSP_SPI0_TX_PIN_19
bool "19"
endchoice
config BSP_SPI0_TX_PIN
int
default 3 if BSP_SPI0_TX_PIN_3
default 7 if BSP_SPI0_TX_PIN_7
default 19 if BSP_SPI0_TX_PIN_19
choice
prompt "spi0 rx pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI0_RX_PIN_4
config BSP_SPI0_RX_PIN_0
bool "0"
config BSP_SPI0_RX_PIN_4
bool "4"
config BSP_SPI0_RX_PIN_16
bool "16"
endchoice
config BSP_SPI0_RX_PIN
int
default 0 if BSP_SPI0_RX_PIN_0
default 4 if BSP_SPI0_RX_PIN_4
default 16 if BSP_SPI0_RX_PIN_16
choice
prompt "spi0 sck pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI0_SCK_PIN_2
config BSP_SPI0_SCK_PIN_2
bool "2"
config BSP_SPI0_SCK_PIN_6
bool "6"
config BSP_SPI0_SCK_PIN_8
bool "8"
endchoice
config BSP_SPI0_SCK_PIN
int
default 2 if BSP_SPI0_SCK_PIN_2
default 6 if BSP_SPI0_SCK_PIN_6
default 8 if BSP_SPI0_SCK_PIN_8
choice
prompt "spi0 cs pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI0_CS_PIN_5
config BSP_SPI0_CS_PIN_1
bool "1"
config BSP_SPI0_CS_PIN_5
bool "5"
config BSP_SPI0_CS_PIN_17
bool "17"
endchoice
config BSP_SPI0_CS_PIN
int
default 1 if BSP_SPI0_CS_PIN_1
default 5 if BSP_SPI0_CS_PIN_5
default 17 if BSP_SPI0_CS_PIN_17
endif
config BSP_USING_SPI1
bool "Enable SPI1"
default n
if BSP_USING_SPI1
choice
prompt "spi1 tx pin number (GP)"
depends on BSP_USING_SPI1
default BSP_SPI1_TX_PIN_11
config BSP_SPI1_TX_PIN_11
bool "11"
config BSP_SPI1_TX_PIN_15
bool "15"
endchoice
config BSP_SPI1_TX_PIN
int
default 11 if BSP_SPI1_TX_PIN_11
default 15 if BSP_SPI1_TX_PIN_15
choice
prompt "spi1 rx pin number (GP)"
depends on BSP_USING_SPI1
default BSP_SPI1_RX_PIN_12
config BSP_SPI1_RX_PIN_8
bool "8"
config BSP_SPI1_RX_PIN_12
bool "12"
endchoice
config BSP_SPI1_RX_PIN
int
default 8 if BSP_SPI1_RX_PIN_8
default 12 if BSP_SPI1_RX_PIN_12
choice
prompt "spi1 sck pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI1_SCK_PIN_10
config BSP_SPI1_SCK_PIN_10
bool "10"
config BSP_SPI1_SCK_PIN_14
bool "14"
endchoice
config BSP_SPI1_SCK_PIN
int
default 10 if BSP_SPI1_SCK_PIN_10
default 14 if BSP_SPI1_SCK_PIN_14
choice
prompt "spi1 cs pin number (GP)"
depends on BSP_USING_SPI0
default BSP_SPI1_CS_PIN_13
config BSP_SPI1_CS_PIN_9
bool "9"
config BSP_SPI1_CS_PIN_13
bool "13"
endchoice
config BSP_SPI1_CS_PIN
int
default 9 if BSP_SPI1_CS_PIN_9
default 13 if BSP_SPI1_CS_PIN_13
endif
endif
menuconfig BSP_USING_PWM
bool "Enable PWM(A:CH_0 B:CH_1)"
default n
select RT_USING_PWM
if BSP_USING_PWM
config BSP_USING_PWM0
bool "Enable PWM0"
default n
if BSP_USING_PWM0
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM0
default BSP_PWM0_A_PIN_0
config BSP_PWM0_A_PIN_0
bool "0"
config BSP_PWM0_A_PIN_16
bool "16"
endchoice
config BSP_PWM0_A_PIN
int
default 0 if BSP_PWM0_A_PIN_0
default 16 if BSP_PWM0_A_PIN_16
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM0
default BSP_PWM0_B_PIN_1
config BSP_PWM0_B_PIN_1
bool "1"
config BSP_PWM0_B_PIN_17
bool "17"
endchoice
config BSP_PWM0_B_PIN
int
default 1 if BSP_PWM0_B_PIN_1
default 17 if BSP_PWM0_B_PIN_17
config BSP_PWM0_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM0_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM1
bool "Enable PWM1"
default n
if BSP_USING_PWM1
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM1
default BSP_PWM1_A_PIN_2
config BSP_PWM1_A_PIN_2
bool "2"
config BSP_PWM1_A_PIN_18
bool "18"
endchoice
config BSP_PWM1_A_PIN
int
default 2 if BSP_PWM1_A_PIN_2
default 18 if BSP_PWM1_A_PIN_18
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM1
default BSP_PWM1_B_PIN_3
config BSP_PWM1_B_PIN_3
bool "3"
config BSP_PWM1_B_PIN_19
bool "19"
endchoice
config BSP_PWM1_B_PIN
int
default 3 if BSP_PWM1_B_PIN_3
default 19 if BSP_PWM1_B_PIN_19
config BSP_PWM1_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM1_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM2
bool "Enable PWM2"
default n
if BSP_USING_PWM2
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM2
default BSP_PWM2_A_PIN_4
config BSP_PWM2_A_PIN_4
bool "4"
config BSP_PWM2_A_PIN_20
bool "20"
endchoice
config BSP_PWM2_A_PIN
int
default 4 if BSP_PWM2_A_PIN_4
default 20 if BSP_PWM2_A_PIN_20
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM2
default BSP_PWM2_B_PIN_5
config BSP_PWM2_B_PIN_5
bool "5"
config BSP_PWM2_B_PIN_21
bool "21"
endchoice
config BSP_PWM2_B_PIN
int
default 5 if BSP_PWM2_B_PIN_5
default 21 if BSP_PWM2_B_PIN_21
config BSP_PWM2_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM2_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM3
bool "Enable PWM3"
default n
if BSP_USING_PWM3
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM3
default BSP_PWM3_A_PIN_6
config BSP_PWM3_A_PIN_6
bool "6"
config BSP_PWM3_A_PIN_22
bool "22"
endchoice
config BSP_PWM3_A_PIN
int
default 6 if BSP_PWM3_A_PIN_6
default 22 if BSP_PWM3_A_PIN_22
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM3
default BSP_PWM3_B_PIN_7
config BSP_PWM3_B_PIN_7
bool "7"
config BSP_PWM3_B_PIN_23
bool "23"
endchoice
config BSP_PWM3_B_PIN
int
default 7 if BSP_PWM3_B_PIN_7
default 23 if BSP_PWM3_B_PIN_23
config BSP_PWM3_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM3_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM4
bool "Enable PWM4"
default n
if BSP_USING_PWM4
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM4
default BSP_PWM4_A_PIN_8
config BSP_PWM4_A_PIN_8
bool "8"
config BSP_PWM4_A_PIN_24
bool "24"
endchoice
config BSP_PWM4_A_PIN
int
default 8 if BSP_PWM4_A_PIN_8
default 24 if BSP_PWM4_A_PIN_24
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM4
default BSP_PWM4_B_PIN_9
config BSP_PWM4_B_PIN_9
bool "9"
config BSP_PWM4_B_PIN_25
bool "25"
endchoice
config BSP_PWM4_B_PIN
int
default 9 if BSP_PWM4_B_PIN_9
default 25 if BSP_PWM4_B_PIN_25
config BSP_PWM4_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM4_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM5
bool "Enable PWM5"
default n
if BSP_USING_PWM5
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM5
default BSP_PWM5_A_PIN_10
config BSP_PWM5_A_PIN_10
bool "10"
config BSP_PWM5_A_PIN_26
bool "26"
endchoice
config BSP_PWM5_A_PIN
int
default 10 if BSP_PWM5_A_PIN_10
default 26 if BSP_PWM5_A_PIN_26
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM5
default BSP_PWM5_B_PIN_11
config BSP_PWM5_B_PIN_11
bool "11"
config BSP_PWM5_B_PIN_27
bool "27"
endchoice
config BSP_PWM5_B_PIN
int
default 10 if BSP_PWM5_B_PIN_10
default 27 if BSP_PWM5_B_PIN_27
config BSP_PWM5_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM5_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM6
bool "Enable PWM6"
default n
if BSP_USING_PWM6
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM6
default BSP_PWM6_A_PIN_12
config BSP_PWM6_A_PIN_12
bool "12"
config BSP_PWM6_A_PIN_28
bool "28"
endchoice
config BSP_PWM6_A_PIN
int
default 12 if BSP_PWM6_A_PIN_12
default 28 if BSP_PWM6_A_PIN_28
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM6
default BSP_PWM6_B_PIN_13
config BSP_PWM6_B_PIN_13
bool "13"
config BSP_PWM6_B_PIN_29
bool "29"
endchoice
config BSP_PWM6_B_PIN
int
default 13 if BSP_PWM6_B_PIN_13
default 29 if BSP_PWM6_B_PIN_29
config BSP_PWM6_A_ALL
bool "pwm slice use all A pin"
default n
config BSP_PWM6_B_ALL
bool "pwm slice use all B pin"
default n
endif
config BSP_USING_PWM7
bool "Enable PWM7"
default n
if BSP_USING_PWM7
choice
prompt "pwm slice A pin number (GP)"
depends on BSP_USING_PWM7
default BSP_PWM7_A_PIN_14
config BSP_PWM7_A_PIN_14
bool "14"
endchoice
config BSP_PWM7_A_PIN
int
default 14 if BSP_PWM7_A_PIN_14
choice
prompt "pwm slice B pin number (GP)"
depends on BSP_USING_PWM7
default BSP_PWM7_B_PIN_15
config BSP_PWM7_B_PIN_15
bool "15"
endchoice
config BSP_PWM7_B_PIN
int
default 15 if BSP_PWM7_B_PIN_15
endif
endif
menuconfig BSP_USING_HWTIMER
bool "Enable HWTIMER"
default n
select RT_USING_HWTIMER
if BSP_USING_HWTIMER
config BSP_USING_TIMER0
bool "Enable HWTIMER0"
default n
config BSP_USING_TIMER1
bool "Enable HWTIMER1"
default n
config BSP_USING_TIMER2
bool "Enable HWTIMER2"
default n
config BSP_USING_TIMER3
bool "Enable HWTIMER3"
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