/*
 * sum_e_3f.h
 *
 *  Created on: 30-07-2019
 *      Author: Krzysztof Jakubczyk
 */

#ifndef SUM_E_3F_H_
#define SUM_E_3F_H_

#include "tdefs.h"

struct sum_e_3f_logic
{
	float *in_l1_orta_a;
	float *in_l1_ortb_a;
	float *in_l1_orta_b;
	float *in_l1_ortb_b;

	float *in_l2_orta_a;
	float *in_l2_ortb_a;
	float *in_l2_orta_b;
	float *in_l2_ortb_b;

	float *in_l3_orta_a;
	float *in_l3_ortb_a;
	float *in_l3_orta_b;
	float *in_l3_ortb_b;

	float *in_3i0_orta_a;
	float *in_3i0_ortb_a;
	float *in_3i0_orta_b;
	float *in_3i0_ortb_b;

	float *out_l1_orta;
	float *out_l1_ortb;
	float *out_l1_esk;

	float *out_l2_orta;
	float *out_l2_ortb;
	float *out_l2_esk;

	float *out_l3_orta;
	float *out_l3_ortb;
	float *out_l3_esk;

	float *out_3i0_orta;
	float *out_3i0_ortb;
	float *out_3i0_esk;
};

struct sum_e_3f_io
{
	u32 in_l1_orta_a_float_in;
	u32 in_l1_ortb_a_float_in;
	u32 in_l1_orta_b_float_in;
	u32 in_l1_ortb_b_float_in;
	u32 in_l2_orta_a_float_in;
	u32 in_l2_ortb_a_float_in;
	u32 in_l2_orta_b_float_in;
	u32 in_l2_ortb_b_float_in;
	u32 in_l3_orta_a_float_in;
	u32 in_l3_ortb_a_float_in;
	u32 in_l3_orta_b_float_in;
	u32 in_l3_ortb_b_float_in;
	u32 in_3i0_orta_a_float_in;
	u32 in_3i0_ortb_a_float_in;
	u32 in_3i0_orta_b_float_in;
	u32 in_3i0_ortb_b_float_in;
	u32 out_l1_orta_float_out;
	u32 out_l1_ortb_float_out;
	u32 out_l1_esk_float_out;
	u32 out_l2_orta_float_out;
	u32 out_l2_ortb_float_out;
	u32 out_l2_esk_float_out;
	u32 out_l3_orta_float_out;
	u32 out_l3_ortb_float_out;
	u32 out_l3_esk_float_out;
	u32 out_3i0_orta_float_out;
	u32 out_3i0_ortb_float_out;
	u32 out_3i0_esk_float_out;
}__attribute__((__packed__));

struct sum_e_3f_params
{
	double m1;
	double m2;
}__attribute__((__packed__));

struct sum_e_3f_args
{
	struct sum_e_3f_io io;
	struct sum_e_3f_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void sum_e_3f(void *args, void *logic);
extern int sum_e_3f_initlog(void *arguments, void *logic);

#endif /* SUM_E_3F_H_ */
