Optimaze with new mbed os for study

Dependencies:   TS_DISCO_F746NG BSP_DISCO_F746NG Graphics

Revision:
4:66f13188c26b
Parent:
2:8db224cc1fcb
--- a/PointingDevice/TouchScreen.h	Sat Nov 05 15:36:59 2016 +0000
+++ b/PointingDevice/TouchScreen.h	Sat Nov 05 20:24:59 2016 +0000
@@ -29,13 +29,34 @@
     /// <summary>
     /// Initializes a new instance of the <see cref="TouchScreen"/> class.
     /// </summary>
-    TouchScreen(RK043FN48H* display);
+    TouchScreen(Display* display);
 
     /// <summary>
     /// Finalizes an instance of the <see cref="TouchScreen"/> class.
     /// </summary>
     ~TouchScreen();
     
-    pPoint virtual DetectTouch(Window screen) = 0;
+  /**
+    * @brief  Initializes and configures the touch screen functionalities and 
+    *         configures all necessary hardware resources (GPIOs, I2C, clocks..).
+    */
+    void Init();
+         
+    /// <summary>
+    /// Detect a touch.
+    /// Returns a pointer to tpoch point position or NULL if touch was not detected. 
+    /// </summary>
+    pPoint DetectTouch();
+    
+    Point touchPoint;
+    
+private:
+    /// Maximum X size of the TS area on LCD
+    uint16_t _width;
+    
+    /// Maximum Y size of the TS area on LCD
+    uint16_t _height;
+    
+    TS_StateTypeDef tsState;
 };