hw functions for the SOLID slow control

Dependents:   S_SCTRL_e_test SPItest sscm

Revision:
12:467def75b457
Parent:
11:0416cf017b7a
Child:
13:3d82f8e27414
--- a/S_SCTRL_SM1_hwfunct.cpp	Tue Oct 14 17:05:20 2014 +0000
+++ b/S_SCTRL_SM1_hwfunct.cpp	Thu Oct 23 17:25:45 2014 +0000
@@ -4,6 +4,7 @@
  * ver 1.20   added serialnr read
  * ver 1.22   defined cs lines to inactive in safe settings
  * ver 1.30   added CAL puls function   
+ * ver 1.31   added CAL line lvl  function   
  */
 
 #include "mbed.h"
@@ -11,7 +12,7 @@
 #include "S_SCTRL_SM1_hwfunct.h"
 
 
-#define HW_LIB_SRC_VERSION "1.30"
+#define HW_LIB_SRC_VERSION "1.31"
 
 #define MAXLIBVERCHAR 100  // max char for lib version 
 
@@ -138,7 +139,23 @@
 
 
 char libversion[MAXLIBVERCHAR]={'e','m','p','t','y','\0'};
-;
+
+
+void set_cal_line(HWlines  hwl, int calline ,int level ){
+   int lvl;
+   if( level ==1) lvl=CAL_ACTIVE; else lvl=CAL_DEACTIVE;
+   if( calline == 0) {
+        hwl.cal13[0]->write(lvl); //index can be hard coded as it are the same lines) 
+        hwl.cal24[0]->write(lvl);  
+    }
+    if( calline == 1) {
+       hwl.cal13[0]->write(lvl); //index can be hard coded as it are the same lines)         
+    }
+    if( calline == 2) {        
+        hwl.cal24[0]->write(lvl);   
+    }
+    
+}
 
 void toggle_cal(HWlines  hwl, int calline){
     if( calline == 0) {