hw functions for the SOLID slow control
Dependents: S_SCTRL_e_test SPItest sscm
Diff: S_SCTRL_SM1_hwfunct.cpp
- Revision:
- 3:39671ee1347d
- Parent:
- 1:af78e316f889
- Child:
- 6:24e981a63851
--- a/S_SCTRL_SM1_hwfunct.cpp Sun Sep 07 15:31:42 2014 +0000 +++ b/S_SCTRL_SM1_hwfunct.cpp Mon Sep 15 14:55:03 2014 +0000 @@ -4,6 +4,9 @@ #include "S_SCTRL_SM1_hwfunct.h" +#define HW_LIB_SRC_VERSION "1.00" + +#define MAXLIBVERCHAR 100 // max char for lib version void assignports(HWlines *hwlines ){ @@ -13,8 +16,8 @@ hwlines->sclk[0] = new DigitalOut(SCLK); hwlines->direction[0] = new DigitalOut(DIRECTION); hwlines->stio_mo[0] = new DigitalOut(STIO_MO); -hwlines->csb1_1[0] = new DigitalOut(ADC1_CSN); -hwlines->csb2_1[0] = new DigitalOut(ADC2_CSN); +hwlines->csb1[0] = new DigitalOut(ADC1_CSN); +hwlines->csb2[0] = new DigitalOut(ADC2_CSN); @@ -37,8 +40,8 @@ hwlines->sclk[1] = new DigitalOut(SCLK_2); hwlines->direction[1] = new DigitalOut(DIRECTION2); hwlines->stio_mo[1] = new DigitalOut(STIO2_MO); -hwlines->csb1_1[1] = new DigitalOut(ADC1_2_CSN); -hwlines->csb2_1[1] = new DigitalOut(ADC2_2_CSN); +hwlines->csb1[1] = new DigitalOut(ADC1_2_CSN); +hwlines->csb2[1] = new DigitalOut(ADC2_2_CSN); // SPI pins hwlines->mosi[1] = new DigitalOut(MOSI_2); @@ -92,3 +95,11 @@ setcalsource(0,hwl); //intern } +char libversion[MAXLIBVERCHAR]={'e','m','p','t','y','\0'}; + + +char* hwfunct_lib_version(){ + sprintf(libversion,"hw lib versions src : %s header: %s ,date:%s %s \n\r",HW_LIB_SRC_VERSION,HW_LIB_HDR_VERSION , __DATE__,__TIME__); + return libversion; + +} \ No newline at end of file