Paint for the FRDM-KL25Z
Dependencies: mbed TFT_fonts SPI_TFT_ILI9341
touch.h@2:fe018965e46c, 2019-01-08 (annotated)
- Committer:
- ecowboy
- Date:
- Tue Jan 08 06:56:55 2019 +0000
- Revision:
- 2:fe018965e46c
- Parent:
- 1:33506fcfdd95
- Child:
- 3:1396bac4ae71
Point error resolved
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ecowboy | 0:42ec9a44bc24 | 1 | #include "mbed.h" |
ecowboy | 0:42ec9a44bc24 | 2 | |
ecowboy | 0:42ec9a44bc24 | 3 | |
ecowboy | 0:42ec9a44bc24 | 4 | class TouchScreen { |
ecowboy | 0:42ec9a44bc24 | 5 | private: |
ecowboy | 0:42ec9a44bc24 | 6 | PinName _yp, _ym, _xm, _xp; |
ecowboy | 0:42ec9a44bc24 | 7 | |
ecowboy | 0:42ec9a44bc24 | 8 | public: |
ecowboy | 0:42ec9a44bc24 | 9 | TouchScreen(PinName xp, PinName yp, PinName xm, PinName ym); |
ecowboy | 0:42ec9a44bc24 | 10 | int readTouch(PinName p, PinName m, PinName a, PinName i); |
ecowboy | 1:33506fcfdd95 | 11 | //bool isTouching(void); |
ecowboy | 1:33506fcfdd95 | 12 | //Point getPoint(Point p); |
ecowboy | 0:42ec9a44bc24 | 13 | }; |
ecowboy | 0:42ec9a44bc24 | 14 | |
ecowboy | 2:fe018965e46c | 15 | int map(float value, float fromSource, float toSource, float fromTarget, float toTarget); |