From 762043c23a6d8025a84a36c374632d490fba35f9 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Fri, 20 Sep 2024 08:47:45 -0500 Subject: Fiddling with the UART RX. --- src/TopSim.bs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/TopSim.bs') diff --git a/src/TopSim.bs b/src/TopSim.bs index 93fef14..0b77d3b 100644 --- a/src/TopSim.bs +++ b/src/TopSim.bs @@ -12,12 +12,9 @@ mkTopSim = uart <- mkUart 1 rules - when True ==> do - timer := timer + 1 - when (timer == 0x00) ==> uart.send.put 0x81 - when (timer == 0x01) ==> uart.send.put 0x18 - when (timer == 0x02) ==> uart.send.put 0x81 - when (timer == 0x40) ==> do - $finish + when True ==> timer := timer + 1 + when True ==> uart.rxPin (1 - uart.txPin) + when (timer == 0x00) ==> uart.send.put 0x6a + when (timer == 0x40) ==> $finish -- vim: set ft=haskell : -- cgit v1.2.3