Sold slow control/

Dependents:   sscm

Fork of S_SCTRL_SMlib by wimbeaumont Project

Revision:
9:20f21cb7792e
Parent:
8:fe1477cd1c14
Child:
10:1cae1504a800
diff -r fe1477cd1c14 -r 20f21cb7792e S_SCTRL_SM1_hwfunct.cpp
--- a/S_SCTRL_SM1_hwfunct.cpp	Tue Sep 16 19:36:21 2014 +0000
+++ b/S_SCTRL_SM1_hwfunct.cpp	Fri Sep 19 16:26:15 2014 +0000
@@ -2,7 +2,7 @@
  * ver 1.0  
  * ver 1.1x   connectors signal working   
  * ver 1.20   added serialnr read
- 
+ * ver 1.22   defined cs lines to inactive in safe settings
  
  */
 
@@ -11,7 +11,7 @@
 #include "S_SCTRL_SM1_hwfunct.h"
 
 
-#define HW_LIB_SRC_VERSION "1.21"
+#define HW_LIB_SRC_VERSION "1.22"
 
 #define MAXLIBVERCHAR 100  // max char for lib version 
 
@@ -90,7 +90,8 @@
 
 // select intern or extern cal   0 = intern, 1 is extern 
 void setcalsource( int external, HWlines hwl) {
-    *(hwl.calext)=0;    *(hwl.calint[0])=0; *(hwl.calint[1])=0;  //disable all 
+    *(hwl.calext)=0;    
+    *(hwl.calint[0])=0; *(hwl.calint[1])=0;  //disable all 
     if ( external==1 ) {*(hwl.calext)=1; }
     else {*(hwl.calint[0])=1; *(hwl.calint[1])=1;  }
 
@@ -103,6 +104,14 @@
             hwl.msio[i]->input();
             *(hwl.direction[i])=RDIR_IN;
             *(hwl.stio_mo[i])=LDIR_IN;
+            hwl.sclk[i]->write(0);
+            hwl.csb1[i]->write(0);
+            hwl.csb2[i]->write(0);
+            hwl.t_cs[i]->write(0);
+            hwl.tc_cs1[i]->write(0);
+            hwl.tc_cs2[i]->write(0);
+            hwl.dac_cs[i]->write(0);
+            hwl.dac_rst[i]->write(0);                                               
         }
         setcalsource(0,hwl); //intern
 }