Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnConstants.h@1:e392595b4b76, 2012-07-20 (annotated)
- Committer:
- uci1
- Date:
- Fri Jul 20 19:04:02 2012 +0000
- Revision:
- 1:e392595b4b76
- Parent:
- 0:664899e0b988
- Child:
- 3:24c5f0f50bf1
many features checked and working. afar implemented. sending of data not yet tested. contains many debug prints
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 1:e392595b4b76 | 1 | #ifndef SN_SnConstants |
uci1 | 1:e392595b4b76 | 2 | #define SN_SnConstants |
uci1 | 1:e392595b4b76 | 3 | |
uci1 | 1:e392595b4b76 | 4 | #include "SnBitUtils.h" |
uci1 | 1:e392595b4b76 | 5 | |
uci1 | 1:e392595b4b76 | 6 | // |
uci1 | 1:e392595b4b76 | 7 | // constants |
uci1 | 1:e392595b4b76 | 8 | // |
uci1 | 1:e392595b4b76 | 9 | static const uint32_t kBStime = 946684800u; // 1/1/2000 00:00:00 UTC |
uci1 | 1:e392595b4b76 | 10 | static const uint32_t kWDFailsafe = 1200u; |
uci1 | 1:e392595b4b76 | 11 | static const uint8_t kNchans = 4u; |
uci1 | 1:e392595b4b76 | 12 | static const uint8_t kNsamps = 128u; |
uci1 | 1:e392595b4b76 | 13 | static const uint8_t kNfpgaDacs = 4u; |
uci1 | 1:e392595b4b76 | 14 | static const uint8_t kNplas = 4u;//72; |
uci1 | 1:e392595b4b76 | 15 | static const uint16_t kNoTrigPla = 0x0000u; |
uci1 | 1:e392595b4b76 | 16 | static const uint8_t kNcomms = 1u; |
uci1 | 1:e392595b4b76 | 17 | |
uci1 | 1:e392595b4b76 | 18 | static const uint32_t kAbsMaxTimer = 1800u; // timers use integers counting us and can't go longer than ~ this many secs |
uci1 | 1:e392595b4b76 | 19 | // NOTE: these times below must be less than kAbsMaxTimer (this is not checked, however) |
uci1 | 1:e392595b4b76 | 20 | static const uint32_t kConnectTimeout = 30u; // seconds |
uci1 | 1:e392595b4b76 | 21 | static const uint32_t kListenTimeout = 30u; // seconds |
uci1 | 1:e392595b4b76 | 22 | static const uint32_t kCommWinLongPrdTk = 300u; // seconds |
uci1 | 1:e392595b4b76 | 23 | static const uint16_t kTotSamps = kNchans*kNsamps; |
uci1 | 1:e392595b4b76 | 24 | static const uint16_t kTotDacs = kNchans*kNfpgaDacs; |
uci1 | 1:e392595b4b76 | 25 | |
uci1 | 1:e392595b4b76 | 26 | enum ESnTrgTypes { |
uci1 | 1:e392595b4b76 | 27 | kThmTrg=0, kFrcTrg, kExtTrg, |
uci1 | 1:e392595b4b76 | 28 | kNumTrgs |
uci1 | 1:e392595b4b76 | 29 | }; |
uci1 | 1:e392595b4b76 | 30 | |
uci1 | 1:e392595b4b76 | 31 | static const uint8_t kTrgBW[kNumTrgs] = { BIT(0), BIT(1), BIT(2) }; |
uci1 | 1:e392595b4b76 | 32 | |
uci1 | 1:e392595b4b76 | 33 | |
uci1 | 1:e392595b4b76 | 34 | |
uci1 | 0:664899e0b988 | 35 | #endif // SN_SnConstants |