#ifndef _BSP_SCAN_H
#define _BSP_SCAN_H
#include "stdint.h"
#include "main.h"
/*32x64 Data_Array*/
typedef struct
{
	uint16_t sensor_iqr_raw_value[AX_NUM];
	uint16_t sensor_iqr_ref_value[AX_NUM][AY_NUM];
	uint16_t sensor_raw_value[AX_NUM];
	uint16_t sensor_ref_value[AX_NUM];
	
	uint16_t sensor_resi_output[AX_NUM];
	uint8_t sensor_display_output[AX_NUM];

	uint8_t sensor_voltage[AX_NUM][AY_NUM];

//	uint16_t sensor1_voltage[AX_NUM][AY_NUM];//16bit
	uint8_t sensor_filter[AX_NUM][AY_NUM];
}adc_value_frame_struct;


typedef enum
{
	REFER_RESISTACE,
	RAW_RESISTACE
}RESISTACE_NAME;



#define RANKS_ADDRESS   (0x08000000 + 1024 * 68)
#define RANKS_HEAD 0XA55AA55A
#define RANKS_TAIL 0X5AA55AA5

void IRQ_Scan(adc_value_frame_struct *adc_raw_value);
void u8_cail_deal(void);
void adc_deal(void);
void scan_deal(void);
void app_user_map_init(void);

//void scan(adc_value_frame_struct *adc_raw_value,uint8_t scan_num);
int line_init(void);
int save_config_ranks(uint8_t x[12],uint8_t y[12]);
#endif
