Optimaze with new mbed os for study

Dependencies:   TS_DISCO_F746NG BSP_DISCO_F746NG Graphics

Revision:
4:66f13188c26b
Parent:
3:732f7144ec81
--- a/RadarDemo/RadarDemo.h	Sat Nov 05 15:36:59 2016 +0000
+++ b/RadarDemo/RadarDemo.h	Sat Nov 05 20:24:59 2016 +0000
@@ -39,9 +39,18 @@
 
 #pragma once
 
-#include "TS_DISCO_F746NG.h"
 #include "Radar.h"
 #include "RadarTimer.h"
+#include "TouchScreen.h"
+
+typedef enum EUserInputType
+{
+    None = 0,
+    SingleTouch =1,
+    MultiplyTouch = 2,
+    ButtonPressed = 3
+} UserInputType;
+
 
 /// <summary>
 /// Radar display demo class.
@@ -105,11 +114,10 @@
     void AddSampleTargets(int count);
 
     /// <summary>
-    /// Detect a touch on the screen in given area.
-    /// Returns true if the touch has been detected.
+    /// Detect a touch type on the screen in given area.
     /// </summary>
     /// <param name="screen">The screen window coordinates.</param>
-    bool DetectTouch(Window screen);
+    UserInputType CheckUserInput(Window screen);
     
     RadarTimer timer;
 
@@ -119,7 +127,11 @@
     float lastBeamAngle;
 
     bool _needsRedraw;
-
-    TS_DISCO_F746NG ts;
+    
+    TouchScreen* _ts;
+    uint32_t _buttonPressTime;
+    bool TouchScreenDisabled();  
+    void SetTouchScreenTimeout();  
+    
 };