/*
 * rec_bin.c
 *
 *  Created on: 24-06-2014
 *      Author: KJ
 */


#include "tdefs.h"
#include "misc.h"

#include "rec_bin.h"

int rec_bin_initlog(void *arguments, void *logic)
{
	struct rec_bin_args *args = (struct rec_bin_args *)arguments;
	struct rec_bin_logic *log = (struct rec_bin_logic *)logic;

	log->in_ptr = log_manager.nets_data + (args->io.in >> 3);
	log->in_bit_mask = 1<<(args->io.in & 0x07);

	if(log->in_ptr >= (log_manager.nets_data+sizeof(log_manager.nets_data)))
		return -1;

	return 0;
}

