diff options
Diffstat (limited to 'prog/src/main.c')
-rw-r--r-- | prog/src/main.c | 11 |
1 files changed, 5 insertions, 6 deletions
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 <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) { 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; } } |