elixys periphreal system firmware library
Dependencies: MAX31855 MCP23S18 MCP3202 MCP3208 MCP482x ShiftRegister1
Fork of elixys by
chipselectarray.h@4:2e3f27ae04c2, 2013-12-15 (annotated)
- Committer:
- henryeherman
- Date:
- Sun Dec 15 22:54:59 2013 +0000
- Revision:
- 4:2e3f27ae04c2
- Parent:
- 1:b0f7c49b67f8
Bug free the way to be!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
henryeherman | 1:b0f7c49b67f8 | 1 | #ifndef CHIPSELECT_H |
henryeherman | 1:b0f7c49b67f8 | 2 | #define CHIPSELECT_H |
henryeherman | 1:b0f7c49b67f8 | 3 | #include "mbed.h" |
henryeherman | 1:b0f7c49b67f8 | 4 | #include "ShiftRegister.h" |
henryeherman | 1:b0f7c49b67f8 | 5 | |
henryeherman | 1:b0f7c49b67f8 | 6 | #define FIRST2LAST(X) (31 - (X)) |
henryeherman | 1:b0f7c49b67f8 | 7 | #define VALVCS0 ~(1U << FIRST2LAST(0)) |
henryeherman | 1:b0f7c49b67f8 | 8 | #define VALVCS1 ~(1U << FIRST2LAST(1)) |
henryeherman | 1:b0f7c49b67f8 | 9 | #define VALVCS2 ~(1U << FIRST2LAST(2)) |
henryeherman | 1:b0f7c49b67f8 | 10 | #define THERMCOUPLECS0 ~(1U << FIRST2LAST(3)) |
henryeherman | 1:b0f7c49b67f8 | 11 | #define THERMCOUPLECS1 ~(1U << FIRST2LAST(4)) |
henryeherman | 1:b0f7c49b67f8 | 12 | #define THERMCOUPLECS2 ~(1U << FIRST2LAST(5)) |
henryeherman | 1:b0f7c49b67f8 | 13 | #define THERMCOUPLECS3 ~(1U << FIRST2LAST(6)) |
henryeherman | 1:b0f7c49b67f8 | 14 | #define THERMCOUPLECS4 ~(1U << FIRST2LAST(7)) |
henryeherman | 1:b0f7c49b67f8 | 15 | #define THERMCOUPLECS5 ~(1U << FIRST2LAST(8)) |
henryeherman | 1:b0f7c49b67f8 | 16 | #define THERMCOUPLECS6 ~(1U << FIRST2LAST(9)) |
henryeherman | 1:b0f7c49b67f8 | 17 | #define THERMCOUPLECS7 ~(1U << FIRST2LAST(10)) |
henryeherman | 1:b0f7c49b67f8 | 18 | #define THERMCOUPLECS8 ~(1U << FIRST2LAST(11)) |
henryeherman | 1:b0f7c49b67f8 | 19 | #define HEATERCS ~(1U << FIRST2LAST(12)) |
henryeherman | 1:b0f7c49b67f8 | 20 | #define LIQUIDSENSORCS ~(1U << FIRST2LAST(13)) |
henryeherman | 1:b0f7c49b67f8 | 21 | #define POSITIONSENSORCS ~(1U << FIRST2LAST(14)) |
henryeherman | 1:b0f7c49b67f8 | 22 | #define SMCADCCS ~(1U << FIRST2LAST(15)) |
henryeherman | 1:b0f7c49b67f8 | 23 | #define SMCDACCS ~(1U << FIRST2LAST(16)) |
henryeherman | 1:b0f7c49b67f8 | 24 | #define RADCS0 ~(1U << FIRST2LAST(17)) |
henryeherman | 1:b0f7c49b67f8 | 25 | #define RADCS1 ~(1U << FIRST2LAST(18)) |
henryeherman | 1:b0f7c49b67f8 | 26 | #define RADCS2 ~(1U << FIRST2LAST(19)) |
henryeherman | 1:b0f7c49b67f8 | 27 | #define RADCS3 ~(1U << FIRST2LAST(20)) |
henryeherman | 1:b0f7c49b67f8 | 28 | #define RADCS4 ~(1U << FIRST2LAST(21)) |
henryeherman | 1:b0f7c49b67f8 | 29 | #define RADCS5 ~(1U << FIRST2LAST(22)) |
henryeherman | 1:b0f7c49b67f8 | 30 | #define RADCS6 ~(1U << FIRST2LAST(23)) |
henryeherman | 1:b0f7c49b67f8 | 31 | #define AUXCS0 ~(1U << FIRST2LAST(24)) |
henryeherman | 1:b0f7c49b67f8 | 32 | #define AUXCS1 ~(1U << FIRST2LAST(25)) |
henryeherman | 1:b0f7c49b67f8 | 33 | #define AUXCS2 ~(1U << FIRST2LAST(26)) |
henryeherman | 1:b0f7c49b67f8 | 34 | #define AUXCS3 ~(1U << FIRST2LAST(27)) |
henryeherman | 1:b0f7c49b67f8 | 35 | #define AUXCS4 ~(1U << FIRST2LAST(28)) |
henryeherman | 1:b0f7c49b67f8 | 36 | #define AUXCS5 ~(1U << FIRST2LAST(29)) |
henryeherman | 1:b0f7c49b67f8 | 37 | #define AUXCS6 ~(1U << FIRST2LAST(30)) |
henryeherman | 1:b0f7c49b67f8 | 38 | #define AUXCS7 ~(1U << FIRST2LAST(31)) |
henryeherman | 1:b0f7c49b67f8 | 39 | #define NONECS ~(0x00000000) |
henryeherman | 1:b0f7c49b67f8 | 40 | |
henryeherman | 1:b0f7c49b67f8 | 41 | |
henryeherman | 1:b0f7c49b67f8 | 42 | void unselect(void); |
henryeherman | 1:b0f7c49b67f8 | 43 | void selectvalve0(void); |
henryeherman | 1:b0f7c49b67f8 | 44 | void selectvalve1(void); |
henryeherman | 1:b0f7c49b67f8 | 45 | void selectvalve2(void); |
henryeherman | 1:b0f7c49b67f8 | 46 | void selecttc0(void); |
henryeherman | 1:b0f7c49b67f8 | 47 | void selecttc1(void); |
henryeherman | 1:b0f7c49b67f8 | 48 | void selecttc2(void); |
henryeherman | 1:b0f7c49b67f8 | 49 | void selecttc3(void); |
henryeherman | 1:b0f7c49b67f8 | 50 | void selecttc4(void); |
henryeherman | 1:b0f7c49b67f8 | 51 | void selecttc5(void); |
henryeherman | 1:b0f7c49b67f8 | 52 | void selecttc6(void); |
henryeherman | 1:b0f7c49b67f8 | 53 | void selecttc7(void); |
henryeherman | 1:b0f7c49b67f8 | 54 | void selecttc8(void); |
henryeherman | 1:b0f7c49b67f8 | 55 | void selectheater(void); |
henryeherman | 1:b0f7c49b67f8 | 56 | void selectliq(void); |
henryeherman | 1:b0f7c49b67f8 | 57 | void selectpos(void); |
henryeherman | 1:b0f7c49b67f8 | 58 | void selectsmcadc(void); |
henryeherman | 1:b0f7c49b67f8 | 59 | void selectsmcdac(void); |
henryeherman | 1:b0f7c49b67f8 | 60 | void selectrad0(void); |
henryeherman | 1:b0f7c49b67f8 | 61 | void selectrad1(void); |
henryeherman | 1:b0f7c49b67f8 | 62 | void selectrad2(void); |
henryeherman | 1:b0f7c49b67f8 | 63 | void selectrad3(void); |
henryeherman | 1:b0f7c49b67f8 | 64 | void selectrad4(void); |
henryeherman | 1:b0f7c49b67f8 | 65 | void selectrad5(void); |
henryeherman | 1:b0f7c49b67f8 | 66 | void selectrad6(void); |
henryeherman | 1:b0f7c49b67f8 | 67 | void selectaux0(void); |
henryeherman | 1:b0f7c49b67f8 | 68 | void selectaux1(void); |
henryeherman | 1:b0f7c49b67f8 | 69 | void selectaux2(void); |
henryeherman | 1:b0f7c49b67f8 | 70 | void selectaux3(void); |
henryeherman | 1:b0f7c49b67f8 | 71 | void selectaux4(void); |
henryeherman | 1:b0f7c49b67f8 | 72 | void selectaux5(void); |
henryeherman | 1:b0f7c49b67f8 | 73 | void selectaux6(void); |
henryeherman | 1:b0f7c49b67f8 | 74 | void selectaux7(void); |
henryeherman | 1:b0f7c49b67f8 | 75 | |
henryeherman | 1:b0f7c49b67f8 | 76 | #endif //CHIPSELECT_H |