123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
82:82d7073d36ef
Parent:
78:0ea9d02b7b46
Child:
137:14a0c452cf32
diff -r a809491285c9 -r 82d7073d36ef Device.h
--- a/Device.h	Sun Mar 13 19:21:12 2016 +0000
+++ b/Device.h	Mon Mar 21 13:29:41 2016 +0000
@@ -6,27 +6,33 @@
 #include "DeviceUART.h"
 
 typedef enum _DeviceLatchMode {
-    DeviceLatch10kHz,   //internal latch  by pulses 10 kHz (power on default mode)
-    DeviceLatchMeander, //internal latch by signed meander pulses (not used?)
-    DeviceLatchRS422,   //external latch by RS422 request
-    DeviceLatchPin      //external latch by hardware pin request
+  DeviceLatch10kHz,   //internal latch  by pulses 10 kHz (power on default mode)
+  DeviceLatchMeander, //internal latch by signed meander pulses (not used?)
+  DeviceLatchRS422,   //external latch by RS422 request
+  DeviceLatchPin      //external latch by hardware pin request
 } DeviceLatchMode;
 
 typedef enum _DeviceLatchFormat {
-    DeviceLatchFormatDeltaPS,   //latch data in DELTA_PS response format
-    DeviceLatchFormatDeltaBINS, //latch data in DELTA_BINS response format
-    DeviceLatchFormatDeltaSF    //latch data in DELTA_SF response format
+  DeviceLatchFormatDeltaPS,   //latch data in DELTA_PS response format
+  DeviceLatchFormatDeltaBINS, //latch data in DELTA_BINS response format
+  DeviceLatchFormatDeltaSF    //latch data in DELTA_SF response format
 } DeviceLatchFormat;
 
 typedef struct _DeviceLatchState {
-    uint8_t ready;
-    DeviceLatchMode mode;     //latch source
-    DeviceLatchFormat format; //data to latch
-    uint8_t reset;            //set to reset counters on each latch (default), clear to keep (DELTA_SF)
+  uint8_t ready;
+  DeviceLatchMode mode;       //latch source
+  DeviceLatchFormat format;   //data to latch
+  uint8_t reset;              //set to reset counters on each latch (default), clear to keep (DELTA_SF)
 } DeviceLatchState;
 
+typedef enum _DeviceCountingSource {
+  DeviceCountingSourceReference, //Accumulate pulses using reference +/- counters as source
+  DeviceCountingSourceDither,     //Accumulate pulses using dither counters as source
+} DeviceCountingSource;
+
 typedef struct _DeviceCountersState {
-    
+  DeviceCountingSource source; //Pulses source: reference/dither
+  uint8_t filter;              //Moving average filter switch: 0 - off/1 - on
 } DeviceCountersState;
 
 typedef struct _DevicePhotoDetectorState {
@@ -38,15 +44,17 @@
 } DeviceLightUpState;
 
 typedef struct _DeviceHFOState {
-
+  uint8_t loop; //Output signal amplitude loop switch: 1 - on/0 - off
 } DeviceHFOState;
 
 typedef struct _DevicePLCSState {
-    
+  uint8_t loop;      //Path length control system loop switch: 1 - on/0 - off
+  uint8_t modulator; //Path length control system modulator switch: 1 - on/0 - off
 } DevicePLCSState;
 
 typedef struct _DeviceDitherState {
-    
+  uint8_t outputFrequencyLoop; //Output signal amplitude loop switch: 1 - on/0 - off
+  uint8_t oscillationFrequencyLoop; //Output signal amplitude loop switch: 1 - on/0 - off
 } DeviceDitherState;
 
 typedef struct _Device {