example serial interface for python and LPC11U24

Dependencies:   mbed-rpc mbed

Fork of RPC_Serial by Michael Walker

Files at this revision

API Documentation at this revision

Comitter:
MichaelW
Date:
Tue Aug 24 14:25:07 2010 +0000
Child:
1:de34af25056a
Commit message:

Changed in this revision

main.cpp 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	Tue Aug 24 14:25:07 2010 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "rpc.h"
+
+Serial pc(USBTX, USBRX);
+
+int main() {
+    Base::add_rpc_class<AnalogIn>();
+    Base::add_rpc_class<AnalogOut>();
+    Base::add_rpc_class<DigitalIn>();
+    Base::add_rpc_class<DigitalOut>();
+    Base::add_rpc_class<DigitalInOut>();
+    Base::add_rpc_class<PwmOut>();
+    Base::add_rpc_class<Timer>();
+    Base::add_rpc_class<SPI>();
+    Base::add_rpc_class<BusOut>();
+    Base::add_rpc_class<BusIn>();
+    Base::add_rpc_class<BusInOut>();
+    Base::add_rpc_class<Serial>();
+
+    char buf[256], outbuf[256];
+    while(1) {
+        pc.gets(buf, 256);
+        rpc(buf, outbuf); 
+        pc.printf("%s\n", outbuf);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Aug 24 14:25:07 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da