rp2040: Add support for USB to CANbus bridge mode

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-06-12 14:01:48 -04:00
parent a831254e83
commit be503b2b9b
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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