A controller for a 5 wire resistive touch screen

Revision:
4:ab2e56595286
Parent:
3:710534c5a240
--- a/TouchController.hpp	Fri Sep 16 02:50:22 2016 +0000
+++ b/TouchController.hpp	Thu Sep 22 22:38:32 2016 +0200
@@ -24,7 +24,7 @@
 class TouchController
 {
 public:
-  TouchController(PinName ur, PinName lr,PinName s, PinName ul, PinName ll,  int num_of_samples = 5);
+  TouchController(PinName ur, PinName lr,PinName s, PinName ul, PinName ll,  int num_of_samples = 5, int settle = 100);
 
   int TouchDetected();
 
@@ -35,8 +35,9 @@
   float GetY();
 
   void Calibrate(float t[3][2], float d[3][2]);
-  
-  uint32_t settle;
+
+  void SetSettleTime(int settle);
+
 private:
   DigitalInOut _UR;
   DigitalInOut _LR;
@@ -44,6 +45,8 @@
   DigitalInOut _UL;
   DigitalInOut _LL;
 
+  uint32_t _settle;
+
   static const char DETECT = 1;
   static const char X = 2;
   static const char Y = 3;