;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Jul  6 2017 15:09:47) (MSVC)
; This file was generated Tue Apr 03 20:29:55 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../kf8ts3514_touch_cs_lib.c"
	.radix dec
	.include "KF8TS3514.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_init_mcu
	.extern	__R2PCL
	.extern	_TOUCH_DEBUG_TRS_DEAL
	.extern	_TOUCH_DEBUG_SEND_OUT
	.extern	_delay_ms
	.extern	_delay_us
	.extern	__divuint
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_PCH_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_C1CTL_bits
	.extern	_VDACS_bits
	.extern	_AMPCTL_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_AMPDT_bits
	.extern	_OPTR_bits
	.extern	_IP0_bits
	.extern	_IP1_bits
	.extern	_IP2_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_OSCSTA_bits
	.extern	_IP3_bits
	.extern	_VRECTL_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR0_bits
	.extern	_IOCL_bits
	.extern	_ADCCTL1_bits
	.extern	_P0LR_bits
	.extern	_P2LR_bits
	.extern	_P1LR_bits
	.extern	_EIE3_bits
	.extern	_EIF3_bits
	.extern	_T3CTL_bits
	.extern	_CTCTL0_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_CTCTL1_bits
	.extern	_INTEDGCTL_bits
	.extern	_VDAC_bits
	.extern	_VRES_bits
	.extern	_C1CAL_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIADD_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_C1FILTCTL_bits
	.extern	_C1FILTPRE_bits
	.extern	_CTCTL2_bits
	.extern	_T4CTL_bits
	.extern	__KF8_LIBi_channel_flag_
	.extern	__KF8_LIBc_channel_
	.extern	__KF8_LIBc_channel_Buf
	.extern	__KF8_LIBi_Date_Change_
	.extern	__KF8_LIBc_baseline_count_
	.extern	__KF8_LIBi_buff_hit_
	.extern	__KF8_LIBi_buff_baseline_
	.extern	__KF8_LIBc_touch_count_
	.extern	_CHS_AMOUNT
	.extern	_TCS_AMOUNT
	.extern	__KF8_Disturb_Protect_Circle_
	.extern	__KF8_DoubleKey_Compages_Limitable_Circle_
	.extern	__KF8_Key_Max_Pressed_Limitable_Circle_
	.extern	__KF8_BaseLine_Update_Circle_Count_For_UP_
	.extern	__KF8_BaseLine_Update_Circle_Count_For_Down_
	.extern	__KF8_Define_Disturb_Channels_Amount_
	.extern	__KF8_BasicLine_UP_Noise_Threshold_
	.extern	__KF8_BasicLine_Down_Noise_Threshold_
	.extern	__KF8_Data_Steady_Threshold_Set_
	.extern	__KF8_Inside_Reference_Channel_Disturb_Threshold_Set_
	.extern	__KF8_Inside_Reference_Channel_Declare_
	.extern	__KF8_Config_Finger_Threshold
	.extern	__KF8_Water_Monitor_
	.extern	__KF8_CONFIG_FINGER_THRESHOLD_IN_WATER_
	.extern	__KF8_TOUCH_CH_EN
	.extern	__KF8_Touch_Protect_Select_
	.extern	__KF8_HIT_UP_THRESHOLD
	.extern	_TCS_COUNT
	.extern	_OSCCAL0_OFFSET
	.extern	_OSCCAL0_MAX
	.extern	_Double_Key_SET_EN_1
	.extern	_Double_Key_SET_EN_2
	.extern	_Double_Key_SET_EN_3
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_PWM1L
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_C1CTL
	.extern	_VDACS
	.extern	_AMPCTL
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_AMPDT
	.extern	_OPTR
	.extern	_IP0
	.extern	_IP1
	.extern	_IP2
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_OSCSTA
	.extern	_IP3
	.extern	_VRECAL1
	.extern	_VRECTL
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PUR0
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_T3CTL
	.extern	_T3L
	.extern	_CTCTL0
	.extern	_T3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_CTCTL1
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_VDAC
	.extern	_VRES
	.extern	_C1CAL
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIADD
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_C1FILTCTL
	.extern	_C1FILTPRE
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_CTCTL2
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL

	.extern I0R1
	.extern I0R7
	.extern I0PSW
	.extern I0PCH
	.extern I1R1
	.extern I1R7
	.extern I1PSW
	.extern I1PCH
	.extern STK11
	.extern STK10
	.extern STK09
	.extern STK08
	.extern STK07
	.extern STK06
	.extern STK05
	.extern STK04
	.extern STK03
	.extern STK02
	.extern STK01
	.extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	__KF8TS3514_Get_Ver_WaterCS_
	.global	__KF8TS3514_Touch_Process_WaterCS_
	.global	__KF8TS3514_Init_Touch_WaterCS_
	.global	__KF8TS3514_Lib_Set_CS_Parameter
	.global	__KF8TS27_Touch_TEST_WaterCS_
	.global	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	.global	__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	.global	__KF8_lib_Key_Double_Timer_Protect_TS_CS_
	.global	__KF8_Work_Delay_Count_For_Flag_TS_CS_
	.global	__KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
	.global	__KF8_lib_Key_Down_Count_TS_CS_
	.global	__KF8_LIBc_finger_OUT_First_TS_CS_
	.global	__KF8_LIBc_finger_OUT_Second_TS_CS_
	.global	__KF8_LIBc_water_monitor_TS_CS_
	.global	__KF8_LIBc_water_monitor_count_TS_CS_
	.global	__KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	.global	__KF8_LIBc_finger_OUT_Second_MAX_TS_CS_
	.global	__KF8_lib_Finded_MAX_I_TS_CS_
	.global	__KF8_lib_Finded_MAX_J_TS_CS_
	.global	__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	.global	__KF8_lib_Finded_MAX_J_Buf_TS_CS_
	.global	__KF8_lib_Finded_MAX_COUNT_TS_CS_
	.global	__KF8_lib_CH_No_WA_Change_Flag_TS_CS_
	.global	__KF8_lib_CH_DW_Change_Count_TS_CS_
	.global	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	.global	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	.global	__KF8_lib_CH_UP_Change_Count_TS_CS_
	.global	__KF8_lib_bahualvtemportemp_TS_CS_
	.global	__KF8_lib_Date_Uchar_Temp_TS_CS_
	.global	_change_buf_KF8_Lib_TS_CS_
	.global	_result_temp_KF8_Lib_TS_CS_
	.global	_i_KF8_lib_TS_CS_
	.global	_Addr_Copy_Char_KF8_Lib_TS_CS_
	.global	_Addr_Copy_Int_KF8_Lib_TS_CS_
	.global	__KF8_LIBi_Touch_New_Date_TS_CS_
	.global	__KF8_Temp_Cur_A_TS_CS_
	.global	__KF8_Temp_Cur_B_TS_CS_
	.global	__KF8_lib_Samp_Times_TS_CS_
	.global	__KF8_LIBi_buff_hit_count_TS_CS_
	.global	__KF8_LIBi_min_buff_TS_CS_
	.global	__KF8_LIBi_max_buff_TS_CS_
	.global	__KF8_Temp_Cur_C_TS_CS_
	.global	__KF8_Temp_Cur_D_TS_CS_
	.global	__KF8_lib_Freq_Conversion_count_TS_CS_
	.global	__OSCCAL0_buff_TS_CS_
	.global	__KF8_lib_Freq_Conversion_flag_TS_CS_
	.global	__KF8_Inside_Reference_Channel_flag_TS_CS_
	.global	_touch_weisuiji_3514_cnt
	.global	__KF8_LIBc_channel_buf1
	.global	__KF8_LIBt_buff_bit_TS_CS_

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_kf8ts3514_touch_cs_lib_0	.udata
__KF8_lib_Wave_Protect_Time_Count_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_1	.udata
__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_2	.udata
__KF8_lib_Key_Double_Timer_Protect_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_3	.udata
__KF8_lib_Touch_Bits_	.res	1

UD_kf8ts3514_touch_cs_lib_4	.udata
__KF8_Work_Delay_Count_For_Flag_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_5	.udata
__KF8_Touch_Sys_Work_Standing_Flag_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_6	.udata
__KF8_lib_Key_Down_Count_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_7	.udata
__KF8_LIBc_finger_OUT_First_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_8	.udata
__KF8_LIBc_finger_OUT_Second_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_9	.udata
__KF8_LIBc_water_monitor_count_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_10	.udata
__KF8_LIBc_finger_OUT_First_MAX_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_11	.udata
__KF8_LIBc_finger_OUT_Second_MAX_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_12	.udata
__KF8_lib_Finded_MAX_I_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_13	.udata
__KF8_lib_Finded_MAX_J_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_14	.udata
__KF8_lib_Finded_MAX_I_Buf_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_15	.udata
__KF8_lib_Finded_MAX_J_Buf_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_16	.udata
__KF8_lib_Finded_MAX_COUNT_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_17	.udata
__KF8_lib_CH_No_WA_Change_Flag_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_18	.udata
__KF8_lib_CH_DW_Change_Count_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_19	.udata
__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_	.res	4

UD_kf8ts3514_touch_cs_lib_20	.udata
__KF8_lib_CH_DW_Change_Flag_TS_CS_	.res	4

UD_kf8ts3514_touch_cs_lib_21	.udata
__KF8_lib_CH_UP_Change_Count_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_22	.udata
__KF8_lib_bahualvtemportemp_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_23	.udata
__KF8_lib_Date_Uchar_Temp_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_24	.udata
_change_buf_KF8_Lib_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_25	.udata
_result_temp_KF8_Lib_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_26	.udata
_i_KF8_lib_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_27	.udata
_Addr_Copy_Char_KF8_Lib_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_28	.udata
_Addr_Copy_Int_KF8_Lib_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_29	.udata
__KF8_LIBi_Touch_New_Date_TS_CS_	.res	4

UD_kf8ts3514_touch_cs_lib_30	.udata
__KF8_Temp_Cur_A_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_31	.udata
__KF8_Temp_Cur_B_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_32	.udata
__KF8_lib_Samp_Times_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_33	.udata
__KF8_LIBi_buff_hit_count_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_34	.udata
__KF8_LIBi_min_buff_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_35	.udata
__KF8_LIBi_max_buff_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_36	.udata
__KF8_Temp_Cur_C_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_37	.udata
__KF8_Temp_Cur_D_TS_CS_	.res	2

UD_kf8ts3514_touch_cs_lib_38	.udata
__KF8_lib_Freq_Conversion_count_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_39	.udata
__OSCCAL0_buff_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_40	.udata
__KF8_lib_Freq_Conversion_flag_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_41	.udata
__KF8_Inside_Reference_Channel_flag_TS_CS_	.res	1

UD_kf8ts3514_touch_cs_lib_42	.udata
_touch_weisuiji_3514_cnt	.res	1

UD_kf8ts3514_touch_cs_lib_43	.udata
__KF8_LIBc_channel_buf1	.res	1

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_kf8ts3514_touch_cs_lib_0	.udata
r0x103B	.res	1
UDL_kf8ts3514_touch_cs_lib_1	.udata
r0x1031	.res	1
UDL_kf8ts3514_touch_cs_lib_2	.udata
r0x1032	.res	1
UDL_kf8ts3514_touch_cs_lib_3	.udata
r0x1033	.res	1
UDL_kf8ts3514_touch_cs_lib_4	.udata
r0x1034	.res	1
UDL_kf8ts3514_touch_cs_lib_5	.udata
r0x1035	.res	1
UDL_kf8ts3514_touch_cs_lib_6	.udata
r0x1036	.res	1
UDL_kf8ts3514_touch_cs_lib_7	.udata
r0x1037	.res	1
UDL_kf8ts3514_touch_cs_lib_8	.udata
r0x1038	.res	1
UDL_kf8ts3514_touch_cs_lib_9	.udata
r0x1039	.res	1
UDL_kf8ts3514_touch_cs_lib_10	.udata
r0x103A	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

ID_kf8ts3514_touch_cs_lib_0	.idata
__KF8_LIBc_water_monitor_TS_CS_
	.db	0xff


ID_kf8ts3514_touch_cs_lib_1	.code
__KF8_LIBt_buff_bit_TS_CS_
	RRET R0, #0x01
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x02
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x04
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x08
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x10
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x20
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x40
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x80
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x01
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x02
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x04
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x08
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x10
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x20
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x40
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x80
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x01
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x02
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x04
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x08
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x10
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x00
	RRET R0, #0x20
	RRET R0, #0x00

;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr


func.__KF8TS3514_Get_Ver_WaterCS_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8TS3514_Get_Ver_WaterCS_	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8TS3514_Get_Ver_WaterCS_	;Function start
; 2 exit points
;	op : RETURN
;	.line	4565; "../kf8ts3514_touch_cs_lib.c"	return Ver_TS_W_CS;
	MOV	R0,# 0xc2
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __KF8TS3514_Get_Ver_WaterCS_



func.__KF8TS27_Touch_TEST_WaterCS_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8TS27_Touch_TEST_WaterCS_	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8TS27_Touch_TEST_WaterCS_	;Function start
; 2 exit points
;	op : INLINEASM
	CLR PSW,0
	BANKSEL __KF8_LIBc_channel_
	RLCR __KF8_LIBc_channel_
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV _Addr_Copy_Int_KF8_Lib_TS_CS_,R0
	
;	op : INLINEASM
	;;
	BANKSEL _CTCTL1
	CLR _CTCTL1,5
	BANKSEL _T4H
	MOV R0,_T4H
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R0
	BANKSEL _T4L
	MOV R0,_T4L
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_,R0
	CLR PSW,0
	RRC __KF8_Temp_Cur_A_TS_CS_+1
	RRC __KF8_Temp_Cur_A_TS_CS_
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;偏移量
	ADD R0,# (__KF8_LIBi_buff_hit_ + 1)
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	CLR PSW,0
	RRC R1
	ST [R0],R1
	DEC R0
	LD R1,[R0]
	RRC R1
	ST [R0],R1
	;;均取1/2后的求和作为结果
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	ADD __KF8_Temp_Cur_A_TS_CS_,R1
	INC R0
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	JNB PSW,0
	INC R1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	ADD R1,__KF8_Temp_Cur_A_TS_CS_+1
	BANKSEL __KF8_LIBi_buff_hit_
	ST [R0],R1
	DEC R0
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R1,__KF8_Temp_Cur_A_TS_CS_
	BANKSEL __KF8_LIBi_buff_hit_
	ST [R0],R1
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	4447; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Work_Flag)
	BANKSEL	__KF8_lib_Touch_Bits_
	JNB	__KF8_lib_Touch_Bits_, 0
	JMP	_00124_DS_
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_)
	BANKSEL __KF8_LIBi_buff_hit_ ;;_KF8_LIBi_buff_hit_ low
	LD R1,[R0]
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ low
	ST [R0],R1
	;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_+1)
	BANKSEL __KF8_LIBi_buff_hit_ ;; _KF8_LIBi_buff_hit_ high
	LD R1,[R0]
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_+1)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ high
	ST [R0],R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_ ;;偏移量
	ADD R0, #(__KF8_LIBc_touch_count_)
	MOV R1,#0X00
	BANKSEL __KF8_LIBc_touch_count_
	ST [R0],R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_ ;;偏移量
	ADD R0, #(__KF8_LIBc_baseline_count_)
	MOV R1,#0x00
	BANKSEL __KF8_LIBc_baseline_count_
	ST [R0],R1
	
;	op : IFX
;	.line	4496; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_LIBc_channel_==0)
	MOV	R0,# 0x00
	BANKSEL	__KF8_LIBc_channel_
	ORL	R0, __KF8_LIBc_channel_
	JB	PSW, 2
	JMP	_00124_DS_
;	op : +
;	.line	4500; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Date_Uchar_Temp_TS_CS_++;
	BANKSEL	__KF8_lib_Date_Uchar_Temp_TS_CS_
	INC	__KF8_lib_Date_Uchar_Temp_TS_CS_
;	op : >
;swapping arguments (AOP_TYPEs 1/3)
;unsigned compare: left >= lit(0x20=32), size=1
;	.line	4501; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Date_Uchar_Temp_TS_CS_>31) //每扫描1圈记一次，n圈后进入工作状态
	MOV	R0,# 0x20
	BANKSEL	__KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB	R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
;comparing bytes at offset 0
	JB	PSW, 0
	JMP	_00124_DS_
;	op : =
;	.line	4503; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Work_Flag=1;  //进入工作状态
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 0
;	op : LABEL
;	op : INLINEASM
_00124_DS_
	MOV R1,# high (_CHS_AMOUNT+0)
	MOV R0,# low (_CHS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBc_channel_
	INC __KF8_LIBc_channel_
	XOR R0,__KF8_LIBc_channel_
	JNB PSW,2
	CLR __KF8_LIBc_channel_
	
;	op : =
;	.line	4535; "../kf8ts3514_touch_cs_lib.c"	T3H = 0;T3L = 0;
	BANKSEL	_T3H
	CLR	_T3H
;	op : =
	BANKSEL	_T3L
	CLR	_T3L
;	op : =
;	.line	4536; "../kf8ts3514_touch_cs_lib.c"	T4H = 0;T4L = 0;
	BANKSEL	_T4H
	CLR	_T4H
;	op : =
	BANKSEL	_T4L
	CLR	_T4L
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_
	ADD R0, # low (__KF8_TOUCH_CH_EN+0)
	MOV R1, # high (__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	ORL R0,#0xe0 ;;
	BANKSEL CTCTL0
	MOV CTCTL0,R0
	
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __KF8TS27_Touch_TEST_WaterCS_



func.__KF8TS3514_Touch_Process_WaterCS_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8TS3514_Touch_Process_WaterCS_	;Function start
; 2 exit points
;has an exit
;functions called:
;   __R2PCL
;   __divuint
;   __KF8_LIBf_scan_channel_
;   __KF8_LiBf_KEY_Deal_AND_BaseLine_Up
;   __R2PCL
;   __divuint
;   __KF8_LIBf_scan_channel_
;   __KF8_LiBf_KEY_Deal_AND_BaseLine_Up
;6 compiler assigned registers:
;   r0x1038
;   r0x1039
;   r0x103A
;   STK02
;   STK01
;   STK00
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8TS3514_Touch_Process_WaterCS_	;Function start
; 2 exit points
;	op : INLINEASM
	CLR PSW,0
	BANKSEL __KF8_LIBc_channel_
	RLCR __KF8_LIBc_channel_
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV _Addr_Copy_Int_KF8_Lib_TS_CS_,R0
	
;	op : INLINEASM
	;;
	BANKSEL _CTCTL1
	CLR _CTCTL1,5
	BANKSEL __KF8_lib_Touch_Bits_ ;;
	PAGESEL Read_T3_IN
	JB __KF8_lib_Touch_Bits_,3
	JMP Read_T3_IN
Read_T4_IN:
	BANKSEL _T4H
	MOV R1,_T4H
	BANKSEL _T4L
	MOV R0,_T4L
	PAGESEL Read_T_End
	JMP Read_T_End
Read_T3_IN:
	BANKSEL _T3H
	MOV R1,_T3H
	BANKSEL _T3L
	MOV R0,_T3L
Read_T_End:
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_+1,R1
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	;;
	;;---------------------------------
	;;==
	MOV R0,#(1)
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	ADD __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	JNB PSW,0
	INC __KF8_LIBi_Touch_New_Date_TS_CS_+1
	;;==;
	MOV R0,#1
	INC R0
	PAGESEL IIR_Deal_NEXT_1
	JMP IIR_Deal_NEXT_1
IIR_Deal_DO_1:
	CLR PSW,0
	RRC __KF8_LIBi_Touch_New_Date_TS_CS_+1
	RRC __KF8_LIBi_Touch_New_Date_TS_CS_
IIR_Deal_NEXT_1:
	PAGESEL IIR_Deal_DO_1
	DECJZ R0
	JMP IIR_Deal_DO_1
	;;-----------------------------------
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_hit_+0)
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_,R1
	INC R0
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R1 ;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R0,__KF8_Temp_Cur_A_TS_CS_
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV __KF8_Temp_Cur_B_TS_CS_,R0
	MOV __KF8_Temp_Cur_B_TS_CS_+1,R1 ;
	;;==
	MOV R0,#(1)
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	ADD __KF8_Temp_Cur_B_TS_CS_,R0
	JNB PSW,0
	INC __KF8_Temp_Cur_B_TS_CS_+1
	;;==;
	MOV R0,#1
	INC R0
	PAGESEL IIR_Deal_NEXT_2
	JMP IIR_Deal_NEXT_2
IIR_Deal_DO_2:
	CLR PSW,0
	RRC __KF8_Temp_Cur_B_TS_CS_+1
	RRC __KF8_Temp_Cur_B_TS_CS_
IIR_Deal_NEXT_2:
	PAGESEL IIR_Deal_DO_2
	DECJZ R0
	JMP IIR_Deal_DO_2 ;
	MOV R0,__KF8_Temp_Cur_B_TS_CS_
	MOV R1,__KF8_Temp_Cur_B_TS_CS_+1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB __KF8_Temp_Cur_A_TS_CS_,R0
	JB PSW,0
	DEC __KF8_Temp_Cur_A_TS_CS_+1
	SUB __KF8_Temp_Cur_A_TS_CS_+1,R1
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	ADD __KF8_Temp_Cur_A_TS_CS_,R0
	JNB PSW,0
	INC R1
	ADD __KF8_Temp_Cur_A_TS_CS_+1,R1 ;
	MOV R1,__KF8_Temp_Cur_A_TS_CS_
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_hit_+0)
	BANKSEL __KF8_LIBi_buff_hit_
	ST[R0],R1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R1,__KF8_Temp_Cur_A_TS_CS_+1
	INC R0
	BANKSEL __KF8_LIBi_buff_hit_
	ST[R0],R1
	;;-----------------------------------
	
;	op : =
;gen_assign from CODESPACE
;	.line	4108; "../kf8ts3514_touch_cs_lib.c"	if(TCS_COUNT>1)
	MOV	R1,# high (_TCS_COUNT+0)
	MOV	R0,# low (_TCS_COUNT+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1038
	MOV	r0x1038, R0
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x2=2), size=1
	MOV	R0,# 0x02
	BANKSEL	r0x1038
	SUB	R0, r0x1038
;comparing bytes at offset 0
	JB	PSW, 0
	JMP	_00082_DS_
;	op : IFX
;	.line	4110; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Samp_Times_TS_CS_==0)
	MOV	R0,# 0x00
	BANKSEL	__KF8_lib_Samp_Times_TS_CS_
	ORL	R0, __KF8_lib_Samp_Times_TS_CS_
	JB	PSW, 2
	JMP	_00078_DS_
;	op : =
;	.line	4112; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Samp_Times_TS_CS_=TCS_COUNT;
	BANKSEL	r0x1038
	MOVZ	R0, r0x1038
	BANKSEL	__KF8_lib_Samp_Times_TS_CS_
	MOV	__KF8_lib_Samp_Times_TS_CS_, R0
;	op : =
;	.line	4113; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Change_channel_Flag =1;
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 4
;	op : =
;	.line	4114; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBi_buff_hit_count_TS_CS_=0;
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	CLR	__KF8_LIBi_buff_hit_count_TS_CS_
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	CLR	(__KF8_LIBi_buff_hit_count_TS_CS_ + 1)
;	op : CAST
;	.line	4115; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_bahualvtemportemp_TS_CS_=TCS_COUNT;
	BANKSEL	r0x1038
	MOVZ	R0, r0x1038
	BANKSEL	__KF8_lib_bahualvtemportemp_TS_CS_
	MOV	__KF8_lib_bahualvtemportemp_TS_CS_, R0
	BANKSEL	__KF8_lib_bahualvtemportemp_TS_CS_
	CLR	(__KF8_lib_bahualvtemportemp_TS_CS_ + 1)
;	op : LABEL
;	op : LEFT_OP
_00078_DS_
;	.line	4119; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBi_buff_hit_count_TS_CS_+=_KF8_LIBi_buff_hit_[_KF8_LIBc_channel_];
	CLR	PSW, 0
	BANKSEL	__KF8_LIBc_channel_
	RLCR	__KF8_LIBc_channel_
	BANKSEL	r0x1038
	MOV	r0x1038, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x1038
	ADD	r0x1038, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1038
	MOV	R1, r0x1038
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x1039
	MOV	r0x1039, R0
	INC	R1
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103A
	MOV	r0x103A, R0
;	op : +
	BANKSEL	r0x1039
	MOV	R0, r0x1039
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	ADD	__KF8_LIBi_buff_hit_count_TS_CS_, R0
	BANKSEL	r0x103A
	MOVZ	R0, r0x103A
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00133_DS_
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	ADD	(__KF8_LIBi_buff_hit_count_TS_CS_ + 1), R0
;	op : -
_00133_DS_
;	.line	4120; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Samp_Times_TS_CS_--;
	BANKSEL	__KF8_lib_Samp_Times_TS_CS_
	DEC	__KF8_lib_Samp_Times_TS_CS_
;	op : IFX
;	.line	4121; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Samp_Times_TS_CS_==0)
	MOV	R0,# 0x00
	BANKSEL	__KF8_lib_Samp_Times_TS_CS_
	ORL	R0, __KF8_lib_Samp_Times_TS_CS_
	JB	PSW, 2
	JMP	_00082_DS_
;	op : =
;	.line	4123; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Change_channel_Flag=0;
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 4
;	op : LEFT_OP
;	.line	4124; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBi_buff_hit_[_KF8_LIBc_channel_]=_KF8_LIBi_buff_hit_count_TS_CS_/_KF8_lib_bahualvtemportemp_TS_CS_;
	CLR	PSW, 0
	BANKSEL	__KF8_LIBc_channel_
	RLCR	__KF8_LIBc_channel_
	BANKSEL	r0x1038
	MOV	r0x1038, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x1038
	ADD	r0x1038, R0
;	op : CAST
	BANKSEL	__KF8_lib_bahualvtemportemp_TS_CS_
	MOVZ	R0, __KF8_lib_bahualvtemportemp_TS_CS_
	BANKSEL	r0x1039
	MOV	r0x1039, R0
	BANKSEL	__KF8_lib_bahualvtemportemp_TS_CS_
	MOVZ	R0, (__KF8_lib_bahualvtemportemp_TS_CS_ + 1)
	BANKSEL	r0x103A
	MOV	r0x103A, R0
;	op : SEND
;	op : SEND
;	op : CALL
	BANKSEL	r0x1039
	MOVZ	R0, r0x1039
	BANKSEL	STK02
	MOV	STK02, R0
	BANKSEL	r0x103A
	MOVZ	R0, r0x103A
	BANKSEL	STK01
	MOV	STK01, R0
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	MOVZ	R0, __KF8_LIBi_buff_hit_count_TS_CS_
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	__KF8_LIBi_buff_hit_count_TS_CS_
	MOVZ	R0, (__KF8_LIBi_buff_hit_count_TS_CS_ + 1)
	PAGESEL	__divuint
	CALL	__divuint
	PAGESEL	$
	BANKSEL	r0x103A
	MOV	r0x103A, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1039
	MOV	r0x1039, R0
;	op : =
	BANKSEL	r0x1039
	MOVZ	R0, r0x1039
	BANKSEL	r0x1038
	MOV	R1, r0x1038
	BANKSEL	__KF8_LIBi_buff_hit_
	ST	[R1], R0
	INC	R1
	BANKSEL	r0x103A
	MOVZ	R0, r0x103A
	BANKSEL	__KF8_LIBi_buff_hit_
	ST	[R1], R0
;	op : LABEL
;	op : =
_00082_DS_
;	.line	4132; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBc_channel_buf1=_KF8_LIBc_channel_;
	BANKSEL	__KF8_LIBc_channel_
	MOVZ	R0, __KF8_LIBc_channel_
	BANKSEL	__KF8_LIBc_channel_buf1
	MOV	__KF8_LIBc_channel_buf1, R0
;	op : INLINEASM
	BANKSEL __KF8_lib_Touch_Bits_
	PAGESEL label_2016_07_28
	JNB __KF8_lib_Touch_Bits_,4
	JMP label_2016_07_28
	MOV R1,# high (_CHS_AMOUNT+0)
	MOV R0,# low (_CHS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBc_channel_buf1
	INC __KF8_LIBc_channel_buf1
	XOR R0,__KF8_LIBc_channel_buf1
	JNB PSW,2
	CLR __KF8_LIBc_channel_buf1
label_2016_07_28:
	
;	op : =
;	.line	4163; "../kf8ts3514_touch_cs_lib.c"	T3H = 0;T3L = 0;
	BANKSEL	_T3H
	CLR	_T3H
;	op : =
	BANKSEL	_T3L
	CLR	_T3L
;	op : GET_VALUE_AT_ADDRESS
;	.line	4164; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 2
	JMP	_00084_DS_
;	op : INLINEASM
	MOVB #0x00
	CLR 0x53,5
	
;	op : LABEL
;	op : =
_00084_DS_
;	.line	4174; "../kf8ts3514_touch_cs_lib.c"	T4H = 0;T4L = 0;
	BANKSEL	_T4H
	CLR	_T4H
;	op : =
	BANKSEL	_T4L
	CLR	_T4L
;	op : =
;	.line	4175; "../kf8ts3514_touch_cs_lib.c"	AIEL = 0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 6
;	op : =
;	.line	4176; "../kf8ts3514_touch_cs_lib.c"	AIEH = 0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 7
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_buf1
	MOV R0, __KF8_LIBc_channel_buf1
	ADD R0, # low (__KF8_TOUCH_CH_EN+0)
	MOV R1, # high (__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	ORL R0,#0xe0 ;;
	BANKSEL _INTCTL
	CLR _INTCTL,6
	CLR _INTCTL,7 ;
	BANKSEL _CTCTL0
	MOV _CTCTL0,R0
	NOP
	JB _CTCTL0,6 ;
	JMP $-3
	BANKSEL _CTCTL1
	SET _CTCTL1,5
	
;	op : =
;	.line	4205; "../kf8ts3514_touch_cs_lib.c"	touch_weisuiji_3514_cnt=0;
	BANKSEL	_touch_weisuiji_3514_cnt
	CLR	_touch_weisuiji_3514_cnt
;	op : LABEL
;	op : BITWISEAND
_00087_DS_
;	.line	4206; "../kf8ts3514_touch_cs_lib.c"	while(!(CTCTL1&0X04))
	BANKSEL	_CTCTL1
	JNB	_CTCTL1, 2
	JMP	_00089_DS_
;	op : =
;	.line	4209; "../kf8ts3514_touch_cs_lib.c"	if(touch_weisuiji_3514_cnt++>20)			//兼容老版本没有该位置清零
	BANKSEL	_touch_weisuiji_3514_cnt
	MOVZ	R0, _touch_weisuiji_3514_cnt
	BANKSEL	r0x1038
	MOV	r0x1038, R0
;	op : +
	BANKSEL	_touch_weisuiji_3514_cnt
	INC	_touch_weisuiji_3514_cnt
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x15=21), size=1
	MOV	R0,# 0x15
	BANKSEL	r0x1038
	SUB	R0, r0x1038
;comparing bytes at offset 0
	JB	PSW, 0
	JMP	_00087_DS_
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00089_DS_
;	.line	4217; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 2
	JMP	_00091_DS_
;	op : INLINEASM
	MOVB #0x00
	SET 0x53,5
	
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00091_DS_
;	.line	4224; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Count_Use_T4)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 3
	JMP	_00093_DS_
;	op : =
;	.line	4226; "../kf8ts3514_touch_cs_lib.c"	T4L = 0;    T4H = 0; 	T4ON=1;		// T3 T4 如果分频 外部可设置
	BANKSEL	_T4L
	CLR	_T4L
;	op : =
	BANKSEL	_T4H
	CLR	_T4H
;	op : =
	BANKSEL	_T4CTL_bits
	SET	_T4CTL_bits, 0
;	op : LABEL
;	op : =
_00093_DS_
;	.line	4228; "../kf8ts3514_touch_cs_lib.c"	AIEL=1;		AIEH=1;// 恢复中断使能
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 6
;	op : =
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 7
;	op : GET_VALUE_AT_ADDRESS
;	.line	4233; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Work_Flag)
	BANKSEL	__KF8_lib_Touch_Bits_
	JNB	__KF8_lib_Touch_Bits_, 0
	JMP	_00101_DS_
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_)
	BANKSEL __KF8_LIBi_buff_hit_ ;;_KF8_LIBi_buff_hit_ low
	LD R1,[R0]
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ low
	ST [R0],R1
	;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_+1)
	BANKSEL __KF8_LIBi_buff_hit_ ;; _KF8_LIBi_buff_hit_ high
	LD R1,[R0]
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_+1)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ high
	ST [R0],R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_ ;;偏移量
	ADD R0, #(__KF8_LIBc_touch_count_)
	MOV R1,#0X00
	BANKSEL __KF8_LIBc_touch_count_
	ST [R0],R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_ ;;偏移量
	ADD R0, #(__KF8_LIBc_baseline_count_)
	MOV R1,#0x00
	BANKSEL __KF8_LIBc_baseline_count_
	ST [R0],R1
	
;	op : IFX
;	.line	4281; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_LIBc_channel_==0)
	MOV	R0,# 0x00
	BANKSEL	__KF8_LIBc_channel_
	ORL	R0, __KF8_LIBc_channel_
	JB	PSW, 2
	JMP	_00102_DS_
;	op : INLINEASM
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	INC __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0, #0X78
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL label_over
	JB PSW, 0
	JMP label_over
	BANKSEL __KF8_lib_Touch_Bits_
	SET __KF8_lib_Touch_Bits_, 0
label_over:
	
;	op : GOTO
	JMP	_00102_DS_
;	op : LABEL
;	op : INLINEASM
_00101_DS_
	BANKSEL __KF8_Work_Delay_Count_For_Flag_TS_CS_
	INC __KF8_Work_Delay_Count_For_Flag_TS_CS_
	MOV R0,#0X01
	BANKSEL __KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
	JB PSW,2 ;;255+1的溢出后
	MOV __KF8_Touch_Sys_Work_Standing_Flag_TS_CS_,R0
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	4328; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Change_channel_Flag==0)
	BANKSEL	__KF8_lib_Touch_Bits_
	JNB	__KF8_lib_Touch_Bits_, 4
	JMP	_00102_DS_
;	op : CALL
;	.line	4330; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBf_scan_channel_(); //扫描AD通道,计算变化率，做变化统计
	PAGESEL	__KF8_LIBf_scan_channel_
	CALL	__KF8_LIBf_scan_channel_
	PAGESEL	$
;	op : IFX
;	.line	4332; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_LIBc_channel_==0)
	MOV	R0,# 0x00
	BANKSEL	__KF8_LIBc_channel_
	ORL	R0, __KF8_LIBc_channel_
	JB	PSW, 2
	JMP	_00102_DS_
;	op : CALL
;	.line	4334; "../kf8ts3514_touch_cs_lib.c"	_KF8_LiBf_KEY_Deal_AND_BaseLine_Up();
	PAGESEL	__KF8_LiBf_KEY_Deal_AND_BaseLine_Up
	CALL	__KF8_LiBf_KEY_Deal_AND_BaseLine_Up
	PAGESEL	$
;	op : LABEL
;	op : INLINEASM
_00102_DS_
	BANKSEL __KF8_lib_Touch_Bits_
	PAGESEL label_2016_01_25
	JNB __KF8_lib_Touch_Bits_,4
	JMP label_2016_01_25
	MOV R1,# high (_CHS_AMOUNT+0)
	MOV R0,# low (_CHS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBc_channel_
	INC __KF8_LIBc_channel_
	XOR R0,__KF8_LIBc_channel_
	JNB PSW,2
	CLR __KF8_LIBc_channel_
label_2016_01_25:
	
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __KF8TS3514_Touch_Process_WaterCS_



func.__KF8_LIBf_scan_channel_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8_LIBf_scan_channel_	;Function start
; 2 exit points
;has an exit
;functions called:
;   __KF8_Lib_Date_Change_get_
;   __R2PCL
;   __KF8_Lib_Date_Change_get_
;   __R2PCL
;1 compiler assigned register :
;   r0x1031
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8_LIBf_scan_channel_	;Function start
; 2 exit points
;	op : INLINEASM
	CLR PSW,0
	BANKSEL __KF8_LIBc_channel_
	RLCR __KF8_LIBc_channel_
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV _Addr_Copy_Int_KF8_Lib_TS_CS_,R0
	
;	op : INLINEASM
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,#0x01
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	INC R0
	PAGESEL RLCSel
	JMP RLCSel
RLCDeal:
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	CLR PSW,0
	RLC __KF8_LIBi_Touch_New_Date_TS_CS_
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
RLCSel:
	PAGESEL RLCDeal
	DECJZ R0
	JMP RLCDeal
	
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R1,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R1,#(__KF8_LIBi_buff_hit_+0)
	;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_buff_hit_
	LD R0,[R1]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_, R0
	;;;;;;;;;;;;;;;
	INC R1
	BANKSEL __KF8_LIBi_buff_hit_
	LD R0,[R1]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV (__KF8_Temp_Cur_A_TS_CS_+1), R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R1,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R1,#(__KF8_LIBi_buff_baseline_+0)
	;;;;
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R0,[R1]
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV __KF8_Temp_Cur_B_TS_CS_, R0
	;;;;
	INC R1
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R0,[R1]
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV (__KF8_Temp_Cur_B_TS_CS_+1), R0
	
;	op : CALL
;	.line	3049; "../kf8ts3514_touch_cs_lib.c"	_KF8_Lib_Date_Change_get_();
	PAGESEL	__KF8_Lib_Date_Change_get_
	CALL	__KF8_Lib_Date_Change_get_
	PAGESEL	$
;	op : INLINEASM
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06271109
	JB (__KF8_lib_bahualvtemportemp_TS_CS_ + 1),7 ;
	JMP lable_06271109 ;
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_BasicLine_UP_Noise_Threshold_)
	MOV R1,#high(__KF8_BasicLine_UP_Noise_Threshold_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06271109
	JNB PSW, 0 ;;
	JMP lable_06271109 ;
	BANKSEL __KF8_lib_CH_UP_Change_Count_TS_CS_
	INC __KF8_lib_CH_UP_Change_Count_TS_CS_
lable_06271109:
	
;	op : INLINEASM
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06261552
	JNB (__KF8_lib_bahualvtemportemp_TS_CS_ + 1),7 ;
	JMP lable_06261552 ;
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_BasicLine_Down_Noise_Threshold_)
	MOV R1,#high(__KF8_BasicLine_Down_Noise_Threshold_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06261552
	JB PSW, 0 ;;
	JMP lable_06261552 ;
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	MOV R1,(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+1)
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0 ,__KF8_LIBi_Touch_New_Date_TS_CS_
	AND R1,(__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	ORL R0,R1
	PAGESEL lable_06261552
	JB PSW,2
	JMP lable_06261552
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	MOV R0,(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+2)
	MOV R1,(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+3)
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,(__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	AND R1,(__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	ORL R0,R1
	PAGESEL lable_06261552
	JB PSW,2
	JMP lable_06261552
	;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R1,(__KF8_lib_CH_DW_Change_Flag_TS_CS_+1)
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0 ,__KF8_LIBi_Touch_New_Date_TS_CS_
	AND R1,(__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	ORL R0,R1
	PAGESEL lable_06261552
	JB PSW,2
	JMP lable_06261552
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,(__KF8_lib_CH_DW_Change_Flag_TS_CS_+2)
	MOV R1,(__KF8_lib_CH_DW_Change_Flag_TS_CS_+3)
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,(__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	AND R1,(__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	ORL R0,R1
	PAGESEL lable_06261552
	JB PSW,2
	JMP lable_06261552
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_CH_DW_Change_Count_TS_CS_
	INC __KF8_lib_CH_DW_Change_Count_TS_CS_
lable_06261552:
;	op : INLINEASM
	;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R0,__KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV _change_buf_KF8_Lib_TS_CS_,R0
	MOV _change_buf_KF8_Lib_TS_CS_+1,R1
	;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB _change_buf_KF8_Lib_TS_CS_,R1
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	JB PSW,0
	INC R1
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB _change_buf_KF8_Lib_TS_CS_+1,R1
	;;
	PAGESEL _KF8_LIBf_scan_channel_DS_0003
	JB _change_buf_KF8_Lib_TS_CS_+1,7
	JMP _KF8_LIBf_scan_channel_DS_0003
	CPL _change_buf_KF8_Lib_TS_CS_
	CPL _change_buf_KF8_Lib_TS_CS_+1
	INC _change_buf_KF8_Lib_TS_CS_
	JNB PSW,2
	INC _change_buf_KF8_Lib_TS_CS_+1
	;;
_KF8_LIBf_scan_channel_DS_0003:
	MOV R1,#High(__KF8_Data_Steady_Threshold_Set_+0)
	MOV R0,#Low(__KF8_Data_Steady_Threshold_Set_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	MOV R1,_change_buf_KF8_Lib_TS_CS_+1
	XOR R1,#0x00
	PAGESEL _KF8_LIBf_scan_channel_DS_0004
	JB PSW,2 ;;
	JMP _KF8_LIBf_scan_channel_DS_0004 ;
	SUB R0,_change_buf_KF8_Lib_TS_CS_ ;;
	PAGESEL _KF8_LIBf_scan_channel_DS_0005
	JB PSW,0 ;;
	JMP _KF8_LIBf_scan_channel_DS_0005 ;
	;;
_KF8_LIBf_scan_channel_DS_0004:
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	ADD R0,#(__KF8_LIBc_baseline_count_+0)
	MOV R1,#0x00
	BANKSEL __KF8_LIBc_baseline_count_
	ST [R0],R1
_KF8_LIBf_scan_channel_DS_0005:
	
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_
	BANKSEL __KF8_LIBi_Date_Change_
	ST [R0],R1
	INC R0
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	BANKSEL __KF8_LIBi_Date_Change_
	ST [R0],R1
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	3255; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag || _KF8_Touch_Protect_Select_)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 1
	JMP	_00071_DS_
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Touch_Protect_Select_+0)
	MOV	R0,# low (__KF8_Touch_Protect_Select_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1031
	ORL	R0, r0x1031
	JNB	PSW, 2
	JMP	_00074_DS_
;	op : LABEL
;	op : INLINEASM
_00071_DS_
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+1
	;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	ORL R1,R0
	PAGESEL lable_10301649
	JB PSW,2
	JMP lable_10301649
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_+2
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+3
	;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	ORL R1,R0
	PAGESEL lable_06290931
	JNB PSW,2
	JMP lable_06290931
	;;;;;;;;;;;;;;;;;;;;;;;;
lable_10301649:
	MOV R0,#low(__KF8_CONFIG_FINGER_THRESHOLD_IN_WATER_+0)
	MOV R1,#high(__KF8_CONFIG_FINGER_THRESHOLD_IN_WATER_+0)
	PAGESEL lable_06290946
	JMP lable_06290946
	;;;;;;;;;;;;;;;;;;;;;;;;
lable_06290931:
	MOV R0,#low(__KF8_Config_Finger_Threshold+0)
	MOV R1,#high(__KF8_Config_Finger_Threshold+0)
	;;;;;;;;;;;;;;;;;;;;;;
lable_06290946:
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	JNB PSW,0
	INC R1
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	INCR __KF8_lib_Date_Uchar_Temp_TS_CS_
	;;;;;;;;;;;;;;;;;
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1,R0
	
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+1)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	PAGESEL lable_06291011
	JNB R1,7
	JMP lable_06291011
	;;;;;;;;;;;;;;;;;;;;
	DEC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R1,__KF8_lib_bahualvtemportemp_TS_CS_
	;;;;;
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	JB PSW,0
	INC R1
	;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06291011
	JNB PSW,0 ;;
	JMP lable_06291011
	;;;
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV _change_buf_KF8_Lib_TS_CS_+1,R1
	DEC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV _change_buf_KF8_Lib_TS_CS_,R1
	;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB _change_buf_KF8_Lib_TS_CS_,R1
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	JB PSW,0
	INC R1
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB _change_buf_KF8_Lib_TS_CS_+1,R1
	;;;;;;;;;;;;;;;;;;;;;;;;;
	CLR R0
	BANKSEL __KF8_lib_Finded_MAX_COUNT_TS_CS_
	XOR R0,__KF8_lib_Finded_MAX_COUNT_TS_CS_
	PAGESEL lable_06291022
	JB PSW,2
	JMP lable_06291022
	;;; ;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_TS_CS_,R0
	;;;
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV R0,_change_buf_KF8_Lib_TS_CS_
	MOV R1,_change_buf_KF8_Lib_TS_CS_+1
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_Buf_TS_CS_,R0
	MOV __KF8_lib_Finded_MAX_I_Buf_TS_CS_+1,R1
	;;;
	MOV R0,#0x01
	BANKSEL __KF8_lib_Finded_MAX_COUNT_TS_CS_
	MOV __KF8_lib_Finded_MAX_COUNT_TS_CS_,R0
	PAGESEL lable_06291011
	JMP lable_06291011
lable_06291022:
	; 3523 "../kf8ts3514_touch_cs_lib.c"
lable_06291042:
	;;;
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV R0,_change_buf_KF8_Lib_TS_CS_
	BANKSEL __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	SUB R0,__KF8_lib_Finded_MAX_J_Buf_TS_CS_
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV R0,_change_buf_KF8_Lib_TS_CS_+1
	JB PSW,0
	INC R0
	BANKSEL __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	SUB R0,__KF8_lib_Finded_MAX_J_Buf_TS_CS_+1
	PAGESEL lable_06291011
	JNB PSW,0 ;;
	JMP lable_06291011
	;;;;
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB R0,_change_buf_KF8_Lib_TS_CS_
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_Buf_TS_CS_+1
	JB PSW,0
	INC R0
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	SUB R0,_change_buf_KF8_Lib_TS_CS_+1
	PAGESEL lable_06291124
	JNB PSW,0 ;;
	JMP lable_06291124
	;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_TS_CS_,R0
	;;;
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV R0,_change_buf_KF8_Lib_TS_CS_
	MOV R1,_change_buf_KF8_Lib_TS_CS_+1
	BANKSEL __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_Buf_TS_CS_,R0
	MOV __KF8_lib_Finded_MAX_J_Buf_TS_CS_+1,R1
	PAGESEL lable_06291011
	JMP lable_06291011
	;;;;
lable_06291124:
	;;;
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_TS_CS_
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_TS_CS_,R0
	;;;
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV R1,__KF8_lib_Finded_MAX_I_Buf_TS_CS_+1
	BANKSEL __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_Buf_TS_CS_,R0
	MOV __KF8_lib_Finded_MAX_J_Buf_TS_CS_+1,R1
	;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_TS_CS_,R0
	;;;
	BANKSEL _change_buf_KF8_Lib_TS_CS_
	MOV R0,_change_buf_KF8_Lib_TS_CS_
	MOV R1,_change_buf_KF8_Lib_TS_CS_+1
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_Buf_TS_CS_,R0
	MOV __KF8_lib_Finded_MAX_I_Buf_TS_CS_+1,R1
lable_06291011:
	
;	op : INLINEASM
	;;
	MOV R1,#Low(6)
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB __KF8_lib_bahualvtemportemp_TS_CS_,R1
	JB PSW,0
	DEC __KF8_lib_bahualvtemportemp_TS_CS_+1
	
;	op : INLINEASM
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+1)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	PAGESEL _DS_UP_Key_Count_003
	JNB R1,7
	JMP _DS_UP_Key_Count_003
	DEC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R1,__KF8_lib_bahualvtemportemp_TS_CS_ ;
	PAGESEL _DS_UP_Key_Count_002
	JB PSW,0 ;
	JMP _DS_UP_Key_Count_002
_DS_UP_Key_Count_003:
	
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R1
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	INC R0
	SUB R0,__KF8_lib_Date_Uchar_Temp_TS_CS_ ;
	PAGESEL _DS_UP_Key_Count_001
	JB PSW,0
	JMP _DS_UP_Key_Count_001
	
;	op : INLINEASM
	MOV R1,# high (_TCS_AMOUNT+0)
	MOV R0,# low (_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CLR PSW,0
	RLC R0
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R1, __KF8_LIBc_channel_
	ADD R1, #(__KF8_LIBc_touch_count_)
	BANKSEL __KF8_LIBc_touch_count_
	LD R0,[R1]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_010101
	JB PSW, 0
	JMP lable_010101
	BANKSEL __KF8_LIBc_touch_count_
	LD R0,[R1]
	INC R0
	ST [R1],R0
	PAGESEL lable_020202
	JMP lable_020202
lable_010101:
	BANKSEL __KF8_LIBc_touch_count_
	CLR R0
	ST [R1], R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_
	ADD R0, #low (__KF8_TOUCH_CH_EN)
	MOV R1, #high (__KF8_TOUCH_CH_EN)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;;;;;;;;
	CLR PSW,0
	RLC R0
	RLC R0
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_ , R0
	;;;;;;;;;;;;;;;;;;;;
	ADD R0,#low(__KF8_LIBt_buff_bit_TS_CS_)
	MOV R1,#high(__KF8_LIBt_buff_bit_TS_CS_)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CPL R0
	BANKSEL __KF8_LIBi_channel_flag_
	AND __KF8_LIBi_channel_flag_, R0
	;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	ADD R0,#low(__KF8_LIBt_buff_bit_TS_CS_)
	MOV R1,#high(__KF8_LIBt_buff_bit_TS_CS_)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CPL R0
	BANKSEL __KF8_LIBi_channel_flag_
	AND (__KF8_LIBi_channel_flag_+1), R0
	;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	INC R0
	ADD R0,#low(__KF8_LIBt_buff_bit_TS_CS_)
	MOV R1,#high(__KF8_LIBt_buff_bit_TS_CS_)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CPL R0
	BANKSEL __KF8_LIBi_channel_flag_
	AND (__KF8_LIBi_channel_flag_+2), R0
	;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0, __KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	INC R0
	INC R0
	ADD R0,#low(__KF8_LIBt_buff_bit_TS_CS_)
	MOV R1,#high(__KF8_LIBt_buff_bit_TS_CS_)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CPL R0
	BANKSEL __KF8_LIBi_channel_flag_
	AND (__KF8_LIBi_channel_flag_+3), R0
	;;;;
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;;;;;;
	MOV R0, #0X00
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	ORL R0, __KF8_lib_Key_Down_Count_TS_CS_
	JB PSW, 2
	DEC __KF8_lib_Key_Down_Count_TS_CS_
	;;;;;;;;;;;;;;;;;
	MOV R0,#0X00
	ORL R0, __KF8_lib_Key_Down_Count_TS_CS_
	PAGESEL lable_030303
	JNB PSW, 2
	JMP lable_030303
	;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	BANKSEL __KF8_LIBc_channel_
	XOR R0, __KF8_LIBc_channel_
	PAGESEL lable_050505
	JB PSW, 2
	JMP lable_050505
	;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV R0, __KF8_LIBc_finger_OUT_Second_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	XOR R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	PAGESEL lable_040404
	JB PSW, 2
	JMP lable_040404
	MOV R0,#0XFF
	MOV __KF8_LIBc_finger_OUT_First_TS_CS_ , R0
	;;;;;;;;;;;;;;;;;
	MOV R0,#0X00
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV __KF8_lib_Key_Down_Count_TS_CS_ ,R0
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_,R0
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1,R0
	;;;;;;;;;;;;;;;;;;
	PAGESEL lable_050505
	JMP lable_050505
	;;;;;;;;;
lable_040404:
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV R0, __KF8_LIBc_finger_OUT_Second_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV __KF8_LIBc_finger_OUT_First_TS_CS_ ,R0
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_MAX_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_Second_MAX_TS_CS_
	MOV R1,__KF8_LIBc_finger_OUT_Second_MAX_TS_CS_+1
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_,R0
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1,R1
	PAGESEL lable_050505
	JMP lable_050505
lable_030303:
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0, #0XFF
	MOV __KF8_LIBc_finger_OUT_First_TS_CS_, R0
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	CLR __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	CLR __KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1
lable_050505:
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV R0,#0XFF
	MOV __KF8_LIBc_finger_OUT_Second_TS_CS_,R0
	MOV R0,#0X00
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	MOV __KF8_lib_Key_Double_Timer_Protect_TS_CS_, R0
	MOV (__KF8_lib_Key_Double_Timer_Protect_TS_CS_+1), R0
	BANKSEL __KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	MOV __KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_, R0
	MOV (__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_+1), R0
	BANKSEL __KF8_LIBc_finger_OUT_Second_MAX_TS_CS_
	CLR __KF8_LIBc_finger_OUT_Second_MAX_TS_CS_
	CLR __KF8_LIBc_finger_OUT_Second_MAX_TS_CS_+1
lable_020202:
	
;	op : INLINEASM
_DS_UP_Key_Count_001:
	
;	op : INLINEASM
	PAGESEL _DS_UP_Key_Count_004
	JMP _DS_UP_Key_Count_004
_DS_UP_Key_Count_002:
;	op : INLINEASM
	MOV R1,# high (_TCS_AMOUNT+0)
	MOV R0,# low (_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	INC R0
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	MOV R1,__KF8_LIBc_channel_
	ADD R1,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R0,[R1]
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL label_18_18_18
	JNB PSW,0 ;;
	JMP label_18_18_18
	BANKSEL __KF8_LIBc_touch_count_
	LD R0,[R1]
	DEC R0
	ST [R1],R0
label_18_18_18:
	
;	op : INLINEASM
_DS_UP_Key_Count_004:
	
;	op : LABEL
;	op : ENDFUNCTION
_00074_DS_
	CRET	
; exit point of __KF8_LIBf_scan_channel_



func.__KF8_LiBf_KEY_Deal_AND_BaseLine_Up	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8_LiBf_KEY_Deal_AND_BaseLine_Up	;Function start
; 2 exit points
;has an exit
;functions called:
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;7 compiler assigned registers:
;   r0x1031
;   r0x1032
;   r0x1033
;   r0x1034
;   r0x1035
;   r0x1036
;   r0x1037
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8_LiBf_KEY_Deal_AND_BaseLine_Up	;Function start
; 2 exit points
;	op : INLINEASM
	MOV R0,#0x01
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	CLR __KF8_LIBi_Touch_New_Date_TS_CS_+1
	CLR __KF8_LIBi_Touch_New_Date_TS_CS_+2
	CLR __KF8_LIBi_Touch_New_Date_TS_CS_+3
	
;	op : INLINEASM
	BANKSEL _i_KF8_lib_TS_CS_
	CLR _i_KF8_lib_TS_CS_
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_Judge_:
	MOV R0,#low(_CHS_AMOUNT+0)
	MOV R1,#high(_CHS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL _i_KF8_lib_TS_CS_
	SUB R0,_i_KF8_lib_TS_CS_
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_End_ ;;
	JNB PSW,0 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_End_
	;PAGESEL $ ;;
	
;	op : INLINEASM
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_Start_:
	;;
	CLR PSW,0
	BANKSEL _i_KF8_lib_TS_CS_
	RLCR _i_KF8_lib_TS_CS_ ;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV _Addr_Copy_Int_KF8_Lib_TS_CS_,R0
	
;	op : IFX
;	.line	671; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_Touch_Sys_Work_Standing_Flag_TS_CS_)
	MOV	R0,# 0x00
	BANKSEL	__KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
	ORL	R0, __KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
	JNB	PSW, 2
	JMP	_00048_DS_
;	op : +
;	.line	674; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_TOUCH_CH_EN[i_KF8_lib_TS_CS_]==_KF8_Inside_Reference_Channel_Declare_)
	MOV	R0,# (__KF8_TOUCH_CH_EN + 0)
	BANKSEL	_i_KF8_lib_TS_CS_
	ADD	R0, _i_KF8_lib_TS_CS_
	BANKSEL	r0x1031
	MOV	r0x1031, R0
	MOV	R0,# high (__KF8_TOUCH_CH_EN + 0)
	BANKSEL	r0x1032
	MOV	r0x1032, R0
	CLR	R0
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00134_DS_
	BANKSEL	r0x1032
	ADD	r0x1032, R0
;	op : GET_VALUE_AT_ADDRESS
_00134_DS_
	BANKSEL	r0x1032
	MOV	R1, r0x1032
	BANKSEL	r0x1031
	MOV	R0, r0x1031
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1033
	MOV	r0x1033, R0
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Inside_Reference_Channel_Declare_+0)
	MOV	R0,# low (__KF8_Inside_Reference_Channel_Declare_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : EQ_OP
	BANKSEL	r0x1031
	MOVZ	R0, r0x1031
	BANKSEL	r0x1033
	XOR	R0, r0x1033
	JB	PSW, 2
	JMP	_00037_DS_
;	op : LEFT_OP
;	.line	676; "../kf8ts3514_touch_cs_lib.c"	if((_KF8_LIBi_Date_Change_[i_KF8_lib_TS_CS_]<-_KF8_Inside_Reference_Channel_Disturb_Threshold_Set_)||(_KF8_LIBi_Date_Change_[i_KF8_lib_TS_CS_]>_KF8_Inside_Reference_Channel_Disturb_Threshold_Set_))
	CLR	PSW, 0
	BANKSEL	_i_KF8_lib_TS_CS_
	RLCR	_i_KF8_lib_TS_CS_
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_Date_Change_ + 0)
	BANKSEL	r0x1031
	ADD	r0x1031, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1031
	MOV	R1, r0x1031
	BANKSEL	__KF8_LIBi_Date_Change_
	LD	R0, [R1]
	BANKSEL	r0x1034
	MOV	r0x1034, R0
	INC	R1
	BANKSEL	__KF8_LIBi_Date_Change_
	LD	R0, [R1]
	BANKSEL	r0x1035
	MOV	r0x1035, R0
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Inside_Reference_Channel_Disturb_Threshold_Set_+0)
	MOV	R0,# low (__KF8_Inside_Reference_Channel_Disturb_Threshold_Set_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1033
	MOV	r0x1033, R0
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : CAST
;;99	MOVZ	R0, r0x1031
	BANKSEL	r0x1036
	CLR	r0x1036
	BANKSEL	r0x1033
	JB	r0x1033, 7
	JMP	_00135_DS_
	BANKSEL	r0x1036
	DEC	r0x1036
;	op : UNARYMINUS
_00135_DS_
	BANKSEL	r0x1033
	CPL	r0x1033
	BANKSEL	r0x1036
	CPL	r0x1036
	BANKSEL	r0x1033
	INC	r0x1033
	JB	PSW, 2
	JMP	_00136_DS_
	BANKSEL	r0x1036
	INC	r0x1036
;	op : <
_00136_DS_
	BANKSEL	r0x1035
	MOVZ	R0, r0x1035
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	MOV	r0x1037, R0
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	SUB	R0, r0x1037
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00068_DS_
	BANKSEL	r0x1033
	MOVZ	R0, r0x1033
	BANKSEL	r0x1034
	SUB	R0, r0x1034
_00068_DS_
	JB	PSW, 0
	JMP	_00032_DS_
;	op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	_i_KF8_lib_TS_CS_
	RLCR	_i_KF8_lib_TS_CS_
	BANKSEL	r0x1033
	MOV	r0x1033, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_Date_Change_ + 0)
	BANKSEL	r0x1033
	ADD	r0x1033, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1033
	MOV	R1, r0x1033
	BANKSEL	__KF8_LIBi_Date_Change_
	LD	R0, [R1]
	BANKSEL	r0x1035
	MOV	r0x1035, R0
	INC	R1
	BANKSEL	__KF8_LIBi_Date_Change_
	LD	R0, [R1]
	BANKSEL	r0x1036
	MOV	r0x1036, R0
;	op : CAST
	BANKSEL	r0x1031
	MOVZ	R0, r0x1031
	BANKSEL	r0x1033
	MOV	r0x1033, R0
	BANKSEL	r0x1034
	CLR	r0x1034
	BANKSEL	r0x1033
	JB	r0x1033, 7
	JMP	_00137_DS_
	BANKSEL	r0x1034
	DEC	r0x1034
;	op : >
_00137_DS_
	BANKSEL	r0x1034
	MOVZ	R0, r0x1034
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	MOV	r0x1037, R0
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	SUB	R0, r0x1037
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00069_DS_
	BANKSEL	r0x1035
	MOVZ	R0, r0x1035
	BANKSEL	r0x1033
	SUB	R0, r0x1033
_00069_DS_
	JNB	PSW, 0
	JMP	_00033_DS_
;	op : LABEL
;	op : =
;gen_assign from CODESPACE
_00032_DS_
;	.line	678; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_Touch_Protect_Select_)
	MOV	R1,# high (__KF8_Touch_Protect_Select_+0)
	MOV	R0,# low (__KF8_Touch_Protect_Select_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1031
	ORL	R0, r0x1031
	JNB	PSW, 2
	JMP	_00030_DS_
;	op : =
;	.line	680; "../kf8ts3514_touch_cs_lib.c"	_KF8_Inside_Reference_Channel_flag_TS_CS_=0xff;
	MOV	R0,# 0xff
	BANKSEL	__KF8_Inside_Reference_Channel_flag_TS_CS_
	MOV	__KF8_Inside_Reference_Channel_flag_TS_CS_, R0
;	op : GOTO
	JMP	_00031_DS_
;	op : LABEL
;	op : =
_00030_DS_
;	.line	684; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag=1;
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 1
;	op : LABEL
;	op : =
_00031_DS_
;	.line	686; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Wave_Protect_Time_Count_TS_CS_=0;
	BANKSEL	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	BANKSEL	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR	(__KF8_lib_Wave_Protect_Time_Count_TS_CS_ + 1)
;	op : GOTO
	JMP	_00037_DS_
;	op : LABEL
;	op : =
_00033_DS_
;	.line	692; "../kf8ts3514_touch_cs_lib.c"	_KF8_Inside_Reference_Channel_flag_TS_CS_=0;
	BANKSEL	__KF8_Inside_Reference_Channel_flag_TS_CS_
	CLR	__KF8_Inside_Reference_Channel_flag_TS_CS_
;	op : LABEL
;	op : CAST
_00037_DS_
;	.line	769; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_CH_DW_Change_Count_TS_CS_+_KF8_lib_CH_UP_Change_Count_TS_CS_>=_KF8_Define_Disturb_Channels_Amount_)
	BANKSEL	__KF8_lib_CH_DW_Change_Count_TS_CS_
	MOVZ	R0, __KF8_lib_CH_DW_Change_Count_TS_CS_
	BANKSEL	r0x1031
	MOV	r0x1031, R0
	BANKSEL	r0x1033
	CLR	r0x1033
;	op : CAST
	BANKSEL	__KF8_lib_CH_UP_Change_Count_TS_CS_
	MOVZ	R0, __KF8_lib_CH_UP_Change_Count_TS_CS_
	BANKSEL	r0x1034
	MOV	r0x1034, R0
	BANKSEL	r0x1035
	CLR	r0x1035
;	op : +
	BANKSEL	r0x1034
	MOV	R0, r0x1034
	BANKSEL	r0x1031
	ADD	r0x1031, R0
	MOV	R0,# 0x00
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00138_DS_
	BANKSEL	r0x1033
	ADD	r0x1033, R0
;	op : =
;gen_assign from CODESPACE
_00138_DS_
	MOV	R1,# high (__KF8_Define_Disturb_Channels_Amount_+0)
	MOV	R0,# low (__KF8_Define_Disturb_Channels_Amount_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1035
	MOV	r0x1035, R0
	BANKSEL	r0x1034
	MOV	r0x1034, R0
;	op : CAST
;;100	MOVZ	R0, r0x1034
	BANKSEL	r0x1036
	CLR	r0x1036
	BANKSEL	r0x1035
	JB	r0x1035, 7
	JMP	_00139_DS_
	BANKSEL	r0x1036
	DEC	r0x1036
;	op : <
_00139_DS_
	BANKSEL	r0x1033
	MOVZ	R0, r0x1033
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	MOV	r0x1037, R0
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
	ADD	R0,# 0x80
	BANKSEL	r0x1037
	SUB	R0, r0x1037
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00070_DS_
	BANKSEL	r0x1035
	MOVZ	R0, r0x1035
	BANKSEL	r0x1031
	SUB	R0, r0x1031
_00070_DS_
	JB	PSW, 0
	JMP	_00045_DS_
;	op : IFX
;	.line	771; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_Inside_Reference_Channel_flag_TS_CS_ || !_KF8_Touch_Protect_Select_)
	MOV	R0,# 0x00
	BANKSEL	__KF8_Inside_Reference_Channel_flag_TS_CS_
	ORL	R0, __KF8_Inside_Reference_Channel_flag_TS_CS_
	JNB	PSW, 2
	JMP	_00038_DS_
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Touch_Protect_Select_+0)
	MOV	R0,# low (__KF8_Touch_Protect_Select_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : IFX
	MOV	R0,# 0x00
;	.line	773; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag=1;
	BANKSEL	r0x1031
	ORL	R0, r0x1031
;	.line	776; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Wave_Protect_Time_Count_TS_CS_=0;
	JB	PSW, 2
	JMP	_00140_DS_
_00038_DS_
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 1
_00140_DS_
	BANKSEL	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	BANKSEL	__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR	(__KF8_lib_Wave_Protect_Time_Count_TS_CS_ + 1)
;	op : =
;	.line	778; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_En_Base_Update_Flag=0; //可能来水，擦水，有些基准线不更新
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 7
;	op : GOTO
	JMP	_00048_DS_
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00045_DS_
;	.line	785; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag && _KF8_lib_CH_DW_Change_Flag_TS_CS_==0)
	BANKSEL	__KF8_lib_Touch_Bits_
	JNB	__KF8_lib_Touch_Bits_, 1
	JMP	_00048_DS_
;	op : IFX
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOVZ	R0, __KF8_lib_CH_DW_Change_Flag_TS_CS_
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL	R0, (__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 1)
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL	R0, (__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 2)
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL	R0, (__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 3)
	JB	PSW, 2
	JMP	_00048_DS_
;	op : =
;	.line	787; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_En_Base_Update_Flag=1;
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 7
;	op : LABEL
;	op : INLINEASM
_00048_DS_
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_, R1
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1,R1
	PAGESEL lable_06291924
	JB R1,7
	JMP lable_06291924
	;;;;;;;;;;;;;;;;;;;;;;;;
	XOR R1,#0XFF
	PAGESEL lable_10101427
	JB PSW,2
	JMP lable_10101427
	;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_BasicLine_UP_Noise_Threshold_)
	MOV R1,#high(__KF8_BasicLine_UP_Noise_Threshold_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06292025
	JNB PSW, 0
	JMP lable_06292025
lable_10101427:
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0, _i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_baseline_count_)
	BANKSEL __KF8_LIBc_baseline_count_
	LD R1, [R0]
	MOV R0, #(100)
	XOR R1, R0
	PAGESEL lable_06291941
	JB PSW ,2
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_)
	BANKSEL __KF8_LIBi_buff_hit_ ;;_KF8_LIBi_buff_hit_ low
	LD R1,[R0]
	;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ low
	ST [R0],R1
	;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_hit_+1)
	BANKSEL __KF8_LIBi_buff_hit_ ;; _KF8_LIBi_buff_hit_ high
	LD R1,[R0]
	;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_ ;;
	ADD R0, #(__KF8_LIBi_buff_baseline_+1)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ high
	ST [R0],R1
	;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	CPLR __KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND __KF8_lib_CH_DW_Change_Flag_TS_CS_, R0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	CPLR (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND (__KF8_lib_CH_DW_Change_Flag_TS_CS_+1), R0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	CPLR (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND (__KF8_lib_CH_DW_Change_Flag_TS_CS_+2), R0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	CPLR (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND (__KF8_lib_CH_DW_Change_Flag_TS_CS_+3), R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,# low (_TCS_AMOUNT+0)
	MOV R1,# high (_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0, _i_KF8_lib_TS_CS_
	ADD R0,# (__KF8_LIBc_touch_count_ + 0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1, [R0]
	INC R1
	;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R1, __KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_06291941
	JB PSW, 0
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_touch_count_
	CLR R1
	ST [R0],R1
	JMP lable_06291941
	;;;;;;;;;;;;
lable_06291924:
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06292025
	JNB R1,7
	JMP lable_06292025
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06151941
	JB PSW,2
	JMP lable_06151941
	;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_BasicLine_Down_Noise_Threshold_)
	MOV R1,#high(__KF8_BasicLine_Down_Noise_Threshold_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06292025
	JB PSW,0
	JMP lable_06292025
lable_06151941:
	;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Touch_Bits_
	PAGESEL lable_06300912
	JB __KF8_lib_Touch_Bits_, 1
	JMP lable_06300912
	;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	LD R1,[R0]
	XOR R1,#Low(-20) ;;
	PAGESEL lable_06300936
	JNB PSW,2
	JMP lable_06300936
	;;;;;;;;;;;;;;;;;;;;;;
	MOV R1,#High(__KF8_Disturb_Protect_Circle_+0)
	MOV R0,#Low(__KF8_Disturb_Protect_Circle_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	XOR R0,__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	PAGESEL lable_06300941
	JB PSW,2 ;;
	JMP lable_06300941
	;;
	MOV R1,#High(__KF8_Disturb_Protect_Circle_+1)
	MOV R0,#Low(__KF8_Disturb_Protect_Circle_+1)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	XOR R0,(__KF8_lib_Wave_Protect_Time_Count_TS_CS_+1)
	PAGESEL lable_06300941
	JB PSW,2 ;;
	JMP lable_06300941
	;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06300936:
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+1,R1
	;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+2,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+3,R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06300941:
	;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	AND R1,__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+1
	AND R0,__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	ORL R1,R0
	PAGESEL lable_06291941
	JB PSW,2
	JMP lable_06291941
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	AND R1,__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+3
	AND R0,__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+2
	ORL R1,R0
	PAGESEL lable_06291941
	JB PSW,2
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;;
	;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+1,R1
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+2,R0
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+3,R1
	;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	CLR __KF8_lib_Wave_Protect_Time_Count_TS_CS_+1
	;;;;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL lable_06291941
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;
lable_06300912:
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	LD R0,[R1]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;
	MOV R1,#High(__KF8_BaseLine_Update_Circle_Count_For_Down_+0)
	MOV R0,#Low(__KF8_BaseLine_Update_Circle_Count_For_Down_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_06301048
	JB PSW,2
	JMP lable_06301048
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	CLR R0
	ST [R1],R0
	;;;;;;;;;;;;;;;;;;
lable_06301048:
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R1,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_06291941
	JNB PSW,0 ;;
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+1,R1
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+2,R0
	ORL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+3,R1
	;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL lable_06291941
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;
lable_06292025:
	;;;;;;;;;;
	PAGESEL lable_06301109
	BANKSEL __KF8_lib_Touch_Bits_
	JNB __KF8_lib_Touch_Bits_,1 ;;
	JMP lable_06301109
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	CPL R1
	CPL R0
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	AND __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+1,R1
	AND __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_,R0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	CPL R1
	CPL R0
	BANKSEL __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	AND __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+3,R1
	AND __KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_+2,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06301109:
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	LD R0,[R1]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;
	MOV R1,#High(__KF8_BaseLine_Update_Circle_Count_For_Down_+0)
	MOV R0,#Low(__KF8_BaseLine_Update_Circle_Count_For_Down_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_06301127
	JNB PSW,2
	JMP lable_06301127
	;;
	MOV R1,#High(__KF8_BaseLine_Update_Circle_Count_For_UP_+0)
	MOV R0,#Low(__KF8_BaseLine_Update_Circle_Count_For_UP_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_06291941
	JB PSW,2
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06301127:
	;;
	;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	CLR R1
	ST [R0],R1
	;;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06301401
	JNB R1,7
	JMP lable_06301401
	;;;;;;;;;;;;;;;;;
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06301404
	JB PSW,2
	JMP lable_06301404
	;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_BasicLine_Down_Noise_Threshold_)
	MOV R1,#high(__KF8_BasicLine_Down_Noise_Threshold_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06301404
	JNB PSW,0
	JMP lable_06301404
	;;;;;;;;;;;;;;;;;;;;;
	; 1361 "../kf8ts3514_touch_cs_lib.c"
lable_06301401:
	;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	CPL R1
	CPL R0
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND __KF8_lib_CH_DW_Change_Flag_TS_CS_+1,R1
	AND __KF8_lib_CH_DW_Change_Flag_TS_CS_,R0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	CPL R1
	CPL R0
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	AND __KF8_lib_CH_DW_Change_Flag_TS_CS_+3,R1
	AND __KF8_lib_CH_DW_Change_Flag_TS_CS_+2,R0
	PAGESEL lable_06301437
	JMP lable_06301437
	;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06301404:
	;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_TS_CS_
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	XOR R0,R1
	PAGESEL lable_06291941
	JNB PSW,2
	JMP lable_06291941
	;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_Second_TS_CS_
	XOR R0,R1
	PAGESEL lable_06291941
	JNB PSW,2
	JMP lable_06291941
	;;;;;;;;;;;;
	PAGESEL lable_06291941
	BANKSEL __KF8_lib_Touch_Bits_
	JB __KF8_lib_Touch_Bits_,7 ;;
	JMP lable_06291941
	;;;;;;;;;;;;;;;;;;;;;;;;;;
lable_06301437:
	;;
	;;
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_baseline_+0)
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_,R1
	INC R0
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R1
	;;;
	MOV R1,#0x01
_KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0001:
	CLR PSW,0
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	RRC __KF8_Temp_Cur_A_TS_CS_+1
	RRC __KF8_Temp_Cur_A_TS_CS_
	CLR PSW,0
	RLC R1
	MOV R0,R1
	XOR R0,#(8)
	PAGESEL _KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0001
	JB PSW,2
	JMP _KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0001
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_hit_+0)
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV __KF8_Temp_Cur_B_TS_CS_,R1
	INC R0
	BANKSEL __KF8_LIBi_buff_hit_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV __KF8_Temp_Cur_B_TS_CS_+1,R1
	;;;
	MOV R1,#0x01
_KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0002:
	CLR PSW,0
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	RRC __KF8_Temp_Cur_B_TS_CS_+1
	RRC __KF8_Temp_Cur_B_TS_CS_
	CLR PSW,0
	RLC R1
	MOV R0,R1
	XOR R0,#(8)
	PAGESEL _KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0002
	JB PSW,2
	JMP _KF8_lib_DW_UP_Basic_IIR_Normal_Get_DS_0002
	;;;
	;;;;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R1,__KF8_Temp_Cur_A_TS_CS_
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	SUB __KF8_Temp_Cur_B_TS_CS_,R1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R1,__KF8_Temp_Cur_A_TS_CS_+1
	JB PSW,0
	INC R1
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	SUB __KF8_Temp_Cur_B_TS_CS_+1,R1
	;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_baseline_+0)
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R1,[R0]
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	ADD R1, __KF8_Temp_Cur_B_TS_CS_
	BANKSEL __KF8_LIBi_buff_baseline_
	ST [R0],R1
	;;;
	INC R0
	LD R1,[R0]
	JNB PSW,0
	INC R1
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	ADD R1,__KF8_Temp_Cur_B_TS_CS_+1
	BANKSEL __KF8_LIBi_buff_baseline_
	ST [R0],R1
	;;
	;;
	;;
	;;
	;;
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+1)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	PAGESEL lable_06301449
	JB R1,7
	JMP lable_06301449
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_baseline_+0)
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R1,[R0]
	ADD R1,#0x01
	ST [R0],R1
	INC R0
	LD R1,[R0]
	JNB PSW,0
	INC R1
	ST [R0],R1
	PAGESEL lable_06291941
	JMP lable_06291941
lable_06301449:
	;;
	DEC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	XOR R1,#0x00
	PAGESEL lable_06301449
	JNB PSW,2
	JMP lable_06301449
	;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_buff_baseline_+0)
	BANKSEL __KF8_LIBi_buff_baseline_
	LD R1,[R0]
	ADD R1,#0xFF
	ST [R0],R1
	INC R0
	LD R1,[R0]
	JB PSW,0
	DEC R1
	ST [R0],R1
lable_06291941:
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	1537; "../kf8ts3514_touch_cs_lib.c"	ADD R1,#0xFF
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 1
	JMP	_00050_DS_
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Touch_Protect_Select_+0)
	MOV	R0,# low (__KF8_Touch_Protect_Select_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1031
	ORL	R0, r0x1031
	JB	PSW, 2
	JMP	_00050_DS_
;	op : INLINEASM
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R0,[R1]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SUB R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0007_
	JNB PSW,0 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0007_
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_touch_count_+0)
	CLR R0
	BANKSEL __KF8_LIBc_touch_count_
	ST [R1],R0
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0007_:
	
;	op : LABEL
;	op : INLINEASM
_00050_DS_
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0,_Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+1)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_baseline_count_+0)
	;;
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0008_
	JNB R1,7
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0008_
	;;--
	BANKSEL __KF8_LIBc_baseline_count_
	LD R1,[R0]
	DEC R1
	ST [R0],R1
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0009_
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0009_
	;;++
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0008_:
	BANKSEL __KF8_LIBc_baseline_count_
	LD R1,[R0]
	INC R1
	ST [R0],R1
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_DS_0009_:
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	1639; "../kf8ts3514_touch_cs_lib.c"	if(!_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag || _KF8_Touch_Protect_Select_)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 1
	JMP	_00052_DS_
;	op : =
;gen_assign from CODESPACE
	MOV	R1,# high (__KF8_Touch_Protect_Select_+0)
	MOV	R0,# low (__KF8_Touch_Protect_Select_+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1031
	ORL	R0, r0x1031
	JNB	PSW, 2
	JMP	_00053_DS_
;	op : LABEL
;	op : INLINEASM
_00052_DS_
	;;;;;;;;;;;;
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_TS_CS_
	BANKSEL _i_KF8_lib_TS_CS_
	XOR R0,_i_KF8_lib_TS_CS_
	PAGESEL lable_07021644
	JNB PSW,2 ;;
	JMP lable_07021644
	MOV R0,_i_KF8_lib_TS_CS_
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	XOR R0,__KF8_lib_Finded_MAX_J_TS_CS_
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_Else_IF
	JB PSW,2 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_Else_IF
	;;;;;;;;;;;;
lable_07021644:
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R1
	;;;
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;
	SUB R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_07021648
	JNB PSW,0 ;;
	JMP lable_07021648
	;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	INC R1
	ST [R0],R1
	;;;;;;;;;;;;;;;
lable_07021648:
	MOV R1,# high (__KF8_DoubleKey_Compages_Limitable_Circle_+0)
	MOV R0,# low (__KF8_DoubleKey_Compages_Limitable_Circle_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;;;;
	BANKSEL _result_temp_KF8_Lib_TS_CS_
	MOV _result_temp_KF8_Lib_TS_CS_,R0
	;;;;;;;;;;
	MOV R1,# high (__KF8_DoubleKey_Compages_Limitable_Circle_+1)
	MOV R0,# low (__KF8_DoubleKey_Compages_Limitable_Circle_+1)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;
	BANKSEL _result_temp_KF8_Lib_TS_CS_
	MOV (_result_temp_KF8_Lib_TS_CS_+1),R0
	ORL R0,_result_temp_KF8_Lib_TS_CS_
	PAGESEL lable_07021657
	JNB PSW,2
	JMP lable_07021657
	;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV R0, __KF8_lib_Key_Down_Count_TS_CS_
	XOR R0,# 0x01
	PAGESEL lable_07021657
	JB PSW, 2
	JMP lable_07021657
	;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _result_temp_KF8_Lib_TS_CS_
	MOV R0,(_result_temp_KF8_Lib_TS_CS_+1)
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	SUB R0,(__KF8_lib_Key_Double_Timer_Protect_TS_CS_+1)
	PAGESEL lable_ds_
	JB PSW,2
	JMP lable_ds_
	;;;;;;;;;;;
	BANKSEL _result_temp_KF8_Lib_TS_CS_
	MOV R0,_result_temp_KF8_Lib_TS_CS_
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	SUB R0,__KF8_lib_Key_Double_Timer_Protect_TS_CS_
	;;;;;;;;;;;
lable_ds_:
	PAGESEL lable_07021657
	JNB PSW, 0
	JMP lable_07021657
	;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	INC __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	JNB PSW, 2
	INC (__KF8_lib_Key_Double_Timer_Protect_TS_CS_ + 1)
	;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _result_temp_KF8_Lib_TS_CS_
	MOV R0,(_result_temp_KF8_Lib_TS_CS_+1)
	MOV R1,_result_temp_KF8_Lib_TS_CS_
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	XOR R0,(__KF8_lib_Key_Double_Timer_Protect_TS_CS_+1)
	XOR R1,__KF8_lib_Key_Double_Timer_Protect_TS_CS_
	PAGESEL lable_07021657
	ORL R0,R1
	JB PSW,2
	JMP lable_07021657
	;;;;;;
	MOV R0,# 0x02
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV __KF8_lib_Key_Down_Count_TS_CS_, R0
	;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV __KF8_LIBc_finger_OUT_Second_TS_CS_, R0
	;;;;;;;;;;;;;;;;;;
	;;;;;;;;;
	;;;;;;;;;;
lable_07021657:
	;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R1
	;;
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	JB PSW,2 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_channel_flag_
	MOV R0,__KF8_LIBi_channel_flag_
	ORL R0,__KF8_LIBi_channel_flag_+1
	ORL R0,__KF8_LIBi_channel_flag_+2
	ORL R0,__KF8_LIBi_channel_flag_+3
	PAGESEL lable_07021756
	JNB PSW,2 ;;
	JMP lable_07021756
	;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV R0, __KF8_lib_Finded_MAX_I_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	XOR R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	PAGESEL lable_07022000
	JNB PSW,2
	JMP lable_07022000
	;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	MOV R0, __KF8_lib_Finded_MAX_J_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	XOR R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	PAGESEL lable_07022000
	JNB PSW,2
	JMP lable_07022000
	;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV R0, __KF8_lib_Finded_MAX_I_TS_CS_
	BANKSEL _i_KF8_lib_TS_CS_
	XOR R0, _i_KF8_lib_TS_CS_
	PAGESEL lable_07022000
	JNB PSW,2
	JMP lable_07022000
	PAGESEL lable_07021902
	JMP lable_07021902
	;;;;;;;;;;;;;;;;;;;;;;;;;
lable_07022000:
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	MOV R1,#0x01
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	XOR __KF8_lib_Key_Down_Count_TS_CS_,R1
	PAGESEL lable_07021902
	JB PSW ,2
	JMP lable_07021902
	;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	SWAPR R0, __KF8_LIBc_finger_OUT_First_TS_CS_
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	ORL __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Char_KF8_Lib_TS_CS_
	CLR _Addr_Copy_Char_KF8_Lib_TS_CS_
lable_KF8_SP_LOOP:
	;;;;;;;;;;;;;;;;;;;;;
	MOV R1,# high (_Double_Key_SET_EN_1+0)
	MOV R0,# low (_Double_Key_SET_EN_1+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_07021933
	JNB PSW,2
	JMP lable_07021933
	;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R1,# high (_Double_Key_SET_EN_2+0)
	MOV R0,# low (_Double_Key_SET_EN_2+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_07021933
	JNB PSW,2
	JMP lable_07021933
	;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R1,# high (_Double_Key_SET_EN_3+0)
	MOV R0,# low (_Double_Key_SET_EN_3+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	XOR R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_07021933
	JNB PSW,2
	JMP lable_07021933
	;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Char_KF8_Lib_TS_CS_
	MOV R1,#0X01
	XOR _Addr_Copy_Char_KF8_Lib_TS_CS_,R1
	PAGESEL lable_07021902
	JNB PSW,2
	JMP lable_07021902
	;;;;;;;;;;;;;;;;;;;;
	MOV _Addr_Copy_Char_KF8_Lib_TS_CS_,R1
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	SWAP __KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL lable_KF8_SP_LOOP
	JMP lable_KF8_SP_LOOP
	;;;;;;;;;;;;;;;;;;;;;
lable_07021933:
	MOV R0,#0X02
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV __KF8_lib_Key_Down_Count_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0, _i_KF8_lib_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV __KF8_LIBc_finger_OUT_Second_TS_CS_, R0
	;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	CLR R0
	ST [R1],R0
	;;;;;;;;;;;;;;;;;;;;;
	;;
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	MOV R0,#Low(__KF8_TOUCH_CH_EN+0)
	BANKSEL _i_KF8_lib_TS_CS_
	ADD R0,_i_KF8_lib_TS_CS_
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CLR PSW,0
	RLC R0
	RLC R0
	ADD R0,#Low(__KF8_LIBt_buff_bit_TS_CS_+0)
	MOV R1,#High(__KF8_LIBt_buff_bit_TS_CS_+0)
	JNB PSW,0
	INC R1
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0 ;;
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	ORL __KF8_LIBi_channel_flag_,R0
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_ ;;
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	ORL __KF8_LIBi_channel_flag_+1,R0
	;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_ ;;
	INC R0
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	ORL __KF8_LIBi_channel_flag_+2,R0
	;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_ ;;
	INC R0
	INC R0
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	ORL __KF8_LIBi_channel_flag_+3,R0
	;;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL lable_07061503
	JMP lable_07061503
	;;;;;;;;;;;;;
lable_07021902:
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	CLR R1
	ST [R0],R1
	PAGESEL lable_07061503
	JMP lable_07061503
	;;;;;;;;;;;;;;;;;
lable_07021756:
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV R0,__KF8_lib_Finded_MAX_I_TS_CS_
	BANKSEL _i_KF8_lib_TS_CS_
	XOR R0,_i_KF8_lib_TS_CS_
	PAGESEL lable_07061509
	JNB PSW,2 ;;
	JMP lable_07061509
	;;;
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	CLR R1
	BANKSEL __KF8_LIBc_touch_count_
	ST [R0],R1
	PAGESEL lable_07061503
	JMP lable_07061503
	;;;;;;;;;;;;;;;;;
lable_07061509:
	;;
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	CLR PSW,0
	RLC R0
	RLC R0
	ADD R0,#Low(__KF8_LIBt_buff_bit_TS_CS_+0)
	MOV R1,#High(__KF8_LIBt_buff_bit_TS_CS_+0)
	JNB PSW,0
	INC R1
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R0
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	MOV __KF8_LIBi_channel_flag_,R0
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	MOV __KF8_LIBi_channel_flag_+1,R0
	;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	MOV __KF8_LIBi_channel_flag_+2,R0
	;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	INC R0
	INC R0
	INC R0
	JNB PSW,2
	INC R1
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBi_channel_flag_
	MOV __KF8_LIBi_channel_flag_+3,R0
	;;;;;;;;;;;;;;
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV __KF8_LIBc_finger_OUT_First_TS_CS_,R0
	;;
	MOV R1,#0x01
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV __KF8_lib_Key_Down_Count_TS_CS_,R1
	;;
	MOV R0,#0xFF
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV __KF8_LIBc_finger_OUT_Second_TS_CS_,R0
	;;;
	BANKSEL __KF8_lib_Key_Double_Timer_Protect_TS_CS_
	CLR __KF8_lib_Key_Double_Timer_Protect_TS_CS_+1
	MOV R0,#0X01
	MOV __KF8_lib_Key_Double_Timer_Protect_TS_CS_ ,R0
	;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R1,_i_KF8_lib_TS_CS_
	ADD R1,#(__KF8_LIBc_baseline_count_+0)
	BANKSEL __KF8_LIBc_baseline_count_
	CLR R0
	ST [R1],R0
	;;;;;;;;;;
lable_07061503:
	;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	INC R1
	ST [R0],R1
	;;;
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	;;;;;;;;;;;;;;
	;;;;;;;;;;;;;;;;;;
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_Else_IF:
	;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	BANKSEL __KF8_LIBc_touch_count_
	LD R1,[R0]
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	MOV __KF8_lib_Date_Uchar_Temp_TS_CS_,R1
	;;;
	MOV R1,#High(_TCS_AMOUNT+0)
	MOV R0,#Low(_TCS_AMOUNT+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;
	SUB R0,__KF8_lib_Date_Uchar_Temp_TS_CS_
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	JNB PSW,0 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End
	;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	ADD R0,#(__KF8_LIBc_touch_count_+0)
	CLR R1
	BANKSEL __KF8_LIBc_touch_count_
	ST [R0],R1
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_Key_Get_DS_End:
	
;	op : INLINEASM
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	XOR R0,__KF8_LIBc_finger_OUT_First_TS_CS_
	PAGESEL lable_07061747
	JB PSW ,2
	JMP lable_07061747
	;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_,R1
	;;;;;;;;;;;;;;;;
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1,R1
	;;;;;;;;;;;
	ADD R1,#0X80
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1
	ADD R0,#0X80
	;;;;
	SUB R1,R0
	PAGESEL lable_07061742
	JB PSW ,2
	JMP lable_07061742
	;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	SUB R1,__KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	;;;
	;;;
lable_07061742:
	PAGESEL lable_07061747
	JNB PSW,0
	JMP lable_07061747
	;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R0,__KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_,R0
	MOV __KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1,R1
	;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_TS_CS_
	BANKSEL __KF8_LIBc_water_monitor_TS_CS_
	MOV __KF8_LIBc_water_monitor_TS_CS_,R0
	;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_water_monitor_count_TS_CS_
	CLR R0
	MOV __KF8_LIBc_water_monitor_count_TS_CS_,R0
	;;;;;;;;;;;
	;;;;;;;;;;;
	;;;;;;;;;
lable_07061747:
	BANKSEL _i_KF8_lib_TS_CS_
	MOV R0,_i_KF8_lib_TS_CS_
	BANKSEL __KF8_LIBc_water_monitor_TS_CS_
	XOR R0, __KF8_LIBc_water_monitor_TS_CS_
	PAGESEL lable_07061649
	JB PSW ,2
	JMP lable_07061649
	;;;;;;;;;;;;
	BANKSEL __KF8_lib_Touch_Bits_
	PAGESEL lable_07061649
	JNB __KF8_lib_Touch_Bits_, 7
	JMP lable_07061649
	;;;;;;
	;;;;;;;;;;;;;;;;;;;;
	BANKSEL _Addr_Copy_Int_KF8_Lib_TS_CS_
	MOV R0, _Addr_Copy_Int_KF8_Lib_TS_CS_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_,R1
	;;;;;;;;;;;;;;;;
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1,R1
	;;;;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL lable_06161453
	JNB __KF8_lib_bahualvtemportemp_TS_CS_+1,7
	JMP lable_06161453
	;;;;;;;
	MOV __KF8_lib_bahualvtemportemp_TS_CS_+1
	PAGESEL lable_06161625
	JB PSW,2
	JMP lable_06161625
	;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(__KF8_Water_Monitor_)
	MOV R1,#high(__KF8_Water_Monitor_)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;;;;;;;;
	SUB R0,__KF8_lib_bahualvtemportemp_TS_CS_
	PAGESEL lable_06161453
	JB PSW,0
	JMP lable_06161453
	;;;;;;;;;;;;;;;;;;
	;;;;;;;;;;;;;;;;
lable_06161625:
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1
	ADD R0, #0x80
	ADD R0, #0x80
	PAGESEL lable_06161736
	JB PSW,2
	JMP lable_06161736
	MOV R0, #0x0f
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	SUB R0, __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
lable_06161736:
	PAGESEL lable_06161453
	JB PSW, 0
	JMP lable_06161453
	;;;;;;;;;;;;;;;;;;;
lable_06161451:
	;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_MAX_TS_CS_+1
	MOV R1,#0X14
	SUB R1,__KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	JB PSW,0
	DEC R0
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_ ,R1
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R0
	;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_+1
	;;;;;;;;;;;
	ADD R1,#0X80
	ADD R0,#0X80
	SUB R1,R0
	PAGESEL lable_06161810
	JB PSW ,2
	JMP lable_06161810
	;;;;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R1,__KF8_lib_bahualvtemportemp_TS_CS_
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB R1,__KF8_Temp_Cur_A_TS_CS_
	;;;
lable_06161810:
	PAGESEL lable_07061649
	JB PSW,0
	JMP lable_07061649
	;;;;;;;;;
	BANKSEL __KF8_LIBc_water_monitor_count_TS_CS_
	INC __KF8_LIBc_water_monitor_count_TS_CS_
	;;;;;;;;;;;
	MOV R0,#0X0A
	XOR R0,__KF8_LIBc_water_monitor_count_TS_CS_
	PAGESEL lable_07061649
	JB PSW,2
	JMP lable_07061649
	;;;;;;;
	;;;;
	BANKSEL __KF8_LIBc_water_monitor_count_TS_CS_
	CLR __KF8_LIBc_water_monitor_count_TS_CS_
	;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+1,R1
	;;
	BANKSEL __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	CLR __KF8_LIBc_finger_OUT_First_MAX_TS_CS_
	PAGESEL lable_07061649
	JMP lable_07061649
	;;;;;;;;;;
	;;;;;
	;;;
lable_06161453:
	BANKSEL __KF8_LIBc_water_monitor_TS_CS_
	MOV R0,#0xff
	MOV __KF8_LIBc_water_monitor_TS_CS_,R0
	BANKSEL __KF8_LIBc_water_monitor_count_TS_CS_
	CLR __KF8_LIBc_water_monitor_count_TS_CS_
lable_07061649:
	
;	op : LABEL
;	op : LEFT_OP
_00053_DS_
;	.line	2491; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBi_Touch_New_Date_TS_CS_<<=1;
	CLR	PSW, 0
	BANKSEL	__KF8_LIBi_Touch_New_Date_TS_CS_
	RLC	__KF8_LIBi_Touch_New_Date_TS_CS_
	BANKSEL	__KF8_LIBi_Touch_New_Date_TS_CS_
	RLC	(__KF8_LIBi_Touch_New_Date_TS_CS_ + 1)
	BANKSEL	__KF8_LIBi_Touch_New_Date_TS_CS_
	RLC	(__KF8_LIBi_Touch_New_Date_TS_CS_ + 2)
	BANKSEL	__KF8_LIBi_Touch_New_Date_TS_CS_
	RLC	(__KF8_LIBi_Touch_New_Date_TS_CS_ + 3)
;	op : INLINEASM
	BANKSEL _i_KF8_lib_TS_CS_
	INC _i_KF8_lib_TS_CS_
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_Judge_ ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_Judge_
	PAGESEL $ ;;
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_FOR_Deal_End_:
	
;	op : INLINEASM
	BANKSEL __KF8_lib_CH_DW_Change_Count_TS_CS_
	CLR __KF8_lib_CH_DW_Change_Count_TS_CS_
	BANKSEL __KF8_lib_CH_UP_Change_Count_TS_CS_
	CLR __KF8_lib_CH_UP_Change_Count_TS_CS_
	;;;
	MOV R0,#0xFF
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_TS_CS_,R0
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_TS_CS_,R0
	;;;
	BANKSEL __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	CLR __KF8_lib_Finded_MAX_J_Buf_TS_CS_
	CLR __KF8_lib_Finded_MAX_J_Buf_TS_CS_+1
	;;;
	BANKSEL __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	CLR __KF8_lib_Finded_MAX_I_Buf_TS_CS_
	CLR __KF8_lib_Finded_MAX_I_Buf_TS_CS_+1
	;;;
	BANKSEL __KF8_lib_Finded_MAX_COUNT_TS_CS_
	CLR __KF8_lib_Finded_MAX_COUNT_TS_CS_
	;;;
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_Deal_End_
	BANKSEL __KF8_lib_Touch_Bits_
	JB __KF8_lib_Touch_Bits_,1 ;;
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_Deal_End_ ;;
	;;;
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	INC __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	JNB PSW,2
	INC __KF8_lib_Wave_Protect_Time_Count_TS_CS_+1
	;;;
	MOV R1,#High(__KF8_Disturb_Protect_Circle_+0)
	MOV R0,#Low(__KF8_Disturb_Protect_Circle_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_,R0 ;;
	;;
	MOV R1,#High(__KF8_Disturb_Protect_Circle_+1)
	MOV R0,#Low(__KF8_Disturb_Protect_Circle_+1)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	;;;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R0 ;;
	;;;
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	MOV R0,__KF8_lib_Wave_Protect_Time_Count_TS_CS_
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB R0,__KF8_Temp_Cur_A_TS_CS_
	BANKSEL __KF8_lib_Wave_Protect_Time_Count_TS_CS_
	MOV R0,__KF8_lib_Wave_Protect_Time_Count_TS_CS_+1
	JB PSW,0
	INC R0
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB R0,__KF8_Temp_Cur_A_TS_CS_+1
	PAGESEL _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_Deal_End_
	JNB PSW,0
	JMP _KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_Deal_End_
	;;_KF8_lib_Touch_Bits_._bitx_x._bit1_1=0;
	BANKSEL __KF8_lib_Touch_Bits_
	CLR __KF8_lib_Touch_Bits_,1 ;;
_KF8_LiBf_KEY_Deal_AND_BaseLine_Up_DS_Deal_End_:
	
;	op : INLINEASM
	MOV R1,# high (__KF8_Key_Max_Pressed_Limitable_Circle_+0)
	MOV R0,# low (__KF8_Key_Max_Pressed_Limitable_Circle_+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_,R0
	;;;;;;;;;;;;;;
	MOV R1,# high (__KF8_Key_Max_Pressed_Limitable_Circle_+1)
	MOV R0,# low (__KF8_Key_Max_Pressed_Limitable_Circle_+1)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV __KF8_Temp_Cur_A_TS_CS_+1,R0
	ORL R0,__KF8_Temp_Cur_A_TS_CS_
	;;;;;;;
	PAGESEL lable_07061952
	JNB PSW,2
	JMP lable_07061952
	;;;;;;;;;;;
	BANKSEL __KF8_LIBi_channel_flag_
	MOV R0,__KF8_LIBi_channel_flag_
	ORL R0,__KF8_LIBi_channel_flag_+1
	ORL R0,__KF8_LIBi_channel_flag_+2
	ORL R0,__KF8_LIBi_channel_flag_+3
	PAGESEL lable_07061952
	JNB PSW,2 ;;
	JMP lable_07061952
	;;;;;;;;;;;;;
	BANKSEL __KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	INC __KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	JNB PSW, 2
	INC (__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_ + 1)
	;;;;;;;;;;;;;;;;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R0,__KF8_Temp_Cur_A_TS_CS_
	MOV R1,__KF8_Temp_Cur_A_TS_CS_+1
	BANKSEL __KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	XOR R0,__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_
	XOR R1,__KF8_lib_MAX_KEY_Vaule_Time_Count_TS_CS_+1
	ORL R0,R1
	PAGESEL lable_07061952
	JB PSW,2
	JMP lable_07061952
	;;;
	BANKSEL __KF8_lib_Touch_Bits_
	CLR __KF8_lib_Touch_Bits_, 7
	;;
	BANKSEL __KF8_lib_Key_Down_Count_TS_CS_
	MOV R0, __KF8_lib_Key_Down_Count_TS_CS_
	XOR R0,# 0x02
	PAGESEL lable_07062010
	JB PSW, 2
	JMP lable_07062010
	;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,#0x01
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_Second_TS_CS_
	INC R0
	PAGESEL RLC_07070955
	JMP RLC_07070955
RLCDeal_07070955:
	CLR PSW,0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	RLC __KF8_LIBi_Touch_New_Date_TS_CS_
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
RLC_07070955:
	PAGESEL RLCDeal_07070955
	DECJZ R0
	JMP RLCDeal_07070955
	;;;;;;;
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+1
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	ORL R0,R1
	PAGESEL lable_10311439
	JB PSW,2
	JMP lable_10311439
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_+2
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+3
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	ORL R0,R1
	PAGESEL lable_07071023
	JNB PSW,2
	JMP lable_07071023
lable_10311439:
	;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_Second_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_hit_)
	BANKSEL __KF8_LIBi_buff_hit_ ;;_KF8_LIBi_buff_hit_ low
	LD R1,[R0]
	;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_Second_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_baseline_)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ low
	ST [R0],R1
	;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_Second_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_hit_+1)
	BANKSEL __KF8_LIBi_buff_hit_ ;; _KF8_LIBi_buff_hit_ high
	LD R1,[R0]
	;;
	BANKSEL __KF8_LIBc_finger_OUT_Second_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_Second_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_baseline_+1)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;
	ST [R0],R1
	;;;;
	PAGESEL lable_07062010
	JMP lable_07062010
	;;;;;
lable_07071023:
	;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+1,R1
	;;;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+2,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+3,R1
	;;;;;;
	;;
lable_07062010:
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,#0x01
	MOV __KF8_LIBi_Touch_New_Date_TS_CS_,R0
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	CLR (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	MOV R0,__KF8_LIBc_finger_OUT_First_TS_CS_
	INC R0
	PAGESEL RLC_07071019
	JMP RLC_07071019
RLCDeal_07071019:
	CLR PSW,0
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	RLC __KF8_LIBi_Touch_New_Date_TS_CS_
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+1)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+2)
	RLC (__KF8_LIBi_Touch_New_Date_TS_CS_+3)
RLC_07071019:
	PAGESEL RLCDeal_07071019
	DECJZ R0
	JMP RLCDeal_07071019
	;;;;;;;;;
	;;
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+1
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	ORL R0,R1
	PAGESEL lable_10311444
	JB PSW,2
	JMP lable_10311444
	;;;;;;;;;;
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	MOV R0,__KF8_lib_CH_DW_Change_Flag_TS_CS_+2
	MOV R1,__KF8_lib_CH_DW_Change_Flag_TS_CS_+3
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	AND R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	AND R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	ORL R0,R1
	PAGESEL lable_07071001
	JNB PSW,2
	JMP lable_07071001
lable_10311444:
	;;;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_First_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_hit_)
	BANKSEL __KF8_LIBi_buff_hit_ ;;_KF8_LIBi_buff_hit_ low
	LD R1,[R0]
	;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_First_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_baseline_)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;_KF8_LIBi_buff_baseline_ low
	ST [R0],R1
	;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_First_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_hit_+1)
	BANKSEL __KF8_LIBi_buff_hit_ ;; _KF8_LIBi_buff_hit_ high
	LD R1,[R0]
	;;
	BANKSEL __KF8_LIBc_finger_OUT_First_TS_CS_
	CLR PSW,0
	RLCR __KF8_LIBc_finger_OUT_First_TS_CS_
	ADD R0, #(__KF8_LIBi_buff_baseline_+1)
	BANKSEL __KF8_LIBi_buff_baseline_ ;;
	ST [R0],R1
	;;;;
	PAGESEL lable_10221513
	JMP lable_10221513
	;;;;;
lable_07071001:
	;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+1
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+1,R1
	;;;;;;
	BANKSEL __KF8_LIBi_Touch_New_Date_TS_CS_
	MOV R0,__KF8_LIBi_Touch_New_Date_TS_CS_+2
	MOV R1,__KF8_LIBi_Touch_New_Date_TS_CS_+3
	BANKSEL __KF8_lib_CH_DW_Change_Flag_TS_CS_
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+2,R0
	ORL __KF8_lib_CH_DW_Change_Flag_TS_CS_+3,R1
	;;;;;
lable_10221513:
	; 2953 "../kf8ts3514_touch_cs_lib.c"
lable_07061952:
	
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __KF8_LiBf_KEY_Deal_AND_BaseLine_Up



func.__KF8TS3514_Init_Touch_WaterCS_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8TS3514_Init_Touch_WaterCS_	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8TS3514_Init_Touch_WaterCS_	;Function start
; 2 exit points
;	op : =
;	.line	434; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_En_Base_Update_Flag=1;	 	//初始化			..判断来过水后，基线只允许突然上升，和更窄范围变动
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 7
;	op : =
;	.line	436; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Get_Baihualv_Sign_Flag=0;	//初始化                        ..计算变化率符号缓存标记
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 5
;	op : =
;	.line	440; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Protect_Flag =0;			//初始化                         ..保护不判断，计数还原
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 1
;	op : =
;	.line	441; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Work_Flag =0;				//初始化                         ..其实32圈取样，随后判断按键
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 0
;	op : =
;	.line	446; "../kf8ts3514_touch_cs_lib.c"	_KF8_Work_Delay_Count_For_Flag_TS_CS_=0;
	BANKSEL	__KF8_Work_Delay_Count_For_Flag_TS_CS_
	CLR	__KF8_Work_Delay_Count_For_Flag_TS_CS_
;	op : =
;	.line	447; "../kf8ts3514_touch_cs_lib.c"	_KF8_Touch_Sys_Work_Standing_Flag_TS_CS_ = 0;
	BANKSEL	__KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
	CLR	__KF8_Touch_Sys_Work_Standing_Flag_TS_CS_
;	op : =
;	.line	448; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_=0;
	BANKSEL	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	CLR	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	BANKSEL	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_ + 1)
	BANKSEL	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_ + 2)
	BANKSEL	__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Dealed_Flag_TS_CS_ + 3)
;	op : =
;	.line	450; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_CH_DW_Change_Flag_TS_CS_=0;
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	CLR	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 1)
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 2)
	BANKSEL	__KF8_lib_CH_DW_Change_Flag_TS_CS_
	CLR	(__KF8_lib_CH_DW_Change_Flag_TS_CS_ + 3)
;	op : =
;	.line	453; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Finded_MAX_I_Buf_TS_CS_=0;_KF8_lib_Finded_MAX_J_Buf_TS_CS_=0;
	BANKSEL	__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	CLR	__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	BANKSEL	__KF8_lib_Finded_MAX_I_Buf_TS_CS_
	CLR	(__KF8_lib_Finded_MAX_I_Buf_TS_CS_ + 1)
;	op : =
	BANKSEL	__KF8_lib_Finded_MAX_J_Buf_TS_CS_
	CLR	__KF8_lib_Finded_MAX_J_Buf_TS_CS_
	BANKSEL	__KF8_lib_Finded_MAX_J_Buf_TS_CS_
	CLR	(__KF8_lib_Finded_MAX_J_Buf_TS_CS_ + 1)
;	op : =
;	.line	454; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Finded_MAX_COUNT_TS_CS_=0;
	BANKSEL	__KF8_lib_Finded_MAX_COUNT_TS_CS_
	CLR	__KF8_lib_Finded_MAX_COUNT_TS_CS_
;	op : =
;	.line	455; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Key_Down_Count_TS_CS_=0;
	BANKSEL	__KF8_lib_Key_Down_Count_TS_CS_
	CLR	__KF8_lib_Key_Down_Count_TS_CS_
;	op : =
;	.line	456; "../kf8ts3514_touch_cs_lib.c"	_KF8_LIBc_water_monitor_TS_CS_=0xff;
	MOV	R0,# 0xff
	BANKSEL	__KF8_LIBc_water_monitor_TS_CS_
	MOV	__KF8_LIBc_water_monitor_TS_CS_, R0
;	op : INLINEASM
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;set 0xFF
	MOV R0,#0xFF
	BANKSEL __KF8_lib_Finded_MAX_I_TS_CS_
	MOV __KF8_lib_Finded_MAX_I_TS_CS_,R0
	BANKSEL __KF8_lib_Finded_MAX_J_TS_CS_
	MOV __KF8_lib_Finded_MAX_J_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,#low(_CHS_AMOUNT)
	MOV R1,#high(_CHS_AMOUNT)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	BANKSEL __KF8_LIBc_channel_
	MOV __KF8_LIBc_channel_,R0
	; 501 "../kf8ts3514_touch_cs_lib.c"
	;;;;;;;;;;;;
	BANKSEL __KF8_LIBc_channel_
	CLR __KF8_LIBc_channel_
	;;;;;;;;;;;;
	BANKSEL __KF8_LIBi_channel_flag_
	CLR __KF8_LIBi_channel_flag_
	BANKSEL __KF8_LIBi_channel_flag_
	CLR (__KF8_LIBi_channel_flag_+1)
	CLR (__KF8_LIBi_channel_flag_+2)
	CLR (__KF8_LIBi_channel_flag_+3)
	;;;;;;;;;;;;;
	BANKSEL __KF8_lib_Date_Uchar_Temp_TS_CS_
	CLR __KF8_lib_Date_Uchar_Temp_TS_CS_
	;;;;;;;;;;;;;;
	
;	op : INLINEASM
	MOVB #0x01
	MOV R0,#0x66
	MOV 0x4E,R0 ;
	
;	op : INLINEASM
	MOV R0, # low (__KF8_TOUCH_CH_EN+0)
	MOV R1, # high (__KF8_TOUCH_CH_EN+0)
	PAGESEL __R2PCHPCL
	CALL __R2PCHPCL
	PAGESEL $
	ORL R0,#0x80
	BANKSEL CTCTL0
	MOV CTCTL0,R0
	
;	op : =
;	.line	565; "../kf8ts3514_touch_cs_lib.c"	T3L = 0;	T3H = 0;
	BANKSEL	_T3L
	CLR	_T3L
;	op : =
	BANKSEL	_T3H
	CLR	_T3H
;	op : GET_VALUE_AT_ADDRESS
;	.line	567; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 2
	JMP	_00019_DS_
;	op : INLINEASM
	MOVB #0x00
	CLR 0x53,5
	
;	op : LABEL
;	op : INLINEASM
_00019_DS_
	BANKSEL _CTCTL0
	SET _CTCTL0,6
	NOP
	JB _CTCTL0,6
	JMP $-3
	BANKSEL _CTCTL1
	SET _CTCTL1,5
	
;	op : |
;	.line	594; "../kf8ts3514_touch_cs_lib.c"	CTCTL0 |= 0x20;
	BANKSEL	_CTCTL0
	SET	_CTCTL0, 5
;	op : GET_VALUE_AT_ADDRESS
;	.line	596; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 2
	JMP	_00021_DS_
;	op : INLINEASM
	MOVB #0x00
	SET 0x53,5
	
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00021_DS_
;	.line	604; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Count_Use_T4)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 3
	JMP	_00023_DS_
;	op : =
;	.line	606; "../kf8ts3514_touch_cs_lib.c"	T4L = 0;    T4H = 0; 	T4ON=1;		// T3 T4 如果分频 外部可设置
	BANKSEL	_T4L
	CLR	_T4L
;	op : =
	BANKSEL	_T4H
	CLR	_T4H
;	op : =
	BANKSEL	_T4CTL_bits
	SET	_T4CTL_bits, 0
;	op : LABEL
;	op : =
_00023_DS_
;	.line	609; "../kf8ts3514_touch_cs_lib.c"	T3IF=0;		T3IE=1;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 7
;	op : =
	BANKSEL	_EIE2_bits
	SET	_EIE2_bits, 7
;	op : =
;	.line	610; "../kf8ts3514_touch_cs_lib.c"	AIEL=1;		AIEH=1;
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 6
;	op : =
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 7
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __KF8TS3514_Init_Touch_WaterCS_



func.__KF8_Lib_Date_Change_get_	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8_Lib_Date_Change_get_	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8_Lib_Date_Change_get_	;Function start
; 2 exit points
;	op : INLINEASM
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV R0,__KF8_Temp_Cur_B_TS_CS_
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB __KF8_Temp_Cur_A_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV R1,(__KF8_Temp_Cur_B_TS_CS_+1)
	JB PSW,0
	INC R1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB (__KF8_Temp_Cur_A_TS_CS_+1),R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL label_3_3_3
	JB PSW,0
	JMP label_3_3_3
	PAGESEL label_4_4_4
	JMP label_4_4_4
label_3_3_3:
	;;
	BANKSEL __KF8_lib_Touch_Bits_
	CLR __KF8_lib_Touch_Bits_, 5
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	CPL __KF8_Temp_Cur_A_TS_CS_
	BANKSEL (__KF8_Temp_Cur_A_TS_CS_+1)
	CPL (__KF8_Temp_Cur_A_TS_CS_+1)
	INC __KF8_Temp_Cur_A_TS_CS_
	JNB PSW,2
	INC (__KF8_Temp_Cur_A_TS_CS_+1)
	PAGESEL label_5_5_5
	JMP label_5_5_5
label_4_4_4:
	;;
	BANKSEL __KF8_lib_Touch_Bits_
	SET __KF8_lib_Touch_Bits_, 5
label_5_5_5:
	
;	op : INLINEASM
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	MOV R0, (__KF8_Temp_Cur_A_TS_CS_ + 1)
	AND R0,# 0xfc
	PAGESEL label_6_6_6
	JB PSW, 2
	JMP label_6_6_6
	;;;;;;;;;;;;;;;;;;;;;;小于;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,# 0x06
	INC R0
	PAGESEL label_7_7_7
	JMP label_7_7_7
label_8_8_8:
	CLR PSW, 0
	RLC __KF8_Temp_Cur_A_TS_CS_
	RLC (__KF8_Temp_Cur_A_TS_CS_ + 1)
label_7_7_7:
	PAGESEL label_8_8_8
	DECJZ R0
	JMP label_8_8_8
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,# 0x08
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	ADD __KF8_Temp_Cur_B_TS_CS_, R0
	PAGESEL label_9_9_9
	JB PSW, 0
	JMP label_9_9_9
	INC (__KF8_Temp_Cur_B_TS_CS_ + 1)
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
label_9_9_9:
	MOV R0,# 0x04
	INC R0
	PAGESEL label_10_10_10
	JMP label_10_10_10
label_11_11_11:
	CLR PSW, 0
	RRC (__KF8_Temp_Cur_B_TS_CS_ + 1)
	RRC __KF8_Temp_Cur_B_TS_CS_
label_10_10_10:
	PAGESEL label_11_11_11
	DECJZ R0
	JMP label_11_11_11
	PAGESEL label_13_13_13
	JMP label_13_13_13
	;;;;;;;;;;;;;;;;;;;;;;大于等于;;;;;;;;;;;;;;;;;;;;;;;;
label_6_6_6:
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	CLR PSW, 0
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	RLC __KF8_Temp_Cur_A_TS_CS_
	RLC (__KF8_Temp_Cur_A_TS_CS_ + 1)
	CLR PSW, 0
	RLC __KF8_Temp_Cur_A_TS_CS_
	RLC (__KF8_Temp_Cur_A_TS_CS_ + 1)
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0,# 0x80
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	ADD __KF8_Temp_Cur_B_TS_CS_, R0
	PAGESEL label_12_12_12
	JB PSW, 0
	JMP label_12_12_12
	INC (__KF8_Temp_Cur_B_TS_CS_ + 1)
label_12_12_12:
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV R0, (__KF8_Temp_Cur_B_TS_CS_ + 1)
	MOV __KF8_Temp_Cur_B_TS_CS_, R0
	CLR (__KF8_Temp_Cur_B_TS_CS_ + 1)
label_13_13_13:
	
;	op : INLINEASM
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	CLR __KF8_lib_bahualvtemportemp_TS_CS_
	CLR __KF8_lib_bahualvtemportemp_TS_CS_+1 ;;
label_17_17_17:
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV R0,__KF8_Temp_Cur_B_TS_CS_
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB __KF8_Temp_Cur_A_TS_CS_,R0
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	BANKSEL __KF8_Temp_Cur_B_TS_CS_
	MOV R1,(__KF8_Temp_Cur_B_TS_CS_+1)
	JB PSW,0
	INC R1
	BANKSEL __KF8_Temp_Cur_A_TS_CS_
	SUB (__KF8_Temp_Cur_A_TS_CS_+1),R1
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	PAGESEL label_15_15_15
	JB PSW,0
	JMP label_15_15_15
	PAGESEL label_14_14_14
	JMP label_14_14_14
label_15_15_15:
	;;
	PAGESEL label_16_16_16
	JMP label_16_16_16
label_14_14_14:
	;;
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	INC __KF8_lib_bahualvtemportemp_TS_CS_
	MOV R0,__KF8_lib_bahualvtemportemp_TS_CS_
	SUB R0,#(200)
	PAGESEL label_16_16_16
	JB PSW,0
	JMP label_16_16_16 ;
	PAGESEL label_17_17_17
	JMP label_17_17_17 ;
label_16_16_16:
	
;	op : GET_VALUE_AT_ADDRESS
;	.line	407; "../kf8ts3514_touch_cs_lib.c"	if(_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Get_Baihualv_Sign_Flag)
	BANKSEL	__KF8_lib_Touch_Bits_
	JB	__KF8_lib_Touch_Bits_, 5
	JMP	_00015_DS_
;	op : INLINEASM
	BANKSEL __KF8_lib_bahualvtemportemp_TS_CS_
	CPL __KF8_lib_bahualvtemportemp_TS_CS_
	CPL __KF8_lib_bahualvtemportemp_TS_CS_+1 ;;
	INC __KF8_lib_bahualvtemportemp_TS_CS_
	JNB PSW,2 ;;
	INC __KF8_lib_bahualvtemportemp_TS_CS_+1 ;;
	
;	op : LABEL
;	op : ENDFUNCTION
_00015_DS_
	CRET	
; exit point of __KF8_Lib_Date_Change_get_



func.__KF8TS3514_Lib_Set_CS_Parameter	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __KF8TS3514_Lib_Set_CS_Parameter	;Function start
; 2 exit points
;has an exit
;1 compiler assigned register :
;   r0x103B
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__KF8TS3514_Lib_Set_CS_Parameter	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	189; "../kf8ts3514_touch_cs_lib.c"	void _KF8TS3514_Lib_Set_CS_Parameter(unsigned char parameterin)
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : IFX
;	.line	191; "../kf8ts3514_touch_cs_lib.c"	if(parameterin==0)
	MOV	R0,# 0x00
	BANKSEL	r0x103B
	ORL	R0, r0x103B
	JB	PSW, 2
	JMP	_00007_DS_
;	op : =
;	.line	193; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Count_Use_T4=1;
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 3
;	op : =
;	.line	194; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B=0;
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 2
;	op : GOTO
	JMP	_00009_DS_
;	op : LABEL
;	op : EQ_OP
_00007_DS_
;	.line	196; "../kf8ts3514_touch_cs_lib.c"	else if(parameterin==1)
	BANKSEL	r0x103B
	MOVZ	R0, r0x103B
	XOR	R0,# 0x01
	JB	PSW, 2
	JMP	_00004_DS_
;	op : =
;	.line	198; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Count_Use_T4=0;
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 3
;	op : =
;	.line	199; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B=0;
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 2
;	op : GOTO
	JMP	_00009_DS_
;	op : LABEL
;	op : =
_00004_DS_
;	.line	203; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Count_Use_T4=0;
	BANKSEL	__KF8_lib_Touch_Bits_
	CLR	__KF8_lib_Touch_Bits_, 3
;	op : =
;	.line	204; "../kf8ts3514_touch_cs_lib.c"	_KF8_lib_Touch_Bits_._bitx_x._KF8_Touch_Use_T3_B=1;
	BANKSEL	__KF8_lib_Touch_Bits_
	SET	__KF8_lib_Touch_Bits_, 2
;	op : LABEL
;	op : ENDFUNCTION
_00009_DS_
	CRET	
; exit point of __KF8TS3514_Lib_Set_CS_Parameter



func.__R2PCHPCL	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __R2PCHPCL	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__R2PCHPCL	;Function start
; 2 exit points
;	op : INLINEASM
	MOV PCH,R1
	MOV PCL,R0
	
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of __R2PCHPCL


;	code size estimation:
;	  433+  233 =   666 instructions ( 1798 byte)


	.end
