summaryrefslogtreecommitdiffstats
path: root/sw/z80/tests/pio/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sw/z80/tests/pio/main.c')
-rw-r--r--sw/z80/tests/pio/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/z80/tests/pio/main.c b/sw/z80/tests/pio/main.c
new file mode 100644
index 0000000..4b0bcdb
--- /dev/null
+++ b/sw/z80/tests/pio/main.c
@@ -0,0 +1,12 @@
+#include "pio.h"
+
+void main(void)
+{
+ uint8_t j = 0;
+
+ pio_set_mode(PIO_A, PIO_MODE_BYTE_OUT, 0);
+
+ while (1) {
+ pio_write(PIO_A, j++);
+ }
+}