RPC over Serial with read line interrupt tested on LPC1768 and mac minicom terminal. Baudrate 115200

Dependencies:   mbed-rpc-stmfork mbed-src

Fork of rpc_over_serial by Suga koubou

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Fri Sep 27 05:26:03 2013 +0000
Child:
1:ae55f51ee284
Commit message:
1st build

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 27 05:26:03 2013 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "mbed_rpc.h"
+
+RPC rpc();
+Serial pc(USBTX, USBRX);
+
+int main() {
+    char buf[256], outbuf[256];
+
+    // setup the classes that can be created dynamically
+//    RPC::add_rpc_class<RpcAnalogIn>();
+//    RPC::add_rpc_class<RpcAnalogOut>();
+    RPC::add_rpc_class<RpcDigitalIn>();
+    RPC::add_rpc_class<RpcDigitalOut>();
+    RPC::add_rpc_class<RpcDigitalInOut>();
+    RPC::add_rpc_class<RpcPwmOut>();
+    RPC::add_rpc_class<RpcTimer>();
+    RPC::add_rpc_class<RpcSPI>();
+    RPC::add_rpc_class<RpcSerial>();
+
+    // receive commands, and send back the responses
+    while(1) {
+        pc.gets(buf, 256);
+        RPC::call(buf, outbuf); 
+        pc.printf("%s\r\n", outbuf);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rpc.lib	Fri Sep 27 05:26:03 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rpc/#4490a0d9cb2a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Sep 27 05:26:03 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file