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

#ifndef E_RMS_1T_H_
#define E_RMS_1T_H_

#include "tdefs.h"

struct dane_wewnetrzne_rms_1t
{
	float sumap;
	float sumam;
	float last;
	short liczz;
	unsigned short wskp;
	unsigned short wskm;
};

struct e_rms_1t_logic
{
	float *probka_ptr;
	float *rms_ptr;
	float *rms_kw_ptr;
	struct dane_wewnetrzne_rms_1t dw;
};

struct e_rms_1t_io
{
	u32 probka_float_in;
	u32 rms_1t_float_out;
	u32 rms_1t_kw_float_out;
}__attribute__((__packed__));

struct e_rms_1t_params
{
}__attribute__((__packed__));

struct e_rms_1t_args
{
	struct e_rms_1t_io io;
	struct e_rms_1t_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void e_rms_1t(void *args, void *logic);
extern int e_rms_1t_initlog(void *arguments, void *logic);

#endif /* E_RMS_1T_H_ */
