#ifndef __forcedetect_H__
#define __forcedetect_H__
/***************************************************************
copyright from private LiuXiao
if you have any question,you can contact me by email 461445092@qq.com
2022-10-05 17:56:24.020233
***************************************************************/
#include "forceSnsr_Cfg.h"

#ifndef TRUE
#define TRUE  true
#endif

#ifndef FALSE
#define FALSE false
#endif




/***************************datatype define begin************************************/

/***************************datatype define end************************************/

typedef struct
{
	STATE_UINT16 raw;
	STATE_UINT16 baseline;
	STATE_UINT16 autocal;
	STATE_UINT16 int_theshold;
	STATE_UINT16 adc_max;
	STATE_UINT16 fallthr;
	STATE_UINT16 temp;
	STATE_UINT8  Adc_cnt;
	STATE_UINT8  btn_state;
    STATE_UINT8  force_snserr;
    STATE_UINT8 preload;
}detectforce_Reg_Cfg_Main_Str_typ;



/***************************enum define begin************************************/

/***************************enum define end************************************/


/*****************************main control function begin**********************************/
/*********************************main control function end*******************************/


/***************************extern function begin************************************/
extern  void  forcedetect_Init(void);
extern  void  forcedetect_MainTask(void);
extern  STATE_UINT8  Get_forcedetect_btn_is_press_state(void);
/*
return: force press value, value range 0~ 4095
*/
extern  STATE_UINT16  Get_forcedetect_force_value(void);

extern  STATE_UINT16  Get_forcedetect_basline_value(void);

extern STATE_UINT8 Get_forcedetect_SNSERR_value(void);

extern STATE_UINT8 Get_forcedetect_preload_value(void);

/***************************extern function end************************************/


#endif
