HTTPServer example with additional functions: * Link status indication (LED4); * Local file system (create index.htm page on MBED!); * RPC-able class (myrpc, allows remote function call that blinks LED1 N times);
Diff: myrpc.h
- Revision:
- 0:5e068c08724a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/myrpc.h Wed Dec 09 01:55:06 2009 +0000 @@ -0,0 +1,29 @@ +// myrpc.h +// +// Based on: +// http://mbed.org/projects/cookbook/svn/Servo/trunk/Servo.h +// http://mbed.org/projects/cookbook/svn/Servo/trunk/Servo.cpp + +#ifndef MYRPC_H +#define MYRPC_H + +#include "mbed.h" + +namespace mbed { + +class myrpc : public Base { +public: + myrpc(PinName pin, const char* name = NULL); + void blink(int n); + +#ifdef MBED_RPC + virtual const struct rpc_method *get_rpc_methods(); + static struct rpc_class *get_rpc_class(); +#endif // MBED_RPC + +protected: + DigitalOut _pin; +}; + +} // namespace mbed +#endif // MYRPC_H \ No newline at end of file