/*
 * bank_sel.h
 *
 *
 *  Created on: 13-12-2016
 *      Author: KJ
 */

#ifndef BANK_SEL_H_
#define BANK_SEL_H_

#include "tdefs.h"


struct bank_sel_logic
{
	u8 *bank0_ptr;
	u8 bank0_bit_mask;
	u8 *bank1_ptr;
	u8 bank1_bit_mask;
	u8 *bank2_ptr;
	u8 bank2_bit_mask;
	u8 *bank3_ptr;
	u8 bank3_bit_mask;
	u8 *bank4_ptr;
	u8 bank4_bit_mask;
	u8 *bank5_ptr;
	u8 bank5_bit_mask;

	u8 *blok_in;
	u8 blok_in_bit_mask;
	u8 *bank0_out;
	u8 bank0_out_bit_mask;
	u8 *bank1_out;
	u8 bank1_out_bit_mask;
	u8 *bank2_out;
	u8 bank2_out_bit_mask;
	u8 *bank3_out;
	u8 bank3_out_bit_mask;
	u8 *bank4_out;
	u8 bank4_out_bit_mask;
	u8 *bank5_out;
	u8 bank5_out_bit_mask;
	u32 t_cnt;
	u32 sel_bank;
};

struct bank_sel_io
{
	u32 bank0_in;
	u32 bank1_in;
	u32 bank2_in;
	u32 bank3_in;
	u32 bank4_in;
	u32 bank5_in;
	u32 blok_in;
	u32 bank0_out;
	u32 bank1_out;
	u32 bank2_out;
	u32 bank3_out;
	u32 bank4_out;
	u32 bank5_out;
}__attribute__((__packed__));

struct bank_sel_params
{
}__attribute__((__packed__));

struct bank_sel_args
{
	struct bank_sel_io io;
	struct bank_sel_params params;
//	u16 crc;
}__attribute__((__packed__));

extern void bank_sel(void *args, void *logic);
extern int bank_sel_initlog(void *args, void *logic);

#endif /* BANK_SEL_H_ */
