tools: rename litex_crossover poc to litex_crossover_uart, remove from setup for...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 25 May 2020 08:19:16 +0000 (10:19 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 25 May 2020 08:19:16 +0000 (10:19 +0200)
litex/tools/litex_crossover.py [deleted file]
litex/tools/litex_crossover_uart.py [new file with mode: 0755]
setup.py

diff --git a/litex/tools/litex_crossover.py b/litex/tools/litex_crossover.py
deleted file mode 100755 (executable)
index de44c49..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-# This file is Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
-# License: BSD
-
-# Proof of Concept to use the crossover UART with lxterm over a bridge.
-
-import os
-import pty
-import threading
-
-from litex import RemoteClient
-
-wb = RemoteClient()
-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()
diff --git a/litex/tools/litex_crossover_uart.py b/litex/tools/litex_crossover_uart.py
new file mode 100755 (executable)
index 0000000..de44c49
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+
+# This file is Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
+# License: BSD
+
+# Proof of Concept to use the crossover UART with lxterm over a bridge.
+
+import os
+import pty
+import threading
+
+from litex import RemoteClient
+
+wb = RemoteClient()
+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()
index a8656a5936fe51f7489c5d52618e2ced49e38333..7429e92035a7e245dabe94ec479ecf364638c8aa 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -39,14 +39,12 @@ setup(
             "litex_term=litex.tools.litex_term:main",
             "litex_server=litex.tools.litex_server:main",
             "litex_sim=litex.tools.litex_sim:main",
-            "litex_crossover=litex.tools.litex_crossover:main"
             "litex_read_verilog=litex.tools.litex_read_verilog:main",
             "litex_simple=litex.boards.targets.simple:main",
             # short names
             "lxterm=litex.tools.litex_term:main",
             "lxserver=litex.tools.litex_server:main",
             "lxsim=litex.tools.litex_sim:main",
-            "lxcrossover=litex.tools.litex_crossover:main",
         ],
     },
 )