Changeset 17624


Ignore:
Timestamp:
03/18/14 15:50:42 (11 years ago)
Author:
dneise
Message:
introduced POD which describes FSC binary output format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/HeadersFSC.h

    r13914 r17624  
    11#ifndef FACT_HeadersFSC
    22#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
    39
    410namespace FSC
     
    1218        };
    1319    }
     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;
    1447}
    1548
    1649#endif
     50
Note: See TracChangeset for help on using the changeset viewer.