1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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; } } }