integration/soc/add_uart: add USB CDC support (with ValentyUSB core).
This commit is contained in:
parent
76872a7afb
commit
b509df8bb6
|
@ -954,6 +954,14 @@ class LiteXSoC(SoC):
|
|||
tx_fifo_depth = fifo_depth,
|
||||
rx_fifo_depth = fifo_depth))
|
||||
|
||||
# USB CDC (with ValentyUSB core)
|
||||
elif name in ["usb_cdc"]:
|
||||
import valentyusb.usbcore.io as usbio
|
||||
import valentyusb.usbcore.cpu.cdc_eptri as cdc_eptri
|
||||
usb_pads = self.platform.request("usb")
|
||||
usb_iobuf = usbio.IoBuf(usb_pads.d_p, usb_pads.d_n, usb_pads.pullup)
|
||||
self.submodules.uart = cdc_eptri.CDCUsb(usb_iobuf)
|
||||
|
||||
# Classic UART
|
||||
else:
|
||||
self.submodules.uart_phy = uart.UARTPHY(
|
||||
|
|
Loading…
Reference in New Issue