A RPC example usage program.
Fork of RPC_Serial by
Diff: main.cpp
- Revision:
- 6:cb40d6349b96
- Parent:
- 5:59421f613a13
- Child:
- 7:d72b60abcab5
--- 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) {
