Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RPC_DigitalInDigitalOutPWMOutoverSerial by
Diff: main.cpp
- Revision:
- 4:d69dfbef9644
- Parent:
- 3:4ddd10908e46
- Child:
- 5:59421f613a13
diff -r 4ddd10908e46 -r d69dfbef9644 main.cpp
--- a/main.cpp Thu Aug 14 09:25:00 2014 +0000
+++ b/main.cpp Sat Mar 12 02:30:33 2016 +0000
@@ -3,11 +3,13 @@
/**
* This example program has been updated to use the RPC implementation in the new mbed libraries.
- * This example demonstrates using RPC over serial
+ * This example demonstrates using RPC over serial with DigitalOut, DigitalIn, and PWMOut usages
*/
//Use the RPC enabled wrapped class - see RpcClasses.h for more info
-RpcDigitalOut myled(LED4,"myled");
+RpcDigitalOut myled(LED4,"mbedled");
+RpcDigitalIn swIn(p8, "switchIn");
+RpcPwmOut led(p21, "pwmled");
Serial pc(USBTX, USBRX);
int main() {
@@ -21,4 +23,4 @@
RPC::call(buf, outbuf);
pc.printf("%s\n", outbuf);
}
-}
+}
\ No newline at end of file
