hw functions for the SOLID slow control
Dependents: S_SCTRL_e_test SPItest sscm
S_SCTRL_SM1_hwfunct.h@6:24e981a63851, 2014-09-15 (annotated)
- Committer:
- wbeaumont
- Date:
- Mon Sep 15 15:14:42 2014 +0000
- Revision:
- 6:24e981a63851
- Parent:
- 3:39671ee1347d
- Parent:
- 5:b527df9432c3
- Child:
- 8:fe1477cd1c14
sync changes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wbeaumont | 1:af78e316f889 | 1 | #ifndef S_SCTRL_SM1_hwfunct_H |
wbeaumont | 1:af78e316f889 | 2 | #define S_SCTRL_SM1_hwfunct_H |
wbeaumont | 0:8d755a0f3ab3 | 3 | |
wbeaumont | 6:24e981a63851 | 4 | #define HW_LIB_HDR_VERSION "1.01" |
wbeaumont | 2:475caee897ec | 5 | |
wbeaumont | 0:8d755a0f3ab3 | 6 | |
wbeaumont | 1:af78e316f889 | 7 | typedef struct { |
wbeaumont | 5:b527df9432c3 | 8 | // BI-SPI |
wbeaumont | 0:8d755a0f3ab3 | 9 | DigitalInOut* msio[2]; |
wbeaumont | 0:8d755a0f3ab3 | 10 | DigitalOut* sclk[2]; |
wbeaumont | 0:8d755a0f3ab3 | 11 | DigitalOut* direction[2]; |
wbeaumont | 0:8d755a0f3ab3 | 12 | DigitalOut* stio_mo[2]; |
wbeaumont | 2:475caee897ec | 13 | DigitalOut* csb1[2]; |
wbeaumont | 2:475caee897ec | 14 | DigitalOut* csb2[2]; |
wbeaumont | 0:8d755a0f3ab3 | 15 | |
wbeaumont | 0:8d755a0f3ab3 | 16 | // SPI pins |
wbeaumont | 0:8d755a0f3ab3 | 17 | DigitalOut* mosi[2]; |
wbeaumont | 0:8d755a0f3ab3 | 18 | DigitalIn* miso[2]; |
wbeaumont | 0:8d755a0f3ab3 | 19 | DigitalOut* t_cs[2]; |
wbeaumont | 0:8d755a0f3ab3 | 20 | DigitalOut* tc_cs1[2]; |
wbeaumont | 0:8d755a0f3ab3 | 21 | DigitalOut* tc_cs2[2]; |
wbeaumont | 0:8d755a0f3ab3 | 22 | DigitalOut* dac_cs[2]; |
wbeaumont | 0:8d755a0f3ab3 | 23 | DigitalOut* dac_rst[2]; |
wbeaumont | 0:8d755a0f3ab3 | 24 | |
wbeaumont | 0:8d755a0f3ab3 | 25 | //cal |
wbeaumont | 0:8d755a0f3ab3 | 26 | DigitalOut* cal13[2]; // physical the same so will point to the same port |
wbeaumont | 0:8d755a0f3ab3 | 27 | DigitalOut* cal24[2]; // physical the same so will point to the same port |
wbeaumont | 0:8d755a0f3ab3 | 28 | DigitalOut* calint[2]; |
wbeaumont | 0:8d755a0f3ab3 | 29 | // not related to connector 1 /2 |
wbeaumont | 0:8d755a0f3ab3 | 30 | DigitalOut* calext; |
wbeaumont | 0:8d755a0f3ab3 | 31 | DigitalOut* calgenext; |
wbeaumont | 0:8d755a0f3ab3 | 32 | |
wbeaumont | 0:8d755a0f3ab3 | 33 | DigitalOut* ledred; |
wbeaumont | 0:8d755a0f3ab3 | 34 | DigitalOut* ledgreen; |
wbeaumont | 0:8d755a0f3ab3 | 35 | |
wbeaumont | 1:af78e316f889 | 36 | AnalogIn* ain[2]; |
wbeaumont | 5:b527df9432c3 | 37 | } HWlines; |
wbeaumont | 1:af78e316f889 | 38 | |
wbeaumont | 1:af78e316f889 | 39 | void assignports(HWlines *hwlines ); |
wbeaumont | 0:8d755a0f3ab3 | 40 | void setcalsource( int extcal, HWlines hwl); |
wbeaumont | 5:b527df9432c3 | 41 | void set_bi_spi_mo(int masterout, DigitalInOut* msio, DigitalOut* ldir, DigitalOut* rdir); |
wbeaumont | 0:8d755a0f3ab3 | 42 | void setdefault(HWlines hwl ) ; |
wbeaumont | 3:39671ee1347d | 43 | char* hwfunct_lib_version(); // returns this lib version info |
wbeaumont | 0:8d755a0f3ab3 | 44 | |
wbeaumont | 1:af78e316f889 | 45 | #endif |