source: trunk/FACT++/src/HeadersFSC.h@ 17637

Last change on this file since 17637 was 17624, checked in by dneise, 11 years ago
introduced POD which describes FSC binary output format
File size: 1.2 KB
Line 
1#ifndef FACT_HeadersFSC
2#define FACT_HeadersFSC
3
4#define RESISTANCE_CHANNELS 64
5#define RESISTANCE_REGS 8
6#define VOLTAGE_CHANNELS 84
7#define VOLTAGE_REGS 11
8
9
10namespace FSC
11{
12 namespace State
13 {
14 enum states_t
15 {
16 kDisconnected = 1,
17 kConnected = 2,
18 };
19 }
20
21
22
23 typedef struct {
24 uint8_t ad7719_readings_since_last_muxing;
25 uint8_t ad7719_current_channel;
26 uint32_t ad7719_current_reading;
27 uint8_t ad7719_enables[RESISTANCE_REGS];
28 uint8_t ad7719_channels_ready[RESISTANCE_REGS];
29 uint32_t ad7719_values[RESISTANCE_CHANNELS];
30 uint16_t ad7719_values_checksum;
31
32 uint8_t adc_readings_since_last_muxing;
33 uint8_t adc_current_channel;
34 uint16_t adc_current_reading;
35 uint8_t adc_enables[VOLTAGE_REGS];
36 uint8_t adc_channels_ready[VOLTAGE_REGS];
37 uint16_t adc_values[VOLTAGE_CHANNELS];
38 uint16_t adc_values_checksum;
39
40 uint8_t ad7719_measured_all; // treat it as a bool
41 uint8_t adc_measured_all; // treat it as a bool
42
43 uint8_t app_reset_source;
44 uint32_t time_sec;
45 uint16_t time_ms;
46 } __attribute__((__packed__)) BinaryOutput_t;
47}
48
49#endif
50
Note: See TracBrowser for help on using the repository browser.