aboutsummaryrefslogtreecommitdiff
path: root/src/Top.bs
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-09-23 14:15:37 -0500
committerNathan Ringo <nathan@remexre.com>2024-09-23 14:15:37 -0500
commit0f80a1960037ba1a7a4835f57ca100d5caf8d8ef (patch)
tree1cd75bab8db3366919f586117d09a6a07087d488 /src/Top.bs
parenteaa9e67b9540bebe980503027d4aa7e6dfd1bf31 (diff)
Start of an application.
Diffstat (limited to 'src/Top.bs')
-rw-r--r--src/Top.bs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Top.bs b/src/Top.bs
index 18802bf..9afaaab 100644
--- a/src/Top.bs
+++ b/src/Top.bs
@@ -1,7 +1,6 @@
package Top where
-import FIFOF
-import GetPut
+import App
import Uart
interface Top =
@@ -32,10 +31,7 @@ mkTop :: Module Top
mkTop =
module
uart <- mkUart (clockFreqHz / 9600)
- rules
- "recv": when True ==> do
- byte <- uart.recv.get
- uart.send.put byte
+ app <- mkApp uart.recv uart.send
interface Top
-- RS232
@@ -43,7 +39,7 @@ mkTop =
tx = uart.txPin
-- Onboard LEDs
ledR_N = uart.txPin
- ledG_N = 1
+ ledG_N = 1 - app.led
-- RGB LED driver
ledRed_N = 1
ledGrn_N = 1