void display_reset();
void display_update();
-void set_msg(char* newmsg) {
+void set_msg(char* newmsg, u8 wrap) {
char* dest = current_message;
/* equivalent of a string copy */
/* while (dest++ = newmsg++); */
dest++;
newmsg++;
}
+ wrap_mode = wrap;
scroll_point = 0;
display_update();
}
-extern inline void set_wrap_mode(u8 new_wrap_mode) {
- /* in theory it should be inlined anyway? */
- wrap_mode = new_wrap_mode;
+void set_char(char c, u8 pos) {
+ /* sets a single character */
+ display_buffer[pos] = c;
+ display_update();
}
void display_send_byte(char c) {
}
void display_update() {
- int i;
+ u8 i;
display_reset();
for (i=0; i < 10; i++) {
#include "types.h"
/* scrolling modes */
-#define WRAP_SCROLL_L 1 /* scroll to the left */
-#define WRAP_SCROLL_R 2 /* scroll to the right */
+#define WRAP_NONE 0 /* trailing chars get left off */
+#define WRAP_SCROLL_L 1 /* scroll to the left */
+#define WRAP_SCROLL_R 2 /* scroll to the right */
#define WRAP_ALTERNATE 3 /* alternate between text */
extern char current_message[256];
void display_init();
-void set_msg(char* newmsg);
+void set_msg(char* newmsg, u8 wrap);
+void set_char(char c, u8 pos);
void set_wrap_mode(u8 new_wrap_mode);
void display_refresh();