projets de S3 s4 2021
Dependencies: mbed TFT_fonts SPI_TFT_ILI9341
touch.h@5:80791250acb2, 2019-01-10 (annotated)
- Committer:
- ecowboy
- Date:
- Thu Jan 10 04:31:29 2019 +0000
- Revision:
- 5:80791250acb2
- Parent:
- 4:87b40e5986e7
- Child:
- 6:13d0de9e679c
Final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ecowboy | 0:42ec9a44bc24 | 1 | #include "mbed.h" |
ecowboy | 3:1396bac4ae71 | 2 | #include "stdio.h" |
ecowboy | 5:80791250acb2 | 3 | |
ecowboy | 0:42ec9a44bc24 | 4 | |
ecowboy | 0:42ec9a44bc24 | 5 | class TouchScreen { |
ecowboy | 4:87b40e5986e7 | 6 | |
ecowboy | 3:1396bac4ae71 | 7 | PinName yp, ym, xm, xp; |
ecowboy | 0:42ec9a44bc24 | 8 | |
ecowboy | 0:42ec9a44bc24 | 9 | public: |
ecowboy | 0:42ec9a44bc24 | 10 | TouchScreen(PinName xp, PinName yp, PinName xm, PinName ym); |
ecowboy | 4:87b40e5986e7 | 11 | int readTouch(PinName a, PinName i, PinName n, PinName m); |
ecowboy | 1:33506fcfdd95 | 12 | //bool isTouching(void); |
ecowboy | 1:33506fcfdd95 | 13 | //Point getPoint(Point p); |
ecowboy | 0:42ec9a44bc24 | 14 | }; |
ecowboy | 0:42ec9a44bc24 | 15 | |
ecowboy | 2:fe018965e46c | 16 | int map(float value, float fromSource, float toSource, float fromTarget, float toTarget); |