![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
projets de S3 s4 2021
Dependencies: mbed TFT_fonts SPI_TFT_ILI9341
touch.h@8:eb61367f53ce, 2020-10-18 (annotated)
- Committer:
- dujardin
- Date:
- Sun Oct 18 16:05:21 2020 +0000
- Revision:
- 8:eb61367f53ce
- Parent:
- 6:13d0de9e679c
version avec spi
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 | 0:42ec9a44bc24 | 12 | }; |
ecowboy | 0:42ec9a44bc24 | 13 | |
ecowboy | 2:fe018965e46c | 14 | int map(float value, float fromSource, float toSource, float fromTarget, float toTarget); |