TS library is for the 4-wire resistive Touch Screen (without an interface) which is usually included on TFT LCD like are MCUFriend displays.
TS_porting.cpp
- Committer:
- JohnnyK
- Date:
- 2021-01-17
- Revision:
- 1:ca8fdb4d4afc
- Parent:
- 0:f2fda7f69e5a
File content as of revision 1:ca8fdb4d4afc:
#include "TS_porting.h" int TouchScreenPort::getADCvalue(int pin){ return AnalogIn((PinName)pin).read() * 3300; } void TouchScreenPort::setDigitalPin(int pin, int dir, int value){ PinDirection pDirection; if(dir == 0) pDirection = PIN_INPUT; else pDirection = PIN_OUTPUT; DigitalInOut((PinName)pin,pDirection,PullDefault,value); }