projets de S3 s4 2021
Dependencies: mbed TFT_fonts SPI_TFT_ILI9341
touch.h@1:33506fcfdd95, 2019-01-07 (annotated)
- Committer:
- ecowboy
- Date:
- Mon Jan 07 16:15:52 2019 +0000
- Revision:
- 1:33506fcfdd95
- Parent:
- 0:42ec9a44bc24
- Child:
- 2:fe018965e46c
Struct Point Change
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 | #define RXPLATE 350 |
ecowboy | 0:42ec9a44bc24 | 4 | #define Q 1024 //10 bit TSC Resolution |
ecowboy | 0:42ec9a44bc24 | 5 | #define PRESSURE 10 |
ecowboy | 0:42ec9a44bc24 | 6 | |
ecowboy | 0:42ec9a44bc24 | 7 | |
ecowboy | 0:42ec9a44bc24 | 8 | class TouchScreen { |
ecowboy | 0:42ec9a44bc24 | 9 | private: |
ecowboy | 0:42ec9a44bc24 | 10 | PinName _yp, _ym, _xm, _xp; |
ecowboy | 0:42ec9a44bc24 | 11 | |
ecowboy | 0:42ec9a44bc24 | 12 | public: |
ecowboy | 0:42ec9a44bc24 | 13 | TouchScreen(PinName xp, PinName yp, PinName xm, PinName ym); |
ecowboy | 0:42ec9a44bc24 | 14 | int readTouch(PinName p, PinName m, PinName a, PinName i); |
ecowboy | 1:33506fcfdd95 | 15 | //bool isTouching(void); |
ecowboy | 1:33506fcfdd95 | 16 | //Point getPoint(Point p); |
ecowboy | 0:42ec9a44bc24 | 17 | }; |
ecowboy | 0:42ec9a44bc24 | 18 | |
ecowboy | 0:42ec9a44bc24 | 19 | int map(int value, int fromSource, int toSource, int fromTarget, int toTarget); |