1 /* Print a friendly message to the serial console on display 2. */ 2 3 #include "spimconsreg.h" 4 5 #define IOBASE 0xa2000000 6 #define IS_READY(ctrl) (((*(ctrl)) & CTL_RDY) != 0) 7 entry(void)8void entry(void) 9 { 10 char *p = "Hello, world!\n"; 11 volatile long *data_reg = (long *) (IOBASE + DISPLAY_2_DATA); 12 volatile long *control_reg = (long *) (IOBASE + DISPLAY_2_CONTROL); 13 14 while (*p != '\0') 15 { 16 do 17 { 18 0; 19 } 20 while (!IS_READY(control_reg)); 21 *data_reg = (long) *p++; 22 } 23 } 24