![](/media/cache/profiles/de713869d1db126cff30a1fc0e990962.50x50_q85.jpg)
mbed RPC_Serial for LabVIEW interface: http://mbed.org/cookbook/Interfacing-with-LabVIEW http://mbed.org/cookbook/Interfacing-Using-RPC Steps: *Compile RPC_Serial main *Copy bit file to mbed flash and reset *Run examples in LabVIEW
Revision 0:3ffd66df9efb, committed 2012-04-21
- Comitter:
- harrisjunaid
- Date:
- Sat Apr 21 00:47:46 2012 +0000
- 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 |
diff -r 000000000000 -r 3ffd66df9efb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Apr 21 00:47:46 2012 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "rpc.h" +Serial pc(USBTX, USBRX); +int main() { + // setup the classes that can be created dynamically + 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>(); + // receive commands, and send back the responses + char buf[256], outbuf[256]; + while(1) { + pc.gets(buf, 256); + rpc(buf, outbuf); + pc.printf("%s\n", outbuf); + } +}
diff -r 000000000000 -r 3ffd66df9efb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Apr 21 00:47:46 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da