t

Dependencies:   DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos

Fork of DMSupport by Embedded Artists

Revision:
10:1ac4b213f0f7
Parent:
9:a33326afd686
Child:
17:4ea2509445ac
--- a/DMBoard.h	Thu Dec 11 18:23:07 2014 +0000
+++ b/DMBoard.h	Fri Dec 19 09:03:25 2014 +0100
@@ -32,8 +32,6 @@
 #endif
 #if defined(DM_BOARD_USE_DISPLAY)
   #include "Display.h"
-#endif
-#if defined(DM_BOARD_USE_TOUCH)
   #include "TouchPanel.h"
 #endif
 
@@ -62,11 +60,13 @@
     };
   
     enum BoardError {
-        Ok            =       0,
-        MemoryError   =       1,
-        SpifiError    =       1,
-        DisplayError  =       2,
-        TouchError    =       3,
+        Ok                =       0,
+        MemoryError,
+        SpifiError,
+        DisplayError,
+        TouchError,
+        BiosInvalidError,
+        BiosVersionError,
     };
     
     /** Get the only instance of the DMBoard
@@ -115,23 +115,22 @@
      */
     bool buttonPressed();
     
-#if defined(DM_BOARD_USE_TOUCH)
+#if defined(DM_BOARD_USE_DISPLAY)
     /** Returns the TouchPanel interface
      *
      *  @returns
      *       The touch panel
      */
-    TouchPanel* touchPanel() { return _touch; }
-#endif
-#if defined(DM_BOARD_USE_DISPLAY)
+    TouchPanel* touchPanel();
+
     /** Returns the Display interface
      *
      *  @returns
      *       The display
      */
-    Display* display() { return &(Display::instance()); }
+    Display* display();
 
-    friend class Display;
+    friend class BiosDisplayAndTouch;
 #endif
     /** Returns the logger interface
      *
@@ -143,6 +142,8 @@
 private:
 
     bool _initialized;
+    uint8_t* _conf;
+    uint32_t _confSize;
 
 #if defined(DM_BOARD_USE_MCI_FS)
     MCIFileSystem _mcifs;
@@ -150,9 +151,6 @@
 #if defined(DM_BOARD_USE_QSPI_FS)
     QSPIFileSystem _qspifs;
 #endif
-#if defined(DM_BOARD_USE_TOUCH)
-    TouchPanel* _touch;
-#endif
 
     PwmOut _buzzer;
     DigitalIn _button;