George Jiglau / mbed-rpc

Fork of mbed-rpc by mbed official

Revision:
1:afe5fe95394f
Parent:
0:efe8172b4113
--- a/Arguments.cpp	Tue Nov 20 17:23:59 2012 +0000
+++ b/Arguments.cpp	Tue Feb 12 19:54:33 2013 +0000
@@ -84,6 +84,13 @@
     return strtol(argv[index], &pEnd, 10);
 }
 
+
+template<> unsigned int Arguments::getArg<unsigned int>(void) {
+    index++;
+    char *pEnd;
+    return strtoul(argv[index], &pEnd, 10);
+}
+
 template<> const char* Arguments::getArg<const char*>(void) {
     index++;
     return argv[index];
@@ -138,6 +145,11 @@
     reply += sprintf(reply, "%d", v);
 }
 
+template<> void Reply::putData<unsigned int>(unsigned int v) {
+    separator();
+    reply += sprintf(reply, "%u", v);
+}
+
 template<> void Reply::putData<float>(float f) {
     separator();
     reply += sprintf(reply, "%.17g", f);