Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
Diff: mbed/jsonrpc/RpcPortOut.cpp
- Revision:
- 87:814e89e853a2
- Parent:
- 85:416f8bbbdf54
diff -r a042fb18911b -r 814e89e853a2 mbed/jsonrpc/RpcPortOut.cpp
--- a/mbed/jsonrpc/RpcPortOut.cpp Fri Jul 11 01:44:20 2014 +0000
+++ b/mbed/jsonrpc/RpcPortOut.cpp Sun Jul 20 12:53:02 2014 +0000
@@ -6,13 +6,13 @@
public:
static NyLPC_TBool new1(const union NyLPC_TJsonRpcParserResult* i_rpc,void* i_param)
{
- //ud
+ //uu
ModJsonRpc* mod=((ModJsonRpc::TcJsonRpcEx_t*)i_param)->cppmod_ptr;
unsigned int port;
- int mask;
+ unsigned int mask;
if(getParamUInt(mod,i_rpc,port,0)){
- if(getParamInt(mod,i_rpc,mask,1)){
- addNewObjectBatch(mod,i_rpc->method.id,new ModJsonRpc::RpcObject<PortOut>(new PortOut(portId2PortName(port),mask)));
+ if(getParamUInt(mod,i_rpc,mask,1)){
+ addNewObjectBatch(mod,i_rpc->method.id,new ModJsonRpc::RpcObject<PortOut>(new PortOut(portId2PortName(port),(int)mask)));
}
}
return NyLPC_TBool_TRUE;
@@ -33,9 +33,9 @@
ModJsonRpc* mod=((ModJsonRpc::TcJsonRpcEx_t*)i_param)->cppmod_ptr;
PortOut* inst=(PortOut*)getObjectBatch(mod,i_rpc);
if(inst!=NULL){
- int v;
- if(getParamInt(mod,i_rpc,v,1)){
- inst->write(v);
+ unsigned int v;
+ if(getParamUInt(mod,i_rpc,v,1)){
+ inst->write((int)v);
mod->putResult(i_rpc->method.id);
}
}
@@ -47,9 +47,9 @@
const static struct NyLPC_TJsonRpcMethodDef func_table[]=
{
- { "_new1" ,"ud" ,PortOutHandler::new1},
+ { "_new1" ,"uu" ,PortOutHandler::new1},
{ "read" ,"d" ,PortOutHandler::read},
- { "write" ,"dd" ,PortOutHandler::write},
+ { "write" ,"du" ,PortOutHandler::write},
{ NULL ,NULL ,NULL}
};
MiMic Webservice library