(no commit message)
authorlkcl <lkcl@web>
Sun, 28 Nov 2021 23:47:02 +0000 (23:47 +0000)
committerIkiWiki <ikiwiki.info>
Sun, 28 Nov 2021 23:47:02 +0000 (23:47 +0000)
docs/pinmux.mdwn

index f72dd3c98ff991da632c290fd261ba5fc55fcd75..455f4a19c2b703224b9fcaff268df4b53442f5f2 100644 (file)
@@ -302,6 +302,23 @@ is then taken care of **automatically and transparently**, but to
 all intents and purposes looking exactly like a Platform even to
 the extent of taking the exact same list of Resources.
 
+    class Blinker(Elaboratable):
+      def __init__(self, resources):
+          self.jtag = JTAG(resources)
+
+      def elaborate(self, platform):
+          m = Module()
+          m.submodules.jtag = jtag = self.jtag
+
+          # get the UART resource, mess with the output tx
+          uart = jtag.request('uart')
+          intermediary = Signal()
+          m.d.comb += uart.tx.eq(~intermediary) # invert, for fun
+          m.d.comb += intermediary.eq(uart.rx) # pass rx to tx
+
+          return jtag.boundary_elaborate(m, platform)
+
+
 ## Clock synchronisation
 
 Take for example USB ULPI: