-inline void set_wrap_mode(u8 new_wrap_mode) {
- /* in theory it should be inlined anyway? */
- wrap_mode = new_wrap_mode;
+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();