aboutsummaryrefslogtreecommitdiff
path: root/prog/src/main.c
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-20 12:18:20 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-20 12:18:20 +0200
commit142510b8325b9ef89bd3e22463f36c3caa2815de (patch)
tree0668f163046a43e98e8345c6bf96e97a652341c9 /prog/src/main.c
parent407a3ff54a35cbe99ba6ac743376e9b0e9718fc1 (diff)
downloadriscv_cpu-142510b8325b9ef89bd3e22463f36c3caa2815de.tar.gz
riscv_cpu-142510b8325b9ef89bd3e22463f36c3caa2815de.zip
io
Diffstat (limited to 'prog/src/main.c')
-rw-r--r--prog/src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/prog/src/main.c b/prog/src/main.c
index 62b802b..082172d 100644
--- a/prog/src/main.c
+++ b/prog/src/main.c
@@ -1,13 +1,13 @@
#include <stdint.h>
-volatile uint32_t *io_in = (volatile uint32_t *)0x00000000;
-volatile uint32_t *io_out = (volatile uint32_t *)0x00000004;
+//volatile uint32_t *io_in = (volatile uint32_t *)0x00000000;
+//volatile uint32_t *io_out = (volatile uint32_t *)0x00000004;
int main(void) {
- *io_out = 0;
while (1) {
for (int i = 0; i < 32; ++i) {
- *io_out = i;
+ *((volatile uint32_t *)0x00000004) = i;
+ for (int j = 0; j < 1024 * 128; ++j);
}
}
}