Creates DAC interface

Fork of DevInterfaces by wimbeaumont Project

Revision:
2:58f1d5a3f850
Parent:
1:5672673314f9
--- a/getVersion.cpp	Fri Jan 08 11:56:44 2016 +0000
+++ b/getVersion.cpp	Wed Jan 13 14:14:39 2016 +0000
@@ -1,14 +1,27 @@
 #include "getVersion.h"
 
-#define GETVERSION_SRC_VER  "0.11"
+#define GETVERSION_SRC_VER  "0.20"
 #ifdef MBED 
 #include "mbed.h"
 #else 
 #include  <stdlib.h> 
+#include  <stdio.h> 
 #endif 
 
 #define NULL 0
 
+
+getVersion::getVersion(const char* ver_h,const char* ver_s, const char* time,const char* date) {
+        sver=ver_s; hver=ver_h; ctime=time;cdate=date;
+        sprintf(infostr,"HDR ver:  %s, SRC ver: %s",sver,hver);
+        
+        } ;
+
+getVersion::getVersion(){sver=0; hver=0; ctime=0;cdate=0;
+            sprintf(infostr,"HDR ver:  %s, SRC ver: %s",GETVERSION_HDR_VER,GETVERSION_SRC_VER);
+};     
+
+
 void getVersion::get_dec_version( unsigned short  hexversion , unsigned char & version, unsigned char& subversion) {
         subversion =(unsigned short)(  hexversion & 0xFF);
         hexversion=hexversion >> 8; 
@@ -59,4 +72,10 @@
     
     if ( cdate == NULL ) return 0;
     else return 0;
-}
\ No newline at end of file
+}
+
+char* getVersion::getversioninfo(){
+    return infostr;
+}
+   
+