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.
Diff: handlers.cpp
- Revision:
- 25:57de395d89aa
- Parent:
- 24:f8fea5e5bf73
- Child:
- 26:5c264e20402f
--- a/handlers.cpp	Tue Jul 23 04:33:02 2013 +0000
+++ b/handlers.cpp	Tue Jul 23 06:03:27 2013 +0000
@@ -164,6 +164,16 @@
         *cha2_amp = char2hex_4bits(buf[0]);
         *cha2_pha = char2hex_3bits(buf[1]);
         *cha1_amp = char2hex_4bits(buf[2]);
-        *cha1_pha = char2hex_3bits(buf[3]);        
+        *cha1_pha = char2hex_3bits(buf[3]);   
+        return PARSE_OK;     
     }
+}
+
+
+char hex2char(char hex)
+{
+    if(hex < 10)
+        return hex + '0';
+    else
+        return hex-10+'A';
 }
\ No newline at end of file