Libraries and Example of mbed parallel bus using I2C port expanders

Dependencies:   HDSP253X mbed PCF8574_Bus

Revision:
3:3fbfdec782f4
Parent:
2:1dab1089c332
Child:
4:745fbbd5e4e5
--- a/Testloop.h	Sat Aug 20 12:49:44 2011 +0000
+++ b/Testloop.h	Sun Aug 21 19:42:48 2011 +0000
@@ -42,6 +42,7 @@
     pc.printf("B: Test I2C Enablebus\r");        
     pc.printf("C: Test Status LEDs\r");            
     pc.printf("D: Test Brightness LEDs\r");                
+    pc.printf("E: Test Display\r");                    
     pc.printf("\r");                
 }
 
@@ -54,7 +55,7 @@
     pc.printf("Start Test!\r");
     show_LEDS();
     show_menu();
-    myled4=1;
+
     while(running) {
     
        if(pc.readable()) {
@@ -81,7 +82,7 @@
                        heartbeat_stop();
                      }
                      else {
-                       heartbeat.start();
+                       heartbeat_start();
                      };            
                      break;
 
@@ -327,7 +328,66 @@
                       command = pc.getc(); 
                       pc.printf("..Done\r");                      
                       
-                      break;   
+                      break;  
+                      
+          case 'E' :
+                      pc.printf("Test Display\r"); 
+                      pc.printf("Press any key to continue...");
+
+                      LF28A_display.cls();                      
+                      LF28A_display.putc('H');
+                      LF28A_display.putc('i');
+                      LF28A_display.putc('-');
+                      LF28A_display.putc('W');
+                      LF28A_display.putc('i');
+                      LF28A_display.putc('m');                      
+                      LF28A_display.putc('-');                      
+
+                      while(! pc.readable()) {
+                      }                      
+                      command = pc.getc(); 
+                      
+                      pc.printf("Test printf\r\n");                      
+                      
+                      LF28A_display.locate (0);                      
+                      LF28A_display.printf ("%s=%d", "Rng", 2);                      
+                      
+                      while(! pc.readable()) {
+                      }                      
+                      command = pc.getc(); 
+
+                      LF28A_display.locate (4);                      
+                      LF28A_display.printf ("    ");                      
+
+                      LF28A_display.locate (4);                      
+                      LF28A_display.printf ("%d", 123);                      
+                      
+                      while(! pc.readable()) {
+                      }                      
+                      command = pc.getc(); 
+                      
+                      LF28A_display.cls();                      
+                      LF28A_display.printf ("%s", "Hello...");                      
+
+                      while(! pc.readable()) {
+                      }                      
+                      command = pc.getc(); 
+                                            
+                      pc.printf("Test Flash\r\n");     
+                      LF28A_display.set_flash_mode(true);                                      
+                      for (int i=0; i<8; i++) {
+                        LF28A_display.set_char_flash_state(true, i);                      
+                        while(! pc.readable()) {
+                        }                      
+                        command = pc.getc(); 
+                        LF28A_display.set_char_flash_state(false, i);                                              
+                      }
+
+                      LF28A_display.set_flash_mode(false);
+                                            
+                      pc.printf("..Done\r");                      
+                      
+                      break;                                           
                               
         } //switch
       }//if