/*
 * e_pq_3f.h
 *
 *  Created on: 06-07-2016
 *      Author: Krzysztof Jakubczyk
 */

#ifndef E_PQ_3F_H_
#define E_PQ_3F_H_

#include "tdefs.h"
#include "analog_in.h"

struct e_pq_3f_logic
{
	float *i1_orta;
	float *i1_ortb;
	float *i2_orta;
	float *i2_ortb;
	float *i3_orta;
	float *i3_ortb;
	float *u1_orta;
	float *u1_ortb;
	float *u2_orta;
	float *u2_ortb;
	float *u3_orta;
	float *u3_ortb;
	float *p;
	float *q;

	struct analog_in_params *I_params;
	struct analog_in_params *U_params;
	struct analog_in_params P_params;
};

struct e_pq_3f_io
{
	u32 i1_orta_float_in;
	u32 i1_ortb_float_in;
	u32 i2_orta_float_in;
	u32 i2_ortb_float_in;
	u32 i3_orta_float_in;
	u32 i3_ortb_float_in;
	u32 u1_orta_float_in;
	u32 u1_ortb_float_in;
	u32 u2_orta_float_in;
	u32 u2_ortb_float_in;
	u32 u3_orta_float_in;
	u32 u3_ortb_float_in;
	u32 I_params_ptr_in;
	u32 U_params_ptr_in;
	u32 p_float_out;
	u32 q_float_out;
	u32 P_params_ptr_out;
}__attribute__((__packed__));

struct e_pq_3f_params
{
}__attribute__((__packed__));

struct e_pq_3f_args
{
	struct e_pq_3f_io io;
	struct e_pq_3f_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void e_pq_3f_100hz(void *args, void *logic);
extern int e_pq_3f_initlog(void *arguments, void *logic);

#endif /* E_PQ_3F_H_ */
