/*
 * virt_in.h
 *
 *  Created on: 14-10-2014
 *      Author: Krzysztof Jakubczyk
 */

#ifndef VIRT_IN_H_
#define VIRT_IN_H_

#include "tdefs.h"

#define MAX_VIRT_IN_COUNT		64
#define VIRT_IN_IMPULSE_TIME	150
#define VIRT_IN_IMPULSE_TIME_100HZ	15

struct virt_in_logic
{
	u8 *out_ptr;
	u8 out_bit_no;
	u8 impulse_cnt;
};

struct virt_in_io
{
	u32 out;
}__attribute__((__packed__));

struct virt_in_params
{
	u32 in_num;
	u32 impulse;
}__attribute__((__packed__));

struct virt_in_args
{
	struct virt_in_io io;
	struct virt_in_params params;
//	u16 crc;
}__attribute__((__packed__));

extern int virt_in_initlog(void *arguments, void *logic);

#endif /* VIRT_IN_H_ */
