
Test access to PA0 on MDot
Dependencies: mbed
Diff: Test.cpp
- Revision:
- 0:c0f9993af516
- Child:
- 1:879ca9867ac9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Test.cpp Thu Oct 20 10:12:03 2016 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "MTSLog.h" + +DigitalInOut myPort(PA_0); +//DigitalOut myPort(PA_0); +//DigitalIn myPort(PA_0); +Serial debug(USBTX, USBRX); + +main() +{ + int i; + debug.baud(115200); + mts::MTSLog::setLogLevel(mts::MTSLog::INFO_LEVEL); + for(i=0; i<500; i++) + { + + myPort.output(); +// myPort = 1; +// wait(500); + myPort = 0; + wait(500); + myPort.input(); + i = myPort; + logInfo("PA0 value: %d", i); + } +} + \ No newline at end of file