mirror of https://github.com/Desuuuu/klipper.git
stm32: Rework kconfig to use CONFIG_CANSERIAL for both can.c and fdcan.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
907b47b238
commit
63affd7006
|
@ -278,8 +278,6 @@ config SERIAL
|
||||||
bool
|
bool
|
||||||
config CANSERIAL
|
config CANSERIAL
|
||||||
bool
|
bool
|
||||||
config FDCANSERIAL
|
|
||||||
bool
|
|
||||||
choice
|
choice
|
||||||
prompt "Communication interface"
|
prompt "Communication interface"
|
||||||
config STM32_USB_PA11_PA12
|
config STM32_USB_PA11_PA12
|
||||||
|
@ -348,13 +346,13 @@ choice
|
||||||
depends on HAVE_STM32_CANBUS
|
depends on HAVE_STM32_CANBUS
|
||||||
select CANSERIAL
|
select CANSERIAL
|
||||||
config STM32_CANBUS_PB0_PB1
|
config STM32_CANBUS_PB0_PB1
|
||||||
bool "CAN bus (on PB0/PB1)" if LOW_LEVEL_OPTIONS
|
bool "CAN bus (on PB0/PB1)"
|
||||||
depends on HAVE_STM32_FDCANBUS
|
depends on HAVE_STM32_FDCANBUS
|
||||||
select FDCANSERIAL
|
select CANSERIAL
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config CANBUS_FREQUENCY
|
config CANBUS_FREQUENCY
|
||||||
int "CAN bus speed" if LOW_LEVEL_OPTIONS && (CANSERIAL || FDCANSERIAL)
|
int "CAN bus speed" if LOW_LEVEL_OPTIONS && CANSERIAL
|
||||||
default 500000
|
default 500000
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Setup the toolchain
|
# Setup the toolchain
|
||||||
CROSS_PREFIX=arm-none-eabi-
|
CROSS_PREFIX=arm-none-eabi-
|
||||||
|
|
||||||
dirs-y += src/stm32 src/generic
|
dirs-y += src/stm32 src/generic lib/fast-hash
|
||||||
dirs-$(CONFIG_MACH_STM32F0) += lib/stm32f0
|
dirs-$(CONFIG_MACH_STM32F0) += lib/stm32f0
|
||||||
dirs-$(CONFIG_MACH_STM32F1) += lib/stm32f1
|
dirs-$(CONFIG_MACH_STM32F1) += lib/stm32f1
|
||||||
dirs-$(CONFIG_MACH_STM32F2) += lib/stm32f2
|
dirs-$(CONFIG_MACH_STM32F2) += lib/stm32f2
|
||||||
|
@ -59,15 +59,12 @@ serial-src-$(CONFIG_MACH_STM32F0) := stm32/stm32f0_serial.c
|
||||||
serial-src-$(CONFIG_MACH_STM32G0) := stm32/stm32f0_serial.c
|
serial-src-$(CONFIG_MACH_STM32G0) := stm32/stm32f0_serial.c
|
||||||
serial-src-$(CONFIG_MACH_STM32H7) := stm32/stm32h7_serial.c
|
serial-src-$(CONFIG_MACH_STM32H7) := stm32/stm32h7_serial.c
|
||||||
src-$(CONFIG_SERIAL) += $(serial-src-y) generic/serial_irq.c
|
src-$(CONFIG_SERIAL) += $(serial-src-y) generic/serial_irq.c
|
||||||
src-$(CONFIG_CANSERIAL) += stm32/can.c ../lib/fast-hash/fasthash.c
|
canbus-src-y := generic/canbus.c ../lib/fast-hash/fasthash.c
|
||||||
src-$(CONFIG_CANSERIAL) += generic/canbus.c
|
canbus-src-$(CONFIG_HAVE_STM32_CANBUS) += stm32/can.c
|
||||||
src-$(CONFIG_FDCANSERIAL) += stm32/fdcan.c ../lib/fast-hash/fasthash.c
|
canbus-src-$(CONFIG_HAVE_STM32_FDCANBUS) += stm32/fdcan.c
|
||||||
src-$(CONFIG_FDCANSERIAL) += generic/canbus.c
|
src-$(CONFIG_CANSERIAL) += $(canbus-src-y)
|
||||||
src-$(CONFIG_HAVE_GPIO_HARD_PWM) += stm32/hard_pwm.c
|
src-$(CONFIG_HAVE_GPIO_HARD_PWM) += stm32/hard_pwm.c
|
||||||
|
|
||||||
dirs-$(CONFIG_CANSERIAL) += lib/fast-hash
|
|
||||||
dirs-$(CONFIG_FDCANSERIAL) += lib/fast-hash
|
|
||||||
|
|
||||||
# Binary output file rules
|
# Binary output file rules
|
||||||
target-y += $(OUT)klipper.bin
|
target-y += $(OUT)klipper.bin
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue