tools: deprecate litex_crossover_uart (now directly integrated in litex_term).
This commit is contained in:
parent
feeb2f72e0
commit
1976fd4b90
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
#
|
||||
# This file is part of LiteX.
|
||||
#
|
||||
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
# Proof of Concept to use the crossover UART with lxterm over a bridge.
|
||||
|
||||
import os
|
||||
import pty
|
||||
import threading
|
||||
import argparse
|
||||
|
||||
from litex import RemoteClient
|
||||
|
||||
parser = argparse.ArgumentParser(description="LiteX Crossover UART bridge tool")
|
||||
parser.add_argument("--host", default="localhost", help="Host IP address")
|
||||
parser.add_argument("--base-address", default="0x00000000", help="Wishbone base address")
|
||||
args = parser.parse_args()
|
||||
|
||||
wb = RemoteClient(host=args.host, base_address=int(args.base_address, 0))
|
||||
wb.open()
|
||||
|
||||
# # #
|
||||
|
||||
def pty2crossover(m):
|
||||
while True:
|
||||
r = os.read(m, 1)
|
||||
wb.regs.uart_xover_rxtx.write(ord(r))
|
||||
|
||||
def crossover2pty(m):
|
||||
while True:
|
||||
if wb.regs.uart_xover_rxempty.read() == 0:
|
||||
r = wb.regs.uart_xover_rxtx.read()
|
||||
os.write(m, bytes(chr(r).encode("utf-8")))
|
||||
|
||||
m, s = pty.openpty()
|
||||
print("LiteX Crossover UART created: {}".format(os.ttyname(s)))
|
||||
|
||||
pty2crossover_thread = threading.Thread(target=pty2crossover, args=[m])
|
||||
pty2crossover_thread.start()
|
||||
|
||||
crossover2pty(m)
|
||||
|
||||
# # #
|
||||
|
||||
wb.close()
|
1
setup.py
1
setup.py
|
@ -40,7 +40,6 @@ setup(
|
|||
"litex_server=litex.tools.litex_server:main",
|
||||
"litex_cli=litex.tools.litex_client:main",
|
||||
"litex_jtag_uart=litex.tools.litex_jtag_uart:main",
|
||||
"litex_crossover_uart=litex.tools.litex_crossover_uart:main",
|
||||
"litex_sim=litex.tools.litex_sim:main",
|
||||
"litex_read_verilog=litex.tools.litex_read_verilog:main",
|
||||
"litex_simple=litex.boards.targets.simple:main",
|
||||
|
|
Loading…
Reference in New Issue