Sold slow control/

Dependents:   sscm

Fork of S_SCTRL_SMlib by wimbeaumont Project

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers S_SCTRL_SM1_hwfunct.h Source File

S_SCTRL_SM1_hwfunct.h

00001 #ifndef S_SCTRL_SM1_hwfunct_H
00002 #define S_SCTRL_SM1_hwfunct_H
00003 
00004 
00005 #define HW_LIB_HDR_VERSION "1.23"
00006 
00007 /* hardware functions 
00008  * ver 1.0  
00009  * ver 1.1x   connectors signal working   
00010  * ver 1.20   added serialnr read
00011  
00012  
00013  */
00014 typedef struct  {
00015     // BI-SPI 
00016     DigitalInOut * msio[2];
00017     DigitalOut * sclk[2];
00018     DigitalOut * direction[2];
00019     DigitalOut * stio_mo[2];
00020     DigitalOut * csb1[2];
00021     DigitalOut * csb2[2];
00022 
00023     // SPI pins
00024     DigitalOut * mosi[2]; 
00025     DigitalIn * miso[2]; 
00026     DigitalOut * t_cs[2];
00027     DigitalOut * tc_cs1[2];
00028     DigitalOut * tc_cs2[2];
00029     DigitalOut * dac_cs[2];
00030     DigitalOut * dac_rst[2];
00031 
00032     //cal 
00033     DigitalOut * cal13[2]; // physical the same so will point to the same port
00034     DigitalOut * cal24[2]; // physical the same so will point to the same port
00035     DigitalOut * calint[2];
00036     // not related to connector 1 /2 
00037     DigitalOut * calext; 
00038     DigitalOut * calgenext;
00039 
00040     DigitalOut * ledred;
00041     DigitalOut * ledgreen;
00042 
00043     DigitalIn * snr[5];
00044 
00045     AnalogIn * ain[2];
00046 } HWlines;
00047 
00048 void assignports(HWlines * hwlines);    
00049 void setcalsource(int extcal, HWlines hwl);    
00050 void set_bi_spi_mo(int masterout, DigitalInOut * msio, DigitalOut * ldir,
00051                    DigitalOut * rdir);
00052 void setdefault(HWlines hwl);
00053 char * hwfunct_lib_version(); // returns this lib version info    
00054 int get_serialnr(HWlines * hwlines); // get the electronic serial nr of the board
00055 
00056 #endif