Commits

Trammell Hudson committed fc60665 Draft

Add saccade test

Comments (0)

Files changed (1)

 }
 
 
+static const char strings[][8] = {
+	"TESTTEST",
+	"FOOBAR!!",
+	"NYC RESI",
+	"STOR NYC",
+};
+
+static void
+saccade(void)
+{
+	const char * s = strings[ms & 3];
+
+	lcd_write(CHAR_RAM | 0, s[0]);
+	lcd_write(CHAR_RAM | 1, s[1]);
+	lcd_write(CHAR_RAM | 2, s[2]);
+	lcd_write(CHAR_RAM | 3, s[3]);
+	lcd_write(CHAR_RAM | 4, s[4]);
+	lcd_write(CHAR_RAM | 5, s[5]);
+	lcd_write(CHAR_RAM | 6, s[6]);
+	lcd_write(CHAR_RAM | 7, s[7]);
+	
+}
+
 int
 main(void)
 {
 	uint8_t line_offset = 0;
 	uint8_t last_button = 0;
 	uint8_t mode = 1;
-	const uint8_t NUM_MODES = 2;
+	const uint8_t NUM_MODES = 3;
 	const uint8_t timeout = 1;
 
 	while (1)
 			lcd_write(0x10, 0x00 | bright); // normal operation
 		}
 
+		if (mode == 2)
+		{
+			saccade();
+		}
+
 		if (bit_is_clear(TIFR0, OCF0A))
 			continue;
 		sbi(TIFR0, OCF0A); // reset the bit