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

#ifndef E_RMS_H_
#define E_RMS_H_

#include "tdefs.h"

struct e_rms_logic
{
	float multiplier;
	float offset;
	u16 *buf_ptr;
	float *rms_ptr;
	float *rms_kw_ptr;
};

struct e_rms_io
{
	u32 buf_u16_ptr_in;
	u32 param_an_ptr_in;
	u32 rms_float_out;
	u32 rms_kw_float_out;
}__attribute__((__packed__));

struct e_rms_params
{
}__attribute__((__packed__));

struct e_rms_args
{
	struct e_rms_io io;
	struct e_rms_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void e_rms(void *args, void *logic);
extern int e_rms_initlog(void *arguments, void *logic);

#endif /* E_RMS_H_ */
