A demonstration of RPC object instantiation.
Fork of RPC_DigitalInDigitalOutPWMOutoverSerial by
Revision 4:d69dfbef9644, committed 2016-03-12
- Comitter:
- dhcabinian
- Date:
- Sat Mar 12 02:30:33 2016 +0000
- Parent:
- 3:4ddd10908e46
- Child:
- 5:59421f613a13
- Commit message:
- RPC example of Digital In, Digital Out, and PWM Out over serial.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed-rpc.lib | Show annotated file Show diff for this revision Revisions of this file |
--- 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
--- a/mbed-rpc.lib Thu Aug 14 09:25:00 2014 +0000 +++ b/mbed-rpc.lib Sat Mar 12 02:30:33 2016 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/teams/mbed/code/mbed-rpc/#4490a0d9cb2a +https://mbed.org/teams/mbed/code/mbed-rpc/#3b049dde55d7
