A controller for a 5 wire resistive touch screen
Diff: TouchController.hpp
- Revision:
- 2:d0930962a3bb
- Parent:
- 1:ed8485a78c6a
- Child:
- 3:710534c5a240
--- a/TouchController.hpp Thu Sep 15 15:38:12 2016 +0200 +++ b/TouchController.hpp Fri Sep 16 04:36:15 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, uint32_t settle = 80); + TouchController(PinName ur, PinName lr,PinName s, PinName ul, PinName ll, int num_of_samples = 5); int TouchDetected(); @@ -42,14 +42,18 @@ DigitalInOut _UL; DigitalInOut _LL; - static const char DETECT_MODE = 1; - static const char X_MODE = 2; - static const char Y_MODE = 3; + static const char DETECT = 1; + static const char X = 2; + static const char Y = 3; - float A,B,C,D,E,F; + float A; + float B; + float C; + float D; + float E; + float F; - int _samples; - uint32_t _settle; + int n_samples; void ConfigPins(char mode); float MeasureS();