A RPC example usage program.
Fork of RPC_Serial by
Revision 6:cb40d6349b96, committed 2016-03-15
- Comitter:
- dhcabinian
- Date:
- Tue Mar 15 05:10:51 2016 +0000
- Parent:
- 5:59421f613a13
- Child:
- 7:d72b60abcab5
- Commit message:
- Readded Analogin and PWMout;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 15 04:28:17 2016 +0000
+++ b/main.cpp Tue Mar 15 05:10:51 2016 +0000
@@ -3,16 +3,16 @@
/**
* This example program has been updated to use the RPC implementation in the new mbed libraries.
- * This example shows the creation of the RPCDigitalOut wrapper class over the RPC interface
+ * This example shows the uses of the RPCDigitalOut wrapper class
*/
//Use the RPC enabled wrapped class - see RpcClasses.h for more info
-RpcDigitalOut led1(LED1,"led1");
+RpcDigitalOut mbedled(LED1,"mbedled");
+RpcAnalogIn sw(p8, "switch");
+RpcPwmOut led(p21, "pwmled");
Serial pc(USBTX, USBRX);
int main() {
- //Allows RPC to create objects of type RPCDigitalOut via the RPC Interface
- RPC::add_rpc_class<RpcDigitalOut>();
char buf[256], outbuf[256];
while(1) {
