From e945c80a6ceaef501350de49bf647ae8539d1cbb Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Mon, 20 May 2024 16:48:55 +0200 Subject: reset synchronizer --- prog/src/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'prog/src/main.c') diff --git a/prog/src/main.c b/prog/src/main.c index 082172d..a31196f 100644 --- a/prog/src/main.c +++ b/prog/src/main.c @@ -1,13 +1,12 @@ #include -//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) { while (1) { - for (int i = 0; i < 32; ++i) { - *((volatile uint32_t *)0x00000004) = i; - for (int j = 0; j < 1024 * 128; ++j); - } + if (*io_in) *io_out = 0b00000; + else *io_out = 0b11111; } } -- cgit v1.2.3