+void scroll_msg(char* newmsg) {
+ /* puts a message on display and does not return until the message has
+ * scrolled across once.
+ */
+ set_msg(newmsg, WRAP_SCROLL);
+ have_scrolled = 0;
+ while (!have_scrolled);
+}
+
+void display_shift() {
+ /* update the display for WRAP_SCROLL or WRAP_ALTERNATE modes */
+ switch (wrap_mode) {
+ case WRAP_SCROLL:
+ case WRAP_ALTERNATE:
+ scroll_point++;
+ if (scroll_point >= msg_length) {
+ scroll_point = 0;
+ have_scrolled = 1;
+ }
+ display_update();
+ break;
+ }
+}
+
+void set_char(char c, u8 pos) {
+ /* sets a single character */
+ display_buffer[pos] = c;
+ display_update();
+}
+
+void display_send_byte(char c) {
+ bset_misc_output(A3800_DISPLAY_WRITE); /* enable the display clock */
+
+ _io_ports[M6811_SPDR] = c; /* load SPI with byte */
+ while(!(_io_ports[M6811_SPDR]&M6811_SPIE)); /* wait for completion */
+ _io_ports[M6811_SPDR]; /* SPDR read to clear SPIE flag */