implementation of parts of the unilynx protocol, for communicating with danfos photovoltaic inverters. Still BETA ! needs byte stuff/unstuff fixed, and some CRC are left out for niw...

Dependencies:   mbed

Revision:
0:66a099b01e08
Child:
1:df4e9da66448
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unilynx.h	Mon Aug 27 18:30:37 2012 +0000
@@ -0,0 +1,29 @@
+#ifndef UNILYNX_H_
+#define UNILYNX_H_
+
+
+/* RAW measured values */
+#define RAW_MEAS_VALUES                0X01 
+#define INSTANT_ENERGY                0X01 //RETURNS U32
+#define ENERGY_PRODUCTION            0X02 //RETURNS U32
+#define ENERGY_PRODUCTION_TODAY        0X04 //RETURNS U32
+
+/* Smoothed measured values */
+#define RAW_SMOOTH_VALUES            0X02 
+#define GRID_VOLTAGE                0X14 //RETURNS U32
+#define GRID_CURRENT_MA                0X15 //RETURNS U32
+#define GRID_FREQ_cHZ                0X16 //RETURNS U32
+
+
+/* Status values */
+#define STATUS_VALUES                0X0A 
+#define OPERATION_MODE                0X02 //RETURNS U32
+
+
+void rs485init(void);
+void getNodeInfo(void);
+void readParameter(int param_idx, int param_sub_idx);
+void test(void);
+void ping(void);
+
+#endif
\ No newline at end of file