/*
 * e_filtr2h_1khz.h
 *
 *  Created on: 01-03-2017
 *      Author: Krzysztof Jakubczyk
 */

#ifndef E_FILTR2H_1KHZ_IN_H_
#define E_FILTR2H_1KHZ_IN_H_

#include "tdefs.h"

struct e_filtr2h_1khz_logic
{
	float wsp_filtr_sin_[MAIN_FREQ_PERIOD_MS/LOOP_CYCLE_MS]; ///< wspolczynniki filtracji dla sinus z korekcja fazowa
	float wsp_filtr_cos_[MAIN_FREQ_PERIOD_MS/LOOP_CYCLE_MS]; ///< wspolczynniki filtracji dla cosinus z korekcja fazowa
	float buf[MAIN_FREQ_PERIOD_MS/LOOP_CYCLE_MS];
	float *sample_in;
	float *esk_ptr;
	float *orta_ptr;
	float *ortb_ptr;
	u8 sample_num;
};

struct e_filtr2h_1khz_io
{
	u32 sample_float_in;
	u32 orta_float_out;
	u32 ortb_float_out;
	u32 esk_float_out;
}__attribute__((__packed__));

struct e_filtr2h_1khz_params
{
}__attribute__((__packed__));

struct e_filtr2h_1khz_args
{
	struct e_filtr2h_1khz_io io;
	struct e_filtr2h_1khz_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void e_filtr2h_1khz(void *args, void *logic);
extern int e_filtr2h_1khz_initlog(void *arguments, void *logic);

#endif /* E_FILTR2H_1KHZ_H_ */
