Jan Kamidra / TS
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TS_porting.cpp Source File

TS_porting.cpp

00001 #include "TS_porting.h"
00002 
00003 int TouchScreenPort::getADCvalue(int pin){
00004     return AnalogIn((PinName)pin).read() * 3300;
00005 }
00006 
00007 void TouchScreenPort::setDigitalPin(int pin, int dir, int value){
00008     PinDirection pDirection;
00009     if(dir == 0) pDirection = PIN_INPUT;
00010     else  pDirection = PIN_OUTPUT;
00011     DigitalInOut((PinName)pin,pDirection,PullDefault,value);
00012 }