Development mbed library for MAX32630FTHR
Dependents: blinky_max32630fthr
tools/data/rpc/class.cpp@3:1198227e6421, 2016-12-16 (annotated)
- Committer:
- switches
- Date:
- Fri Dec 16 16:27:57 2016 +0000
- Revision:
- 3:1198227e6421
- Parent:
- 0:5c4d7b2438d3
Changed ADC scale for MAX32625 platforms to 1.2V full scale to match MAX32630 platforms
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
switches | 0:5c4d7b2438d3 | 1 | class Rpc{{name}} : public RPC { |
switches | 0:5c4d7b2438d3 | 2 | public: |
switches | 0:5c4d7b2438d3 | 3 | Rpc{{name}}({{cons_proto}}) : RPC(name), o({{cons_call}}) {} |
switches | 0:5c4d7b2438d3 | 4 | |
switches | 0:5c4d7b2438d3 | 5 | {{methods}} |
switches | 0:5c4d7b2438d3 | 6 | |
switches | 0:5c4d7b2438d3 | 7 | virtual const struct rpc_method *get_rpc_methods() { |
switches | 0:5c4d7b2438d3 | 8 | static const rpc_method rpc_methods[] = { |
switches | 0:5c4d7b2438d3 | 9 | {{rpc_methods}}, |
switches | 0:5c4d7b2438d3 | 10 | RPC_METHOD_SUPER(RPC) |
switches | 0:5c4d7b2438d3 | 11 | }; |
switches | 0:5c4d7b2438d3 | 12 | return rpc_methods; |
switches | 0:5c4d7b2438d3 | 13 | } |
switches | 0:5c4d7b2438d3 | 14 | static struct rpc_class *get_rpc_class() { |
switches | 0:5c4d7b2438d3 | 15 | static const rpc_function funcs[] = { |
switches | 0:5c4d7b2438d3 | 16 | {"new", rpc_function_caller<const char*, {{cons_type}}, &RPC::construct<Rpc{{name}}, {{cons_type}}> >}, |
switches | 0:5c4d7b2438d3 | 17 | RPC_METHOD_END |
switches | 0:5c4d7b2438d3 | 18 | }; |
switches | 0:5c4d7b2438d3 | 19 | static rpc_class c = {"{{name}}", funcs, NULL}; |
switches | 0:5c4d7b2438d3 | 20 | return &c; |
switches | 0:5c4d7b2438d3 | 21 | } |
switches | 0:5c4d7b2438d3 | 22 | private: |
switches | 0:5c4d7b2438d3 | 23 | {{name}} o; |
switches | 0:5c4d7b2438d3 | 24 | }; |