/*
 * rec_float.h
 *
 *
 *  Created on: 04-01-2017
 *      Author: KJ
 */

#ifndef REC_FLOAT_H_
#define REC_FLOAT_H_

#include "tdefs.h"

#define REC_CHAN_ENABLED_DFR	0x00000001
#define REC_CHAN_ENABLED_DDR	0x00000002

struct rec_float_logic
{
	u16 *in_ptr;
	u16 sample_new;
	float *sample;
	double mul;
};

struct rec_float_io
{
	u32 sample_float_in;
}__attribute__((__packed__));

struct rec_float_params
{
	u32 bits;
	u32 jednostka;
	double pierw;
	double wtor;
	double wart_absmax;
}__attribute__((__packed__));

struct rec_float_args
{
	struct rec_float_io io;
	struct rec_float_params params;
//	u16 crc;
}__attribute__((__packed__));

extern int rec_float_initlog(void *args, void *logic);
extern void rec_float(void *args, void *logic);

#endif /* REC_FLOAT_H_ */
