/*
 * edge_det.h
 *
 *
 *  Created on: 28-06-2014
 *      Author: KJ
 */

#ifndef EDGE_DET_H_
#define EDGE_DET_H_

#include "tdefs.h"

struct edge_det_logic
{
	u8 *out_ptr;
	u8 out_bit_mask;

	u8 *in_ptr;
	u8 in_bit_mask;

	u8 prev_state;
};

struct edge_det_io
{
	u32 in;
	u32 out;
}__attribute__((__packed__));

struct edge_det_params
{
	u32 rising;
	u32 falling;
}__attribute__((__packed__));

struct edge_det_args
{
	struct edge_det_io io;
	struct edge_det_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void edge_det(void *args, void *logic);
extern int edge_det_initlog(void *args, void *logic);

#endif /* EDGE_H_ */
