source: branches/FACT++_lidctrl_new_eth/src/HeadersFSC.h

Last change on this file was 17639, checked in by tbretz, 11 years ago
Replaced define by enum.
File size: 1.3 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 };
13 }
14
15 enum {
16 kNumResistanceChannels = 64,
17 kNumResistanceRegs = 8,
18 kNumVoltageChannels = 84,
19 kNumVoltageRegs = 11
20 };
21
22
23 struct BinaryOutput_t
24 {
25 uint8_t ad7719_readings_since_last_muxing;
26 uint8_t ad7719_current_channel;
27 uint32_t ad7719_current_reading;
28 uint8_t ad7719_enables[kNumResistanceRegs];
29 uint8_t ad7719_channels_ready[kNumResistanceRegs];
30 uint32_t ad7719_values[kNumResistanceChannels];
31 uint16_t ad7719_values_checksum;
32
33 uint8_t adc_readings_since_last_muxing;
34 uint8_t adc_current_channel;
35 uint16_t adc_current_reading;
36 uint8_t adc_enables[kNumVoltageRegs];
37 uint8_t adc_channels_ready[kNumVoltageRegs];
38 uint16_t adc_values[kNumVoltageChannels];
39 uint16_t adc_values_checksum;
40
41 uint8_t ad7719_measured_all; // treat it as a bool
42 uint8_t adc_measured_all; // treat it as a bool
43
44 uint8_t app_reset_source;
45 uint32_t time_sec;
46 uint16_t time_ms;
47 } __attribute__((__packed__));
48}
49
50#endif
51
Note: See TracBrowser for help on using the repository browser.