From e35b89c097ff1a5a8446dee7037ff51eda147b15 Mon Sep 17 00:00:00 2001 From: lkcl Date: Sun, 28 Nov 2021 21:53:06 +0000 Subject: [PATCH] --- docs/pinmux.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/pinmux.mdwn b/docs/pinmux.mdwn index f45e3addb..b1e0f17ab 100644 --- a/docs/pinmux.mdwn +++ b/docs/pinmux.mdwn @@ -237,3 +237,15 @@ An HDL Module may now be created, which, if given a platform instance during elaboration, may request a UART (caveat below): + from nmigen import Elaboratable, Module, Signal + + class Blinker(Elaboratable): + def elaborate(self, platform): + m = Module() + # get the UART resource, mess with the output tx + uart = platform.request('uart') + intermediary = Signal() + m.d.comb += uart.tx.eq(intermediary) + m.d.comb += intermediary.eq(uart.rx) + + return m -- 2.30.2