source: branches/fscctrl_safety_limits/src/HeadersFSC.h

Last change on this file was 18343, checked in by dneise, 9 years ago
changing names of ressources as Thomas wanted. setting them to not-required and setting a hopefully useful default. It does throw an exception when being started, and I don't know where it is thrown yet.
File size: 1.4 KB
Line 
1#ifndef FACT_HeadersFSC
2#define FACT_HeadersFSC
3
4namespace FSC
5{
6 namespace State
7 {
8 enum states_t
9 {
10 kDisconnected = 1,
11 kConnected = 2,
12 kHighCurrent = 3,
13 kOverCurrent = 0xff+1,
14 };
15 }
16
17 enum {
18 kNumResistanceChannels = 64,
19 kNumResistanceRegs = 8,
20 kNumVoltageChannels = 84,
21 kNumVoltageRegs = 11
22 };
23
24
25 struct BinaryOutput_t
26 {
27 uint8_t ad7719_readings_since_last_muxing;
28 uint8_t ad7719_current_channel;
29 uint32_t ad7719_current_reading;
30 uint8_t ad7719_enables[kNumResistanceRegs];
31 uint8_t ad7719_channels_ready[kNumResistanceRegs];
32 uint32_t ad7719_values[kNumResistanceChannels];
33 uint16_t ad7719_values_checksum;
34
35 uint8_t adc_readings_since_last_muxing;
36 uint8_t adc_current_channel;
37 uint16_t adc_current_reading;
38 uint8_t adc_enables[kNumVoltageRegs];
39 uint8_t adc_channels_ready[kNumVoltageRegs];
40 uint16_t adc_values[kNumVoltageChannels];
41 uint16_t adc_values_checksum;
42
43 uint8_t ad7719_measured_all; // treat it as a bool
44 uint8_t adc_measured_all; // treat it as a bool
45
46 uint8_t app_reset_source;
47 uint32_t time_sec;
48 uint16_t time_ms;
49 } __attribute__((__packed__));
50}
51
52#endif
53
Note: See TracBrowser for help on using the repository browser.