/*
 * tp.h
 *
 *
 *  Created on: 30-04-2014
 *      Author: KJ
 */

#ifndef TP_H_
#define TP_H_

#include "tdefs.h"

struct tp_logic
{
	u8 *out_ptr;
	u8 out_bit_no;

	u8 *in_ptr;
	u8 in_bit_no;

	u8 *reset_ptr;
	u8 reset_bit_no;

	u32 t_cnt;
};

struct tp_io
{
	u32 in;
	u32 reset;
	u32 out;
}__attribute__((__packed__));

struct tp_params
{
	u32 t_delay;
}__attribute__((__packed__));

struct tp_args
{
	struct tp_io io;
	struct tp_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void tp(void *args, void *logic);
extern int tp_initlog(void *args, void *logic);

#endif /* TP_H_ */
