Resistive TouchScreen e.g. for MCUFRIEND Display Shields
Dependents: TFT_Touch_botao_v1 TFT_Touch_exemplo5_git_touch TESTE_1 TFT_Touch_exemplo6_git_touch_button_3_ ... more
Diff: TouchScreen_kbv_mbed.h
- Revision:
- 1:849734501e5a
- Parent:
- 0:84f0f29e4695
--- a/TouchScreen_kbv_mbed.h Mon Apr 26 15:15:38 2021 +0000 +++ b/TouchScreen_kbv_mbed.h Mon Apr 26 16:27:29 2021 +0000 @@ -20,8 +20,11 @@ class TouchScreen_kbv { public: +#if defined(__MBED__) TouchScreen_kbv(PinName xp, PinName yp, PinName xm, PinName ym, uint16_t rx = 0); - +#else + TouchScreen_kbv(uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym, uint16_t rx = 0); +#endif // bool isTouching(void); uint16_t pressure(void); int readTouchY(); @@ -30,9 +33,14 @@ int16_t pressureThreshhold; private: +#if defined(__MBED__) uint16_t analogRead(PinName p); void pinModeVal(PinName p, uint8_t mode, uint8_t val); PinName _yp, _ym, _xm, _xp; +#else + void pinModeVal(uint8_t p, uint8_t mode, uint8_t val); + uint8_t _yp, _ym, _xm, _xp; +#endif uint16_t _rxplate; };