Optimisation tweaks
[uccvend-snackrom.git] / ROM2 / display_basic.c
index e7cb449..2849696 100644 (file)
@@ -15,11 +15,12 @@ void display_reset();
 
 void set_msg(char newmsg[11]) {
        int i;
-       display_reset();
+       //display_reset();
        spi_enable();
        for (i=0; i < 10; i++) {
                if (newmsg[i] == 0) break;
        }
+       display_send_byte(0xaf); // reset ptr to start
        for (i--; i >= 0; i--) {
                display_send_byte(newmsg[i]&0x7f);
        }
@@ -34,10 +35,9 @@ void display_send_byte(char c) {
        _io_ports[M6811_SPDR];                      /* SPDR read to clear SPIF flag */
 
        bclr_misc_output(A3800_DISPLAY_WRITE);  /* disable the display clock */
-       delay(1); /* guarantee t_BUSY (40us) */
 }
 
-#define DISPLAY_DELAY  100 /* ms to delay between ops - could be tweaked */
+#define DISPLAY_DELAY  20 /* ms to delay between ops - could be tweaked */
 void display_reset() {
        /* lower the reset line for a while */
        bclr((void*)&_io_ports[M6811_PORTA], PORTA_DISP_RESET);

UCC git Repository :: git.ucc.asn.au