123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
174:0f86eedd511c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DeviceTSS.h	Sun Jun 26 10:16:39 2016 +0000
@@ -0,0 +1,51 @@
+#ifndef __DEVICE_TSS_H__
+#define __DEVICE_TSS_H__
+
+typedef struct _DeviceTSSTransferFunction {
+  int32_t points;      //Used points count
+  int32_t raw[16];     //ADC code
+  int32_t celsius[16]; //Temperature - degrees in 16.16 format
+} DeviceTSSTransferFunction;
+
+typedef struct _DeviceTSSTemperatureSettings {
+  DeviceTSSTransferFunction transfer;
+} DeviceTSSTemperatureSettings;
+
+typedef struct _DeviceTSSTemperatureState {
+  int32_t sum;         //Sum of last 32 temperature measurements - ADC code
+  int32_t raw;         //Average temperature - ADC code
+  int32_t celsius;     //Average temperature - degrees in 16.16 format
+} DeviceTSSTemperatureState;
+
+typedef struct _DeviceTSSTemperature {
+  DeviceTSSTemperatureSettings settings;
+  DeviceTSSTemperatureState state;
+} DeviceTSSTemperature;
+
+typedef struct _DeviceTSSGradientSettings {
+  DeviceTSSTransferFunction transfer;
+} DeviceTSSGradientSettings;
+
+typedef struct _DeviceTSSGradientState {
+  int32_t sum;         //Sum of last 32 gradient measurements - ADC code
+  int32_t raw;         //Average gradient - ADC code
+  int32_t celsius;     //Average gradient - degrees in 16.16 format
+} DeviceTSSGradientState;
+
+typedef struct _DeviceTSSGradient {
+  DeviceTSSGradientSettings settings;
+  DeviceTSSGradientState state;
+} DeviceTSSGradient;
+
+typedef struct _DeviceTSS {
+  DeviceTSSTemperature temperature;
+  DeviceTSSGradient gradient;
+} DeviceTSS;
+
+void InitTSSDefaultSettings(void);
+void InitTSSState(void);
+void DeviceStartTSS(void);
+
+void tssProcess(void);
+
+#endif  /* __DEVICE_TSS_H__ */
\ No newline at end of file