aboutsummaryrefslogtreecommitdiff
path: root/01-ctest/main.c
diff options
context:
space:
mode:
Diffstat (limited to '01-ctest/main.c')
-rw-r--r--01-ctest/main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/01-ctest/main.c b/01-ctest/main.c
new file mode 100644
index 0000000..fb7ec73
--- /dev/null
+++ b/01-ctest/main.c
@@ -0,0 +1,18 @@
+#include <stdint.h>
+
+enum {
+ DISPH = 480,
+ DISPW = 800,
+};
+
+void cstart(void)
+{
+ uint16_t * const dptr = (uint16_t *)0x14800000;
+
+ for (int y = 0; y < DISPH; y++) {
+ for (int x = 0; x < DISPW; x++) {
+ dptr[y*DISPW+x] = ((x&1)^(y&1)) ? 0 : 0xffff;
+ }
+ }
+}
+