diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-09-20 08:47:45 -0500 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-09-20 08:47:45 -0500 |
commit | 762043c23a6d8025a84a36c374632d490fba35f9 (patch) | |
tree | 6b94eeb2f620ab725cde377ed3be0cd2294e109b /src/TopSim.bs | |
parent | d202daead0f05ecb60580fa7be2f23df8c4542fc (diff) |
Fiddling with the UART RX.
Diffstat (limited to 'src/TopSim.bs')
-rw-r--r-- | src/TopSim.bs | 11 |
1 files changed, 4 insertions, 7 deletions
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 : |