123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
74:f4d9c3403578
Child:
76:1c54a614564d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Device.h	Sat Feb 27 18:42:37 2016 +0000
@@ -0,0 +1,43 @@
+#ifndef __DEVICE_H__
+#define __DEVICE_H__
+
+#include "DeviceSettings.h"
+#include "DeviceProtocol.h"
+
+typedef enum _DeviceLatchMode {
+    DeviceLatch10kHz,//internal latch  by pulses 10 kHz (power on default mode)
+    DeviceLatchMeander,   //internal latch by signed meander pulses
+    DeviceLatchRS422,     //external latch by RS422 B_Delta_PS request
+    DeviceLatchPulse      //external latch by pulse request
+} DeviceLatchMode;
+
+typedef enum _DeviceDeltaMode {
+    DeviceDeltaModePS,
+    DeviceDeltaModeBINS,
+    DeviceDeltaModeSF
+} DeviceDeltaMode;
+
+typedef struct _DeviceLatchState {
+    //Latch mode
+    DeviceLatchMode mode;
+} DeviceLatchState;
+
+typedef struct _DeviceCountersState {
+    //Latch
+    DeviceLatchState latch;
+    //Delta command mode
+    DeviceDeltaMode deltaMode;
+} DeviceCountersState;
+
+typedef struct _Device {
+  DeviceSettings settings;
+  
+  DeviceRequest request;
+  DeviceResponse response;
+  DeviceProtocolDecoder decoder;
+  DeviceProtocolEncoder encoder;
+  
+  DeviceCountersState counters;
+} Device;
+
+#endif  /* __DEVICE_H__ */
\ No newline at end of file