From be503b2b9b6e553b77bc71e37ee64db5ef9f6ce0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 12 Jun 2022 14:01:48 -0400 Subject: [PATCH] rp2040: Add support for USB to CANbus bridge mode Signed-off-by: Kevin O'Connor --- src/rp2040/Kconfig | 3 +++ src/rp2040/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/rp2040/Kconfig b/src/rp2040/Kconfig index 2e5f5019..37862d34 100644 --- a/src/rp2040/Kconfig +++ b/src/rp2040/Kconfig @@ -86,6 +86,9 @@ choice config RP2040_CANBUS bool "CAN bus" select CANSERIAL + config RP2040_USBCANBUS + bool "USB to CAN bus bridge" + select USBCANBUS endchoice config RP2040_CANBUS_GPIO_RX diff --git a/src/rp2040/Makefile b/src/rp2040/Makefile index f49d56ac..5bb572fb 100644 --- a/src/rp2040/Makefile +++ b/src/rp2040/Makefile @@ -22,6 +22,9 @@ src-$(CONFIG_SERIAL) += rp2040/serial.c generic/serial_irq.c src-$(CONFIG_CANSERIAL) += rp2040/can.c rp2040/chipid.c ../lib/can2040/can2040.c src-$(CONFIG_CANSERIAL) += generic/canserial.c generic/canbus.c src-$(CONFIG_CANSERIAL) += ../lib/fast-hash/fasthash.c +src-$(CONFIG_USBCANBUS) += rp2040/can.c rp2040/chipid.c ../lib/can2040/can2040.c +src-$(CONFIG_USBCANBUS) += generic/canserial.c generic/usb_canbus.c +src-$(CONFIG_USBCANBUS) += ../lib/fast-hash/fasthash.c rp2040/usbserial.c src-$(CONFIG_HAVE_GPIO_HARD_PWM) += rp2040/hard_pwm.c src-$(CONFIG_HAVE_GPIO_SPI) += rp2040/spi.c src-$(CONFIG_HAVE_GPIO_I2C) += rp2040/i2c.c