litex/misoclib/com/uart/phy/__init__.py

9 lines
324 B
Python
Raw Normal View History

2015-03-06 04:19:29 -05:00
def UARTPHY(pads, *args, **kwargs):
# Autodetect PHY
if hasattr(pads, "source_stb"):
from misoclib.com.uart.phy.sim import UARTPHYSim
return UARTPHYSim(pads, *args, **kwargs)
else:
from misoclib.com.uart.phy.serial import UARTPHYSerial
return UARTPHYSerial(pads, *args, **kwargs)