;--------------------------------------------------------
; File Created by ChiponCC : ChipON  inc.
; Version 3.0.4#6752 (Jul 10 2019 19:07:19) (MSVC)
; This file was generated Tue Sep 03 21:04:44 2019
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../KungFu8_I2C.c"
	.radix dec
	.include "KF8A100GQT.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_Get_Check_Sum
	.extern	_My_Strlen
	.extern	_My_Memset
	.extern	_My_strcmp
	.extern	_My_strfind
	.extern	_My_memcpy
	.extern	_Long_To_BigBytebuffer
	.extern	_BigByte_to_int
	.extern	_Delay_Wait_CLK_Sample
	.extern	_STKR0
	.extern	_STK00
	.extern	_STK01
	.extern	_STK02
	.extern	_STK03
	.extern	_STK04
	.extern	_STK05
	.extern	_STK06
	.extern	_STK07
	.extern	_STK08
	.extern	_STK09
	.extern	_STK10
	.extern	_STK11
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_P4_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_T2CTL0_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_CMCTL0_bits
	.extern	_C1CTL_bits
	.extern	_COUT_bits
	.extern	_ADCCTL0_bits
	.extern	_OPTR_bits
	.extern	_IP0_bits
	.extern	_IP1_bits
	.extern	_IP2_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_TR3_bits
	.extern	_TR4_bits
	.extern	_VRECTL_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_C2CTL_bits
	.extern	_PUR0_bits
	.extern	_IOCL0_bits
	.extern	_ADCCTL1_bits
	.extern	_WDTPS_bits
	.extern	_P0LR_bits
	.extern	_P2LR_bits
	.extern	_P1LR_bits
	.extern	_P3LR_bits
	.extern	_P4LR_bits
	.extern	_ANS0_bits
	.extern	_ANS1_bits
	.extern	_ANS2_bits
	.extern	_ANS3_bits
	.extern	_ANS4_bits
	.extern	_T0CTL_bits
	.extern	_ADCCTL2_bits
	.extern	_T2CTL1_bits
	.extern	_BKPCTL_bits
	.extern	_SCLKSTU_bits
	.extern	_PWM6CTL0_bits
	.extern	_P6ATRCTL_bits
	.extern	_PWM6CTL2_bits
	.extern	_PWM6PC_bits
	.extern	_CCTCTL_bits
	.extern	_SCLKCTL_bits
	.extern	_HFCKCTL_bits
	.extern	_LFCKCTL_bits
	.extern	_P5_bits
	.extern	_P6_bits
	.extern	_P7_bits
	.extern	_P9_bits
	.extern	_IP5_bits
	.extern	_EIF4_bits
	.extern	_EIE4_bits
	.extern	_EIF5_bits
	.extern	_EIE5_bits
	.extern	_T4CTL0_bits
	.extern	_WCFR_bits
	.extern	_WCNT_bits
	.extern	_WCTL_bits
	.extern	_T1CTL2_bits
	.extern	_T3CTL_bits
	.extern	_UPINSET2_bits
	.extern	_IP4_bits
	.extern	_TR5_bits
	.extern	_TR6_bits
	.extern	_TR7_bits
	.extern	_TR9_bits
	.extern	_T7CTL_bits
	.extern	_VRES0_bits
	.extern	_SSCI1CTL1_bits
	.extern	_SSCI1STA_bits
	.extern	_SSCI1CTL0_bits
	.extern	_SSCI1ADD_bits
	.extern	_SSCI1MSK_bits
	.extern	_SSCI1CTL2_bits
	.extern	_DIVCTL_bits
	.extern	_P5LR_bits
	.extern	_P6LR_bits
	.extern	_P7LR_bits
	.extern	_P9LR_bits
	.extern	_ANS5_bits
	.extern	_ANS6_bits
	.extern	_ANS7_bits
	.extern	_ANS8_bits
	.extern	_ANS9_bits
	.extern	_VRES1_bits
	.extern	_T4CTL1_bits
	.extern	_UADMATCH2_bits
	.extern	_U7816TXCTL2_bits
	.extern	_EGTCTL2_bits
	.extern	_CLKDIV2_bits
	.extern	_U7816CTL2_bits
	.extern	_U7816RXCTL2_bits
	.extern	_RSCTL2_bits
	.extern	_BRCTL2_bits
	.extern	_TSCTL2_bits
	.extern	_SSCI2STA_bits
	.extern	_SSCI2CTL0_bits
	.extern	_SSCI2ADD_bits
	.extern	_SSCI2MSK_bits
	.extern	_SSCI2CTL2_bits
	.extern	_RSCTL3_bits
	.extern	_BRCTL3_bits
	.extern	_CCP3CTL_bits
	.extern	_CCP7CTL_bits
	.extern	_TSCTL3_bits
	.extern	_EIF3_bits
	.extern	_EIE3_bits
	.extern	_UADMATCH3_bits
	.extern	_SLEPEN3_bits
	.extern	_UPINSET3_bits
	.extern	_SSCI2CTL1_bits
	.extern	_IP3_bits
	.extern	_FILT1CTL_bits
	.extern	_FILT1PER_bits
	.extern	_FILT2CTL_bits
	.extern	_FILT2PER_bits
	.extern	_FILT3CTL_bits
	.extern	_FILT3PER_bits
	.extern	_FILT4CTL_bits
	.extern	_FILT4PER_bits
	.extern	_C3CTL_bits
	.extern	_C4CTL_bits
	.extern	_PUR9_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_PUR3_bits
	.extern	_PUR4_bits
	.extern	_PUR5_bits
	.extern	_PUR6_bits
	.extern	_PUR7_bits
	.extern	_MULCTL_bits
	.extern	_UPINSET1_bits
	.extern	_USLPEN1_bits
	.extern	_ADCINTCTL_bits
	.extern	_ADSCANCTL_bits
	.extern	_EIE7_bits
	.extern	_EIF7_bits
	.extern	_IP7_bits
	.extern	_HLVDCTL_bits
	.extern	_RTCSRT_bits
	.extern	_RTCSTU_bits
	.extern	_RTCALRS_bits
	.extern	_RTCALRM_bits
	.extern	_RTCALRH_bits
	.extern	_RTCALRW_bits
	.extern	_RTCTTR_bits
	.extern	_RTCFCR_bits
	.extern	_RTCSEC_bits
	.extern	_RTCMIN_bits
	.extern	_RTCHOUR_bits
	.extern	_RTCWEK_bits
	.extern	_RTCDAY_bits
	.extern	_RTCMTH_bits
	.extern	_RTCYEAR_bits
	.extern	_RTCTMRCTL_bits
	.extern	_RTCTMREN_bits
	.extern	_POWCTL_bits
	.extern	_PCAL_bits
	.extern	_BWDTCTL_bits
	.extern	_PHCLR_bits
	.extern	_LPRCCTL_bits
	.extern	_BBODCTL_bits
	.extern	_IOCAF_bits
	.extern	_IOCBF_bits
	.extern	_IOCCF_bits
	.extern	_IOCAPOS_bits
	.extern	_IOCBPOS_bits
	.extern	_IOCCPOS_bits
	.extern	_IOCANEG_bits
	.extern	_IOCBNEG_bits
	.extern	_IOCCNEG_bits
	.extern	_IOCMOD_bits
	.extern	_SRCTL0_bits
	.extern	_SRCTL1_bits
	.extern	_T8CTL1_bits
	.extern	_T9CTL1_bits
	.extern	_PA_bits
	.extern	_PALR_bits
	.extern	_TRA_bits
	.extern	_PURA_bits
	.extern	_ANSA_bits
	.extern	_PB_bits
	.extern	_PBLR_bits
	.extern	_TRB_bits
	.extern	_PURB_bits
	.extern	_ANSB_bits
	.extern	_RSCTL4_bits
	.extern	_BRCTL4_bits
	.extern	_TSCTL4_bits
	.extern	_UADMATCH4_bits
	.extern	_SLPEN4_bits
	.extern	_UPINSET4_bits
	.extern	_P3ASCTL_bits
	.extern	_P3ATRCTL_bits
	.extern	_PWM3CTL0_bits
	.extern	_PWM3CTL1_bits
	.extern	_T8CTL_bits
	.extern	_P4ASCTL_bits
	.extern	_P4ATRCTL_bits
	.extern	_PWM4CTL0_bits
	.extern	_PWM4CTL1_bits
	.extern	_T9CTL_bits
	.extern	_APFCTL2_bits
	.extern	_APFCTL3_bits
	.extern	_APFCTL4_bits
	.extern	_APFCTL5_bits
	.extern	_APFCTL6_bits
	.extern	_APFCTL7_bits
	.extern	_APFCTL8_bits
	.extern	_APFCTL9_bits
	.extern	_APFCTL10_bits
	.extern	_APFCTL11_bits
	.extern	_APFCTL12_bits
	.extern	_ADCOFFSET_bits
	.extern	_P7ATRCTL_bits
	.extern	_PWM7CTL0_bits
	.extern	_PWM7CTL2_bits
	.extern	_T5CTL1_bits
	.extern	_PLLCTL_bits
	.extern	_CANIE_bits
	.extern	_CANIF_bits
	.extern	_CANP_bits
	.extern	_EIE6_bits
	.extern	_EIF6_bits
	.extern	_IP6_bits
	.extern	_CANTXINF_bits
	.extern	_CANTXID0_bits
	.extern	_CANTXID1_bits
	.extern	_CANTXID2_bits
	.extern	_CANTXID3_bits
	.extern	_CANMOD_bits
	.extern	_CANCMR_bits
	.extern	_CANSTA_bits
	.extern	_CANBTR_bits
	.extern	_CANSEG_bits
	.extern	_CANALC_bits
	.extern	_CANECC_bits
	.extern	_CANEWL_bits
	.extern	_CANRXE_bits
	.extern	_CANTXE_bits
	.extern	_CANRMC_bits
	.extern	_CANACR0_bits
	.extern	_CANACR1_bits
	.extern	_CANACR2_bits
	.extern	_CANACR3_bits
	.extern	_CANMSK0_bits
	.extern	_CANMSK1_bits
	.extern	_CANMSK2_bits
	.extern	_CANMSK3_bits
	.extern	_T5CTL0_bits
	.extern	_T6CTL1_bits
	.extern	_T6CTL0_bits
	.extern	_PWM7PC_bits
	.extern	_PWM5OC_bits
	.extern	_PWM5PC_bits
	.extern	_T10CTL1_bits
	.extern	_T10CTL0_bits
	.extern	_EIF8_bits
	.extern	_EIE8_bits
	.extern	_IP8_bits
	.extern	_ADCCTL3_bits
	.extern	_P5ASCTL0_bits
	.extern	_P5ASCTL1_bits
	.extern	_P5STRCTL0_bits
	.extern	_P5STRCTL1_bits
	.extern	_PWM5CTL0_bits
	.extern	_PWM5CTL1_bits
	.extern	_PWM5CTL2_bits
	.extern	_PWM5FC_bits
	.extern	_IDLR
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_IR
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_P3
	.extern	_P4
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_T2L
	.extern	_T2CTL0
	.extern	_PWM1L
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_CMCTL0
	.extern	_C1CTL
	.extern	_COUT
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_OPTR
	.extern	_IP0
	.extern	_IP1
	.extern	_IP2
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_TR3
	.extern	_TR4
	.extern	_VRECTL
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCAL2
	.extern	_C2CTL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PUR0
	.extern	_IOCL0
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_WDTPS
	.extern	_T2H
	.extern	_PP60H
	.extern	_PWM6L0
	.extern	_PWM6H0
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_P3LR
	.extern	_P4LR
	.extern	_ANS0
	.extern	_ANS1
	.extern	_ANS2
	.extern	_ANS3
	.extern	_ANS4
	.extern	_T0CTL
	.extern	_ADCCTL2
	.extern	_T2CTL1
	.extern	_PP60L
	.extern	_BKPCTL
	.extern	_SCLKSTU
	.extern	_PWM6H1
	.extern	_PWM6L1
	.extern	_PWM6CTL0
	.extern	_P6ATRCTL
	.extern	_PWM6CTL2
	.extern	_PWM6PC
	.extern	_PWM6H2
	.extern	_PWM6L2
	.extern	_PWM6H3
	.extern	_PWM6L3
	.extern	_CCTCTL
	.extern	_SCLKCTL
	.extern	_HFCKCTL
	.extern	_LFCKCTL
	.extern	_P5
	.extern	_P6
	.extern	_P7
	.extern	_P9
	.extern	_IP5
	.extern	_EIF4
	.extern	_EIE4
	.extern	_EIF5
	.extern	_EIE5
	.extern	_T4L
	.extern	_T4CTL0
	.extern	_WCFR
	.extern	_WCNT
	.extern	_WCTL
	.extern	_T3REH
	.extern	_T1CTL2
	.extern	_T3CTL
	.extern	_T3H
	.extern	_T3REL
	.extern	_T3L
	.extern	_UPINSET2
	.extern	_IP4
	.extern	_TR5
	.extern	_TR6
	.extern	_TR7
	.extern	_TR9
	.extern	_T7CTL
	.extern	_T7L
	.extern	_T7H
	.extern	_T7REL
	.extern	_T7REH
	.extern	_VRES0
	.extern	_DIVRH
	.extern	_OSCCAL0
	.extern	_OSCCAL3
	.extern	_SSCI1CTL1
	.extern	_SSCI1STA
	.extern	_SSCI1CTL0
	.extern	_SSCI1BUFR
	.extern	_SSCI1ADD
	.extern	_SSCI1MSK
	.extern	_SSCI1CTL2
	.extern	_DIVBH
	.extern	_DIVCTL
	.extern	_DIVAH
	.extern	_DIVAL
	.extern	_DIVBL
	.extern	_DIVQH
	.extern	_DIVQL
	.extern	_DIVRL
	.extern	_T4H
	.extern	_PP61H
	.extern	_P5LR
	.extern	_P6LR
	.extern	_P7LR
	.extern	_P9LR
	.extern	_ANS5
	.extern	_ANS6
	.extern	_ANS7
	.extern	_ANS8
	.extern	_ANS9
	.extern	_VRES1
	.extern	_T4CTL1
	.extern	_PP61L
	.extern	_T2CCR0L
	.extern	_T2CCR0H
	.extern	_T2CCR1L
	.extern	_T2CCR1H
	.extern	_T4CCR0L
	.extern	_EUBRGH2
	.extern	_T4CCR0H
	.extern	_UADMATCH2
	.extern	_U7816TXCTL2
	.extern	_EGTCTL2
	.extern	_CLKDIV2
	.extern	_U7816CTL2
	.extern	_U7816RXCTL2
	.extern	_RSCTL2
	.extern	_TXSDR2
	.extern	_RXSDR2
	.extern	_BRCTL2
	.extern	_TSCTL2
	.extern	_EUBRGL2
	.extern	_SSCI2STA
	.extern	_SSCI2CTL0
	.extern	_SSCI2BUFR
	.extern	_SSCI2ADD
	.extern	_SSCI2MSK
	.extern	_SSCI2CTL2
	.extern	_RSCTL3
	.extern	_TXSDR3
	.extern	_RXSDR3
	.extern	_BRCTL3
	.extern	_CCP3CTL
	.extern	_CCP3H
	.extern	_CCP3L
	.extern	_CCP7CTL
	.extern	_CCP7H
	.extern	_CCP7L
	.extern	_TSCTL3
	.extern	_EUBRGL3
	.extern	_EUBRGH3
	.extern	_EIF3
	.extern	_EIE3
	.extern	_UADMATCH3
	.extern	_SLEPEN3
	.extern	_UPINSET3
	.extern	_SSCI2CTL1
	.extern	_IP3
	.extern	_FILT1CTL
	.extern	_FILT1PER
	.extern	_FILT2CTL
	.extern	_FILT2PER
	.extern	_FILT3CTL
	.extern	_FILT3PER
	.extern	_FILT4CTL
	.extern	_FILT4PER
	.extern	_C3CTL
	.extern	_C4CTL
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_PUR9
	.extern	_PUR1
	.extern	_PUR2
	.extern	_PUR3
	.extern	_PUR4
	.extern	_PUR5
	.extern	_PUR6
	.extern	_PUR7
	.extern	_MULAL
	.extern	_MULBH
	.extern	_MULRES3
	.extern	_MULRES2
	.extern	_MULRES1
	.extern	_MULRES0
	.extern	_MULBL
	.extern	_MULCTL
	.extern	_MULAH
	.extern	_ADCDATA1L
	.extern	_ADCDATA1H
	.extern	_ADCDATA2L
	.extern	_ADCDATA2H
	.extern	_ADCDATA3L
	.extern	_ADCDATA3H
	.extern	_UPINSET1
	.extern	_USLPEN1
	.extern	_EUBRGH1
	.extern	_ADCINTCTL
	.extern	_ADSCANCTL
	.extern	_EIE7
	.extern	_EIF7
	.extern	_IP7
	.extern	_HLVDCTL
	.extern	_RTCSRT
	.extern	_RTCSTU
	.extern	_RTCALRS
	.extern	_RTCALRM
	.extern	_RTCALRH
	.extern	_RTCALRW
	.extern	_RTCTTR
	.extern	_RTCFCR
	.extern	_RTCSEC
	.extern	_RTCMIN
	.extern	_RTCHOUR
	.extern	_RTCWEK
	.extern	_RTCDAY
	.extern	_RTCMTH
	.extern	_RTCYEAR
	.extern	_RTCTMRCTL
	.extern	_RTCTMREN
	.extern	_RTCTMR1
	.extern	_RTCTMR0
	.extern	_POWCTL
	.extern	_PCAL
	.extern	_XTALCAL
	.extern	_BWDTCTL
	.extern	_PHCLR
	.extern	_LPRCCAL
	.extern	_LPRCCTL
	.extern	_BBODCTL
	.extern	_IOCAF
	.extern	_IOCBF
	.extern	_IOCCF
	.extern	_IOCAPOS
	.extern	_IOCBPOS
	.extern	_IOCCPOS
	.extern	_IOCANEG
	.extern	_IOCBNEG
	.extern	_IOCCNEG
	.extern	_IOCMOD
	.extern	_SRCTL0
	.extern	_SRCTL1
	.extern	_T8CTL1
	.extern	_T9CTL1
	.extern	_PA
	.extern	_PALR
	.extern	_TRA
	.extern	_PURA
	.extern	_ANSA
	.extern	_PB
	.extern	_PBLR
	.extern	_TRB
	.extern	_PURB
	.extern	_ANSB
	.extern	_RSCTL4
	.extern	_TXSDR4
	.extern	_RXSDR4
	.extern	_BRCTL4
	.extern	_TSCTL4
	.extern	_EUBRGL4
	.extern	_EUBRGH4
	.extern	_UADMATCH4
	.extern	_SLPEN4
	.extern	_UPINSET4
	.extern	_P3ASCTL
	.extern	_P3ATRCTL
	.extern	_PP3H
	.extern	_PP3L
	.extern	_PWM3CTL0
	.extern	_PWM3CTL1
	.extern	_PWM3H0
	.extern	_PWM3H1
	.extern	_PWM3L0
	.extern	_PWM3L1
	.extern	_T8CCRH
	.extern	_T8CCRL
	.extern	_T8CTL
	.extern	_T8H
	.extern	_T8L
	.extern	_P4ASCTL
	.extern	_P4ATRCTL
	.extern	_PP4H
	.extern	_PP4L
	.extern	_PWM4CTL0
	.extern	_PWM4CTL1
	.extern	_PWM4H0
	.extern	_PWM4H1
	.extern	_PWM4L0
	.extern	_PWM4L1
	.extern	_T9CCRH
	.extern	_T9CCRL
	.extern	_T9CTL
	.extern	_T9H
	.extern	_T9L
	.extern	_APFCTL2
	.extern	_APFCTL3
	.extern	_APFCTL4
	.extern	_APFCTL5
	.extern	_APFCTL6
	.extern	_APFCTL7
	.extern	_APFCTL8
	.extern	_APFCTL9
	.extern	_APFCTL10
	.extern	_APFCTL11
	.extern	_APFCTL12
	.extern	_ADCOFFSET
	.extern	_P7ATRCTL
	.extern	_PP70H
	.extern	_PP70L
	.extern	_PP71H
	.extern	_PP71L
	.extern	_PWM7CTL0
	.extern	_PWM7CTL2
	.extern	_T5CTL1
	.extern	_PLLCTL
	.extern	_CANIE
	.extern	_CANIF
	.extern	_CANP
	.extern	_EIE6
	.extern	_EIF6
	.extern	_IP6
	.extern	_CANTXINF
	.extern	_CANTXID0
	.extern	_CANTXID1
	.extern	_CANTXID2
	.extern	_CANTXID3
	.extern	_CANTXDT0
	.extern	_CANTXDT1
	.extern	_CANTXDT2
	.extern	_CANTXDT3
	.extern	_CANTXDT4
	.extern	_CANTXDT5
	.extern	_CANTXDT6
	.extern	_CANTXDT7
	.extern	_CANMOD
	.extern	_CANCMR
	.extern	_CANSTA
	.extern	_CANBTR
	.extern	_CANSEG
	.extern	_CANALC
	.extern	_CANECC
	.extern	_CANEWL
	.extern	_CANRXE
	.extern	_CANTXE
	.extern	_CANRMC
	.extern	_CANACR0
	.extern	_CANACR1
	.extern	_CANACR2
	.extern	_CANACR3
	.extern	_CANMSK0
	.extern	_CANMSK1
	.extern	_CANMSK2
	.extern	_CANMSK3
	.extern	_T5CTL0
	.extern	_T5H
	.extern	_T5L
	.extern	_T6CTL1
	.extern	_T6CTL0
	.extern	_T6H
	.extern	_T6L
	.extern	_PWM7L0
	.extern	_PWM7H0
	.extern	_PWM7L1
	.extern	_PWM7H1
	.extern	_PWM7L2
	.extern	_PWM7H2
	.extern	_T5CCR0H
	.extern	_T5CCR0L
	.extern	_T5CCR1H
	.extern	_T5CCR1L
	.extern	_T6CCR0H
	.extern	_T6CCR0L
	.extern	_PWM7L3
	.extern	_PWM7H3
	.extern	_PWM7PC
	.extern	_PWM5H2
	.extern	_PWM5H3
	.extern	_PWM5L0
	.extern	_PWM5L1
	.extern	_PWM5L2
	.extern	_PWM5L3
	.extern	_PWM5OC
	.extern	_PWM5PC
	.extern	_T10CTL1
	.extern	_T10CCR0H
	.extern	_T10CCR0L
	.extern	_T10CCR1H
	.extern	_T10CCR1L
	.extern	_T10CTL0
	.extern	_T10L
	.extern	_T10H
	.extern	_EIF8
	.extern	_EIE8
	.extern	_IP8
	.extern	_ADCCTL3
	.extern	_P5ASCTL0
	.extern	_P5ASCTL1
	.extern	_P5STRCTL0
	.extern	_P5STRCTL1
	.extern	_PP5H
	.extern	_PP5L
	.extern	_PWM5CTL0
	.extern	_PWM5CTL1
	.extern	_PWM5CTL2
	.extern	_PWM5FC
	.extern	_PWM5H0
	.extern	_PWM5H1
	.extern	__gptrget1
	.extern	__gptrput1

	.extern I0R1
	.extern I0R7
	.extern I0PSW
	.extern I0PCH
	.extern I1R1
	.extern I1R7
	.extern I1PSW
	.extern I1PCH
	.extern TRAPRx73
	.extern TRAPRx74
	.extern TRAPRx75
	.extern TRAPRx76
	.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	_I2C_Configuration_Master
	.global	_I2C_Configuration_Slave
	.global	_I2C_Read_Data
	.global	_I2C_Read_s_Data
	.global	_I2C_Write_Data
	.global	_I2C_Write_s_Data
	.global	_I2C_ReceiveData
	.global	_I2C_SendData
	.global	_I2C_SendNAck
	.global	_I2C_SendAck
	.global	_I2C_RSendXAck
	.global	_I2C_Stop
	.global	_I2C_ReStart
	.global	_I2C_Start
	.global	_I2C_Idle
	.global	_SSCII2C_DateStruct
	.define _STK11	STK11
	.define _STK10	STK10
	.define _STK09	STK09
	.define _STK08	STK08
	.define _STK07	STK07
	.define _STK06	STK06
	.define _STK05	STK05
	.define _STK04	STK04
	.define _STK03	STK03
	.define _STK02	STK02
	.define _STK01	STK01
	.define _STK00	STK00

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_KungFu8_I2C_0	.udata
_SSCII2C_DateStruct	.res	15

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_KungFu8_I2C_0	.udata
r0x1026	.res	1
UDL_KungFu8_I2C_1	.udata
r0x1027	.res	1
UDL_KungFu8_I2C_2	.udata
r0x1028	.res	1
UDL_KungFu8_I2C_3	.udata
r0x101D	.res	1
UDL_KungFu8_I2C_4	.udata
r0x101E	.res	1
UDL_KungFu8_I2C_5	.udata
r0x1021	.res	1
UDL_KungFu8_I2C_6	.udata
r0x1020	.res	1
UDL_KungFu8_I2C_7	.udata
r0x101F	.res	1
UDL_KungFu8_I2C_8	.udata
r0x1022	.res	1
UDL_KungFu8_I2C_9	.udata
r0x1023	.res	1
UDL_KungFu8_I2C_10	.udata
r0x1024	.res	1
UDL_KungFu8_I2C_11	.udata
r0x1025	.res	1
UDL_KungFu8_I2C_12	.udata
r0x1018	.res	1
UDL_KungFu8_I2C_13	.udata
r0x1019	.res	1
UDL_KungFu8_I2C_14	.udata
r0x101B	.res	1
UDL_KungFu8_I2C_15	.udata
r0x101A	.res	1
UDL_KungFu8_I2C_16	.udata
r0x101C	.res	1
UDL_KungFu8_I2C_17	.udata
r0x100F	.res	1
UDL_KungFu8_I2C_18	.udata
r0x1010	.res	1
UDL_KungFu8_I2C_19	.udata
r0x1013	.res	1
UDL_KungFu8_I2C_20	.udata
r0x1012	.res	1
UDL_KungFu8_I2C_21	.udata
r0x1011	.res	1
UDL_KungFu8_I2C_22	.udata
r0x1014	.res	1
UDL_KungFu8_I2C_23	.udata
r0x1015	.res	1
UDL_KungFu8_I2C_24	.udata
r0x1016	.res	1
UDL_KungFu8_I2C_25	.udata
r0x1017	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr


func._I2C_Configuration_Master	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Configuration_Master	;Function start
; 2 exit points
;has an exit
;functions called:
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;   _Delay_Wait_CLK_Sample
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Configuration_Master	;Function start
; 2 exit points
;	::->op :*  =
;	.line	469; "../KungFu8_I2C.c"	SSCI1EN=0;
	BANKSEL	_SSCI1CTL0_bits
	CLR	_SSCI1CTL0_bits, 5
;	::->op : BITWISEAND
;	.line	471; "../KungFu8_I2C.c"	APFCTL10 &= 0x0F;
	MOV	R0,# 0x0f
	BANKSEL	_APFCTL10
	AND	_APFCTL10, R0
;	::->op : =
;	.line	472; "../KungFu8_I2C.c"	APFCTL10  = 0x50; 		 //管脚复用SCL:P02 SDA:P01
	MOV	R0,# 0x50
	BANKSEL	_APFCTL10
	MOV	_APFCTL10, R0
;	::->op :*  =
;	.line	473; "../KungFu8_I2C.c"	ANS02=0;	ANS01=0;
	BANKSEL	_ANS0_bits
	CLR	_ANS0_bits, 2
;	::->op :*  =
	BANKSEL	_ANS0_bits
	CLR	_ANS0_bits, 1
;	::->op :*  =
;	.line	474; "../KungFu8_I2C.c"	TR02=1;		TR01=1;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 2
;	::->op :*  =
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	::->op :*  =
;	.line	480; "../KungFu8_I2C.c"	TR02=0; P0LR2=0;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 2
;	::->op :*  =
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 2
;	::->op : SEND
;	::->op : CALL
;	.line	481; "../KungFu8_I2C.c"	I2C_Delayus(100); // 满足从机支持时钟的速度的延时
	MOV	R0,# 0x64
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	483; "../KungFu8_I2C.c"	TR01=0; P0LR1=0;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 1
;	::->op :*  =
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	::->op : SEND
;	::->op : CALL
;	.line	484; "../KungFu8_I2C.c"	I2C_Delayus(100);
	MOV	R0,# 0x64
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	486; "../KungFu8_I2C.c"	P0LR2=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	::->op : SEND
;	::->op : CALL
;	.line	487; "../KungFu8_I2C.c"	I2C_Delayus(100); // 满足从机支持时钟的速度的延时
	MOV	R0,# 0x64
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	489; "../KungFu8_I2C.c"	P0LR1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	::->op : SEND
;	::->op : CALL
;	.line	490; "../KungFu8_I2C.c"	I2C_Delayus(100);
	MOV	R0,# 0x64
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	492; "../KungFu8_I2C.c"	TR02=1;TR01=1;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 2
;	::->op :*  =
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	::->op : =
;	.line	495; "../KungFu8_I2C.c"	SSCI1ADD=79;//主控模式下，该寄存器 时钟=SCLK/(4*(SSCIxADD+1))决定了波特率 39-100K,79-50K;
	MOV	R0,# 0x4f
	BANKSEL	_SSCI1ADD
	MOV	_SSCI1ADD, R0
;	::->op : =
;	.line	497; "../KungFu8_I2C.c"	SSCI1CTL0=0x10 | I2C_Master_Mode_SCL_UserDefined;
	MOV	R0,# 0x18
	BANKSEL	_SSCI1CTL0
	MOV	_SSCI1CTL0, R0
;	::->op : =
;	.line	498; "../KungFu8_I2C.c"	SSCI1CTL1=0;
	BANKSEL	_SSCI1CTL1
	CLR	_SSCI1CTL1
;	::->op : =
;	.line	500; "../KungFu8_I2C.c"	SSCI1STA=0x00;
	BANKSEL	_SSCI1STA
	CLR	_SSCI1STA
;	::->op :*  =
;	.line	503; "../KungFu8_I2C.c"	BCL1IF=0;				//总线冲突中断标志位
	BANKSEL	_EIF4_bits
	CLR	_EIF4_bits, 0
;	::->op :*  =
;	.line	504; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op :*  =
;	.line	505; "../KungFu8_I2C.c"	BCL1IE=0;
	BANKSEL	_EIE4_bits
	CLR	_EIE4_bits, 0
;	::->op :*  =
;	.line	506; "../KungFu8_I2C.c"	SSCI1IE=0;
	BANKSEL	_EIE2_bits
	CLR	_EIE2_bits, 3
;	::->op :*  =
;	.line	511; "../KungFu8_I2C.c"	SSCI1EN=1;
	BANKSEL	_SSCI1CTL0_bits
	SET	_SSCI1CTL0_bits, 5
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_Configuration_Master



func._I2C_Configuration_Slave	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Configuration_Slave	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Configuration_Slave	;Function start
; 2 exit points
;	::->op :*  =
;	.line	424; "../KungFu8_I2C.c"	SSCI1EN=0;
	BANKSEL	_SSCI1CTL0_bits
	CLR	_SSCI1CTL0_bits, 5
;	::->op : =
;	.line	426; "../KungFu8_I2C.c"	APFCTL10=0x50;  //管脚复用SCL:P02 SDA:P01
	MOV	R0,# 0x50
	BANKSEL	_APFCTL10
	MOV	_APFCTL10, R0
;	::->op :*  =
;	.line	427; "../KungFu8_I2C.c"	ANS01=0;	ANS02=0;
	BANKSEL	_ANS0_bits
	CLR	_ANS0_bits, 1
;	::->op :*  =
	BANKSEL	_ANS0_bits
	CLR	_ANS0_bits, 2
;	::->op :*  =
;	.line	428; "../KungFu8_I2C.c"	TR01=1;		TR02=1;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	::->op :*  =
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 2
;	::->op :*  =
;	.line	432; "../KungFu8_I2C.c"	SSCI1CALLEN=0;
	BANKSEL	_SSCI1CTL2_bits
	CLR	_SSCI1CTL2_bits, 7
;	::->op : =
;	.line	434; "../KungFu8_I2C.c"	SSCI1CTL0=I2C_SSCIMSK_RW_Enabled;  // 选择使能掩码寄存器,这里手册描述不清楚
	MOV	R0,# 0x09
	BANKSEL	_SSCI1CTL0
	MOV	_SSCI1CTL0, R0
;	::->op : =
;	.line	435; "../KungFu8_I2C.c"	SSCI1MSK=0x00;  // bit0位不参与匹配
	BANKSEL	_SSCI1MSK
	CLR	_SSCI1MSK
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	438; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00203_DS_
;	::->op : =
;	.line	440; "../KungFu8_I2C.c"	SSCI1CTL0=I2C_Slave_Mode_Address_10Bits;
	MOV	R0,# 0x07
	BANKSEL	_SSCI1CTL0
	MOV	_SSCI1CTL0, R0
;	::->op : =
;	.line	442; "../KungFu8_I2C.c"	SSCI1ADD=I2C_Add_H;
	MOV	R0,# 0xf6
	BANKSEL	_SSCI1ADD
	MOV	_SSCI1ADD, R0
;	::->op :*  =
;	.line	443; "../KungFu8_I2C.c"	Mode10bitsAddrUAState=0;
	BANKSEL	(_SSCII2C_DateStruct+2)
	CLR	(_SSCII2C_DateStruct+2), 7
;	::->op : GOTO
	JMP	_00204_DS_
;	::->op : LABEL
;	::->op : =
_00203_DS_
;	.line	447; "../KungFu8_I2C.c"	SSCI1CTL0=I2C_Slave_Mode_Address_7Bits;
	MOV	R0,# 0x06
	BANKSEL	_SSCI1CTL0
	MOV	_SSCI1CTL0, R0
;	::->op : =
;	.line	449; "../KungFu8_I2C.c"	SSCI1ADD=I2C_Add_L;
	MOV	R0,# 0xa0
	BANKSEL	_SSCI1ADD
	MOV	_SSCI1ADD, R0
;	::->op : LABEL
;	::->op : =
_00204_DS_
;	.line	452; "../KungFu8_I2C.c"	SSCI1STA=0x00;
	BANKSEL	_SSCI1STA
	CLR	_SSCI1STA
;	::->op :*  =
;	.line	455; "../KungFu8_I2C.c"	BCL1IF=0;
	BANKSEL	_EIF4_bits
	CLR	_EIF4_bits, 0
;	::->op :*  =
;	.line	456; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op :*  =
;	.line	457; "../KungFu8_I2C.c"	BCL1IE=0;
	BANKSEL	_EIE4_bits
	CLR	_EIE4_bits, 0
;	::->op :*  =
;	.line	458; "../KungFu8_I2C.c"	SSCI1IE=1;
	BANKSEL	_EIE2_bits
	SET	_EIE2_bits, 3
;	::->op :*  =
;	.line	463; "../KungFu8_I2C.c"	SSCI1CKP=1;  //  =1  SCK释放，使能时钟   否则响应后 时钟拉低 等待处理完毕的赋1使能主机时钟继续
	BANKSEL	_SSCI1CTL0_bits
	SET	_SSCI1CTL0_bits, 4
;	::->op :*  =
;	.line	464; "../KungFu8_I2C.c"	SSCI1EN=1;
	BANKSEL	_SSCI1CTL0_bits
	SET	_SSCI1CTL0_bits, 5
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_Configuration_Slave



func._I2C_Read_Data	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Read_Data	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReStart
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReceiveData
;   __gptrput1
;   _I2C_RSendXAck
;   _I2C_Stop
;   _I2C_Stop
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReStart
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReceiveData
;   __gptrput1
;   _I2C_RSendXAck
;   _I2C_Stop
;   _I2C_Stop
;13 compiler assigned registers:
;   r0x100F
;   STK00
;   r0x1010
;   STK01
;   r0x1011
;   STK02
;   r0x1012
;   STK03
;   r0x1013
;   r0x1014
;   r0x1015
;   r0x1016
;   r0x1017
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Read_Data	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	355; "../KungFu8_I2C.c"	uint8 I2C_Read_Data(uint8 cAddr,uint8 Length,uint8 * TempAddressPoint)
	BANKSEL	r0x100F
	MOV	r0x100F, R0
;	::->op : RECEIVE
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1010
	MOV	r0x1010, R0
;	::->op : RECEIVE
	BANKSEL	STK01
	MOVZ	R0, STK01
	BANKSEL	r0x1011
	MOV	r0x1011, R0
	BANKSEL	STK02
	MOVZ	R0, STK02
	BANKSEL	r0x1012
	MOV	r0x1012, R0
	BANKSEL	STK03
	MOVZ	R0, STK03
	BANKSEL	r0x1013
	MOV	r0x1013, R0
;	::->op : CALL
;	.line	360; "../KungFu8_I2C.c"	I2C_Idle();			// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : CALL
;	.line	362; "../KungFu8_I2C.c"	I2C_Start();
	TRAPPC1	_I2C_Start
	TRAPPC2	_I2C_Start
	PAGESEL	_I2C_Start
	CALL	_I2C_Start
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	365; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00170_DS_
;	::->op : SEND
;	::->op : CALL
;	.line	367; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_H | 0x00);  	if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	MOV	R0,# 0xf6
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00184_DS_
;	::->op : SEND
;	::->op : CALL
;	.line	368; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_L);  			if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	MOV	R0,# 0xa0
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00171_DS_
;	::->op : GOTO
	JMP	_00184_DS_
;	::->op : LABEL
;	::->op : SEND
;	::->op : CALL
_00170_DS_
;	.line	372; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_L | 0x00);  	if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	MOV	R0,# 0xa0
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00184_DS_
;	::->op : LABEL
;	::->op : SEND
;	::->op : CALL
_00171_DS_
;	.line	376; "../KungFu8_I2C.c"	I2C_SendData(cAddr);  					if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	BANKSEL	r0x100F
	MOVZ	R0, r0x100F
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00184_DS_
;	::->op : CALL
;	.line	379; "../KungFu8_I2C.c"	I2C_ReStart();
	TRAPPC1	_I2C_ReStart
	TRAPPC2	_I2C_ReStart
	PAGESEL	_I2C_ReStart
	CALL	_I2C_ReStart
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	382; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00179_DS_
;	::->op : SEND
;	::->op : CALL
;	.line	384; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_H | 0x01);		  if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	MOV	R0,# 0xf7
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00199_DS_
;	::->op : GOTO
	JMP	_00184_DS_
;	::->op : LABEL
;	::->op : SEND
;	::->op : CALL
_00179_DS_
;	.line	389; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_L | 0x01);		  if(SSCI1ACKSTA) goto read_p_end_I2C_Read_Data;
	MOV	R0,# 0xa1
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00184_DS_
;	::->op : LABEL
;	::->op : =
_00199_DS_
;	.line	393; "../KungFu8_I2C.c"	for(i=0;i<Length;i++)
	BANKSEL	r0x100F
	CLR	r0x100F
;	::->op : LABEL
;	::->op : <
_00185_DS_
	BANKSEL	r0x1010
	MOVZ	R0, r0x1010
	BANKSEL	r0x100F
	SUB	R0, r0x100F
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00188_DS_
;	::->op : +
;	.line	395; "../KungFu8_I2C.c"	TempAddressPoint[i]=I2C_ReceiveData();
	BANKSEL	r0x1013
	MOV	R0, r0x1013
	BANKSEL	r0x100F
	ADD	R0, r0x100F
	BANKSEL	r0x1014
	MOV	r0x1014, R0
	BANKSEL	r0x1012
	MOVZ	R0, r0x1012
	JNB	PSW, 0
	ADD	R0,# 0x01
	BANKSEL	r0x1015
	MOV	r0x1015, R0
	BANKSEL	r0x1011
	MOVZ	R0, r0x1011
	JNB	PSW, 0
	ADD	R0,# 0x01
	BANKSEL	r0x1016
	MOV	r0x1016, R0
;	::->op : CALL
	TRAPPC1	_I2C_ReceiveData
	TRAPPC2	_I2C_ReceiveData
	PAGESEL	_I2C_ReceiveData
	CALL	_I2C_ReceiveData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
	BANKSEL	r0x1017
	MOV	r0x1017, R0
;	::->op :*  =
	BANKSEL	r0x1017
	MOVZ	R0, r0x1017
	BANKSEL	STK02
	MOV	STK02, R0
	BANKSEL	r0x1014
	MOVZ	R0, r0x1014
	BANKSEL	STK01
	MOV	STK01, R0
	BANKSEL	r0x1015
	MOVZ	R0, r0x1015
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	r0x1016
	MOVZ	R0, r0x1016
	TRAPPC1	__gptrput1
	TRAPPC2	__gptrput1
	PAGESEL	__gptrput1
	CALL	__gptrput1
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : CAST
;	.line	397; "../KungFu8_I2C.c"	if(i==(Length-1))
	BANKSEL	r0x1010
	MOVZ	R0, r0x1010
	BANKSEL	r0x1014
	MOV	r0x1014, R0
	BANKSEL	r0x1015
	CLR	r0x1015
;	::->op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1014
	ADD	r0x1014, R0
	JNB	PSW, 0
	JMP	_00210_DS_
	BANKSEL	r0x1015
	DEC	r0x1015
;	::->op : CAST
_00210_DS_
	BANKSEL	r0x100F
	MOVZ	R0, r0x100F
	BANKSEL	r0x1016
	MOV	r0x1016, R0
	BANKSEL	r0x1017
	CLR	r0x1017
;	::->op : EQ_OP
	BANKSEL	r0x1014
	MOVZ	R0, r0x1014
	BANKSEL	r0x1016
	XOR	R0, r0x1016
	JB	PSW, 2
	JMP	_00182_DS_
	BANKSEL	r0x1015
	MOVZ	R0, r0x1015
	BANKSEL	r0x1017
	XOR	R0, r0x1017
	JB	PSW, 2
	JMP	_00182_DS_
;	::->op :*  =
;	.line	399; "../KungFu8_I2C.c"	SSCI1ACKDAT=1;  // 不应答  ，最后1次必须不应答，否则停止产生会错误，后续不能i2c正常工作
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 5
;	::->op : GOTO
	JMP	_00183_DS_
;	::->op : LABEL
;	::->op :*  =
_00182_DS_
;	.line	403; "../KungFu8_I2C.c"	SSCI1ACKDAT=0;  // 应答
	BANKSEL	_SSCI1CTL2_bits
	CLR	_SSCI1CTL2_bits, 5
;	::->op : LABEL
;	::->op : CALL
_00183_DS_
;	.line	405; "../KungFu8_I2C.c"	I2C_RSendXAck();
	TRAPPC1	_I2C_RSendXAck
	TRAPPC2	_I2C_RSendXAck
	PAGESEL	_I2C_RSendXAck
	CALL	_I2C_RSendXAck
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : +
;	.line	393; "../KungFu8_I2C.c"	for(i=0;i<Length;i++)
	BANKSEL	r0x100F
	INC	r0x100F
;	::->op : GOTO
	JMP	_00185_DS_
;	::->op : LABEL
;	::->op : CALL
_00188_DS_
;	.line	408; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	409; "../KungFu8_I2C.c"	return (0);
	MOV	R0,# 0x00
	JMP	_00189_DS_
;	::->op : LABEL
;	::->op : CALL
_00184_DS_
;	.line	411; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	412; "../KungFu8_I2C.c"	return (1);
	MOV	R0,# 0x01
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00189_DS_
	CRET	
; exit point of _I2C_Read_Data



func._I2C_Read_s_Data	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Read_s_Data	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReStart
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReceiveData
;   _I2C_RSendXAck
;   _I2C_Stop
;   _I2C_Stop
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReStart
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_ReceiveData
;   _I2C_RSendXAck
;   _I2C_Stop
;   _I2C_Stop
;5 compiler assigned registers:
;   r0x1018
;   r0x1019
;   r0x101A
;   r0x101B
;   r0x101C
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Read_s_Data	;Function start
; 2 exit points
;	::->op : CALL
;	.line	293; "../KungFu8_I2C.c"	I2C_Idle();				// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : CALL
;	.line	295; "../KungFu8_I2C.c"	I2C_Start();
	TRAPPC1	_I2C_Start
	TRAPPC2	_I2C_Start
	PAGESEL	_I2C_Start
	CALL	_I2C_Start
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	298; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00131_DS_
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	300; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrH);  if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 1)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00145_DS_
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	301; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrL);  if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 0)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00132_DS_
;	::->op : GOTO
	JMP	_00145_DS_
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00131_DS_
;	.line	305; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrL);  if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 0)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00145_DS_
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00132_DS_
;	.line	309; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.Command );  		if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 4)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00145_DS_
;	::->op : CALL
;	.line	312; "../KungFu8_I2C.c"	I2C_ReStart();
	TRAPPC1	_I2C_ReStart
	TRAPPC2	_I2C_ReStart
	PAGESEL	_I2C_ReStart
	CALL	_I2C_ReStart
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	315; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00140_DS_
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	317; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrH|0x01);  if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 1)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : |
	BANKSEL	r0x1018
	SET	r0x1018, 0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00160_DS_
;	::->op : GOTO
	JMP	_00145_DS_
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00140_DS_
;	.line	322; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrL|0x01);  if(SSCI1ACKSTA)  goto read_s_end_I2C_Read_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 0)
	BANKSEL	r0x1018
	MOV	r0x1018, R0
;	::->op : |
	BANKSEL	r0x1018
	SET	r0x1018, 0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00145_DS_
;	::->op : LABEL
;	::->op : =
_00160_DS_
;	.line	326; "../KungFu8_I2C.c"	for(i=0;i<SSCII2C_DateStruct.length;i++)
	BANKSEL	r0x1018
	CLR	r0x1018
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00146_DS_
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 3)
	BANKSEL	r0x1019
	MOV	r0x1019, R0
;	::->op : <
	BANKSEL	r0x1019
	MOVZ	R0, r0x1019
	BANKSEL	r0x1018
	SUB	R0, r0x1018
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00149_DS_
;	::->op : +
;	.line	328; "../KungFu8_I2C.c"	SSCII2C_DateStruct.buffer[i]=I2C_ReceiveData();     //ReceiveData()返回SSCIBUFR内容
	BANKSEL	r0x1018
	MOV	R0, r0x1018
	ADD	R0,# (_SSCII2C_DateStruct + 5)
	BANKSEL	r0x1019
	MOV	r0x1019, R0
;	::->op : CALL
	TRAPPC1	_I2C_ReceiveData
	TRAPPC2	_I2C_ReceiveData
	PAGESEL	_I2C_ReceiveData
	CALL	_I2C_ReceiveData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
	BANKSEL	r0x101A
	MOV	r0x101A, R0
;	::->op :*  =
	BANKSEL	r0x101A
	MOVZ	R0, r0x101A
	BANKSEL	r0x1019
	MOV	R1, r0x1019
	BANKSEL	_SSCII2C_DateStruct
	ST	[R1], R0
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	331; "../KungFu8_I2C.c"	if(i==(SSCII2C_DateStruct.length-1))
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 3)
	BANKSEL	r0x1019
	MOV	r0x1019, R0
	BANKSEL	r0x101B
	MOV	r0x101B, R0
;	::->op : CAST
;;99	MOVZ	R0, r0x1019
	BANKSEL	r0x101A
	CLR	r0x101A
;	::->op : -
	MOV	R0,# 0xff
	BANKSEL	r0x101B
	ADD	R0, r0x101B
	BANKSEL	r0x1019
	MOV	r0x1019, R0
	MOV	R0,# 0xff
	BANKSEL	r0x101C
	MOV	r0x101C, R0
	MOV	R0,# 0x00
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00211_DS_
	BANKSEL	r0x101C
	ADD	r0x101C, R0
;	::->op : CAST
_00211_DS_
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	BANKSEL	r0x101B
	MOV	r0x101B, R0
	BANKSEL	r0x101A
	CLR	r0x101A
;	::->op : EQ_OP
	BANKSEL	r0x1019
	MOVZ	R0, r0x1019
	BANKSEL	r0x101B
	XOR	R0, r0x101B
	JB	PSW, 2
	JMP	_00143_DS_
	BANKSEL	r0x101C
	MOVZ	R0, r0x101C
	BANKSEL	r0x101A
	XOR	R0, r0x101A
	JB	PSW, 2
	JMP	_00143_DS_
;	::->op :*  =
;	.line	333; "../KungFu8_I2C.c"	SSCI1ACKDAT=1;  // 不应答  ，最后1次必须不应答，否则停止会产生错误，后续i2c不能正常工作
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 5
;	::->op : GOTO
	JMP	_00144_DS_
;	::->op : LABEL
;	::->op :*  =
_00143_DS_
;	.line	337; "../KungFu8_I2C.c"	SSCI1ACKDAT=0;  // 应答
	BANKSEL	_SSCI1CTL2_bits
	CLR	_SSCI1CTL2_bits, 5
;	::->op : LABEL
;	::->op : CALL
_00144_DS_
;	.line	339; "../KungFu8_I2C.c"	I2C_RSendXAck();
	TRAPPC1	_I2C_RSendXAck
	TRAPPC2	_I2C_RSendXAck
	PAGESEL	_I2C_RSendXAck
	CALL	_I2C_RSendXAck
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : +
;	.line	326; "../KungFu8_I2C.c"	for(i=0;i<SSCII2C_DateStruct.length;i++)
	BANKSEL	r0x1018
	INC	r0x1018
;	::->op : GOTO
	JMP	_00146_DS_
;	::->op : LABEL
;	::->op : CALL
_00149_DS_
;	.line	342; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	343; "../KungFu8_I2C.c"	return (0);
	MOV	R0,# 0x00
	JMP	_00150_DS_
;	::->op : LABEL
;	::->op : CALL
_00145_DS_
;	.line	345; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	346; "../KungFu8_I2C.c"	return (1);
	MOV	R0,# 0x01
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00150_DS_
	CRET	
; exit point of _I2C_Read_s_Data



func._I2C_Write_Data	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Write_Data	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   __gptrget1
;   _I2C_SendData
;   _I2C_Stop
;   _I2C_Stop
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   __gptrget1
;   _I2C_SendData
;   _I2C_Stop
;   _I2C_Stop
;13 compiler assigned registers:
;   r0x101D
;   STK00
;   r0x101E
;   STK01
;   r0x101F
;   STK02
;   r0x1020
;   STK03
;   r0x1021
;   r0x1022
;   r0x1023
;   r0x1024
;   r0x1025
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Write_Data	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	247; "../KungFu8_I2C.c"	uint8  I2C_Write_Data(uint8 cAddr,uint8 Length,uint8 * DataAddressPoint)
	BANKSEL	r0x101D
	MOV	r0x101D, R0
;	::->op : RECEIVE
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x101E
	MOV	r0x101E, R0
;	::->op : RECEIVE
	BANKSEL	STK01
	MOVZ	R0, STK01
	BANKSEL	r0x101F
	MOV	r0x101F, R0
	BANKSEL	STK02
	MOVZ	R0, STK02
	BANKSEL	r0x1020
	MOV	r0x1020, R0
	BANKSEL	STK03
	MOVZ	R0, STK03
	BANKSEL	r0x1021
	MOV	r0x1021, R0
;	::->op : CALL
;	.line	251; "../KungFu8_I2C.c"	I2C_Idle();				// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : CALL
;	.line	254; "../KungFu8_I2C.c"	I2C_Start();
	TRAPPC1	_I2C_Start
	TRAPPC2	_I2C_Start
	PAGESEL	_I2C_Start
	CALL	_I2C_Start
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	257; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00103_DS_
;	::->op : SEND
;	::->op : CALL
;	.line	259; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_H | 0x00);  	if(SSCI1ACKSTA) goto write_p_end_I2C_Write_Data;
	MOV	R0,# 0xf6
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00109_DS_
;	::->op : SEND
;	::->op : CALL
;	.line	260; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_L);		  	if(SSCI1ACKSTA) goto write_p_end_I2C_Write_Data;
	MOV	R0,# 0xa0
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00104_DS_
;	::->op : GOTO
	JMP	_00109_DS_
;	::->op : LABEL
;	::->op : SEND
;	::->op : CALL
_00103_DS_
;	.line	264; "../KungFu8_I2C.c"	I2C_SendData(I2C_Add_L | 0x00);		 if(SSCI1ACKSTA) goto write_p_end_I2C_Write_Data;
	MOV	R0,# 0xa0
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00109_DS_
;	::->op : LABEL
;	::->op : SEND
;	::->op : CALL
_00104_DS_
;	.line	268; "../KungFu8_I2C.c"	I2C_SendData(cAddr );					  if(SSCI1ACKSTA) goto write_p_end_I2C_Write_Data;
	BANKSEL	r0x101D
	MOVZ	R0, r0x101D
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00109_DS_
;	::->op : =
;	.line	271; "../KungFu8_I2C.c"	for(i=0;i<Length;i++)
	BANKSEL	r0x101D
	CLR	r0x101D
;	::->op : LABEL
;	::->op : <
_00110_DS_
	BANKSEL	r0x101E
	MOVZ	R0, r0x101E
	BANKSEL	r0x101D
	SUB	R0, r0x101D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00113_DS_
;	::->op : +
;	.line	273; "../KungFu8_I2C.c"	I2C_SendData(*(DataAddressPoint+i));	  if(SSCI1ACKSTA) goto write_p_end_I2C_Write_Data;
	BANKSEL	r0x1021
	MOV	R0, r0x1021
	BANKSEL	r0x101D
	ADD	R0, r0x101D
	BANKSEL	r0x1022
	MOV	r0x1022, R0
	BANKSEL	r0x1020
	MOVZ	R0, r0x1020
	JNB	PSW, 0
	ADD	R0,# 0x01
	BANKSEL	r0x1023
	MOV	r0x1023, R0
	BANKSEL	r0x101F
	MOVZ	R0, r0x101F
	JNB	PSW, 0
	ADD	R0,# 0x01
	BANKSEL	r0x1024
	MOV	r0x1024, R0
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1022
	MOVZ	R0, r0x1022
	BANKSEL	STK01
	MOV	STK01, R0
	BANKSEL	r0x1023
	MOVZ	R0, r0x1023
	BANKSEL	STK00
	MOV	STK00, R0
	BANKSEL	r0x1024
	MOVZ	R0, r0x1024
	TRAPPC1	__gptrget1
	TRAPPC2	__gptrget1
	PAGESEL	__gptrget1
	CALL	__gptrget1
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
	BANKSEL	r0x1025
	MOV	r0x1025, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1025
	MOVZ	R0, r0x1025
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00109_DS_
;	::->op : +
;	.line	271; "../KungFu8_I2C.c"	for(i=0;i<Length;i++)
	BANKSEL	r0x101D
	INC	r0x101D
;	::->op : GOTO
	JMP	_00110_DS_
;	::->op : LABEL
;	::->op : CALL
_00113_DS_
;	.line	276; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	277; "../KungFu8_I2C.c"	return (0);
	MOV	R0,# 0x00
	JMP	_00114_DS_
;	::->op : LABEL
;	::->op : CALL
_00109_DS_
;	.line	279; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	280; "../KungFu8_I2C.c"	return (1);
	MOV	R0,# 0x01
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00114_DS_
	CRET	
; exit point of _I2C_Write_Data



func._I2C_Write_s_Data	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Write_s_Data	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_Stop
;   _I2C_Stop
;   _I2C_Idle
;   _I2C_Start
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_SendData
;   _I2C_Stop
;   _I2C_Stop
;3 compiler assigned registers:
;   r0x1026
;   r0x1027
;   r0x1028
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Write_s_Data	;Function start
; 2 exit points
;	::->op : CALL
;	.line	210; "../KungFu8_I2C.c"	I2C_Idle();				// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : CALL
;	.line	212; "../KungFu8_I2C.c"	I2C_Start();
	TRAPPC1	_I2C_Start
	TRAPPC2	_I2C_Start
	PAGESEL	_I2C_Start
	CALL	_I2C_Start
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	215; "../KungFu8_I2C.c"	if(isSampleMode10bits)
	BANKSEL	(_SSCII2C_DateStruct+2)
	JB	(_SSCII2C_DateStruct+2), 0
	JMP	_00075_DS_
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	217; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrH);  if(SSCI1ACKSTA) goto write_s_end_I2C_Write_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 1)
	BANKSEL	r0x1026
	MOV	r0x1026, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1026
	MOVZ	R0, r0x1026
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00081_DS_
;	::->op : GET_VALUE_AT_ADDRESS
;	.line	218; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrL);  if(SSCI1ACKSTA) goto write_s_end_I2C_Write_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 0)
	BANKSEL	r0x1026
	MOV	r0x1026, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1026
	MOVZ	R0, r0x1026
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JB	_SSCI1CTL2_bits, 6
	JMP	_00076_DS_
;	::->op : GOTO
	JMP	_00081_DS_
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00075_DS_
;	.line	222; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.i2cDevAddrL);  if(SSCI1ACKSTA)  goto write_s_end_I2C_Write_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 0)
	BANKSEL	r0x1026
	MOV	r0x1026, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1026
	MOVZ	R0, r0x1026
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00081_DS_
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00076_DS_
;	.line	226; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.Command );  	   if(SSCI1ACKSTA)  goto write_s_end_I2C_Write_s_Data;
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 4)
	BANKSEL	r0x1026
	MOV	r0x1026, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1026
	MOVZ	R0, r0x1026
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00081_DS_
;	::->op : =
;	.line	229; "../KungFu8_I2C.c"	for(i=0;i<SSCII2C_DateStruct.length;i++)
	BANKSEL	r0x1026
	CLR	r0x1026
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00082_DS_
	BANKSEL	_SSCII2C_DateStruct
	MOVZ	R0,  (_SSCII2C_DateStruct + 3)
	BANKSEL	r0x1027
	MOV	r0x1027, R0
;	::->op : <
	BANKSEL	r0x1027
	MOVZ	R0, r0x1027
	BANKSEL	r0x1026
	SUB	R0, r0x1026
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00085_DS_
;	::->op : +
;	.line	231; "../KungFu8_I2C.c"	I2C_SendData(SSCII2C_DateStruct.buffer[i]);	   if(SSCI1ACKSTA)  goto write_s_end_I2C_Write_s_Data;
	BANKSEL	r0x1026
	MOV	R0, r0x1026
	ADD	R0,# (_SSCII2C_DateStruct + 5)
	BANKSEL	r0x1027
	MOV	r0x1027, R0
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1027
	MOV	R1, r0x1027
	BANKSEL	_SSCII2C_DateStruct
	LD	R0, [R1]
	BANKSEL	r0x1028
	MOV	r0x1028, R0
;	::->op : SEND
;	::->op : CALL
	BANKSEL	r0x1028
	MOVZ	R0, r0x1028
	TRAPPC1	_I2C_SendData
	TRAPPC2	_I2C_SendData
	PAGESEL	_I2C_SendData
	CALL	_I2C_SendData
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 6
	JMP	_00081_DS_
;	::->op : +
;	.line	229; "../KungFu8_I2C.c"	for(i=0;i<SSCII2C_DateStruct.length;i++)
	BANKSEL	r0x1026
	INC	r0x1026
;	::->op : GOTO
	JMP	_00082_DS_
;	::->op : LABEL
;	::->op : CALL
_00085_DS_
;	.line	234; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	235; "../KungFu8_I2C.c"	return (0);
	MOV	R0,# 0x00
	JMP	_00086_DS_
;	::->op : LABEL
;	::->op : CALL
_00081_DS_
;	.line	237; "../KungFu8_I2C.c"	I2C_Stop();
	TRAPPC1	_I2C_Stop
	TRAPPC2	_I2C_Stop
	PAGESEL	_I2C_Stop
	CALL	_I2C_Stop
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : RETURN
;	.line	238; "../KungFu8_I2C.c"	return (1);  //从机未应答，返回1
	MOV	R0,# 0x01
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00086_DS_
	CRET	
; exit point of _I2C_Write_s_Data



func._I2C_ReceiveData	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_ReceiveData	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_ReceiveData	;Function start
; 2 exit points
;	::->op :*  =
;	.line	189; "../KungFu8_I2C.c"	SSCI1OV=0;
	BANKSEL	_SSCI1CTL0_bits
	CLR	_SSCI1CTL0_bits, 6
;	::->op :*  =
;	.line	191; "../KungFu8_I2C.c"	SSCI1RCEN=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 3
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00061_DS_
;	.line	193; "../KungFu8_I2C.c"	while(!SSCI1IF);
	BANKSEL	_EIF2_bits
	JB	_EIF2_bits, 3
	JMP	_00061_DS_
;	::->op :*  =
;	.line	194; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : RETURN
;	.line	196; "../KungFu8_I2C.c"	return SSCI1BUFR;
	BANKSEL	_SSCI1BUFR
	MOVZ	R0, _SSCI1BUFR
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_ReceiveData



func._I2C_SendData	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_SendData	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_SendData	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	147; "../KungFu8_I2C.c"	void I2C_SendData(uint8 sData)
	BANKSEL	_SSCI1BUFR
	MOV	_SSCI1BUFR, R0
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00054_DS_
;	.line	175; "../KungFu8_I2C.c"	while (!SSCI1IF);
	BANKSEL	_EIF2_bits
	JB	_EIF2_bits, 3
	JMP	_00054_DS_
;	::->op :*  =
;	.line	176; "../KungFu8_I2C.c"	SSCI1WCFL=0;	  // 主机避免写冲突，软件直接清零
	BANKSEL	_SSCI1CTL0_bits
	CLR	_SSCI1CTL0_bits, 7
;	::->op :*  =
;	.line	177; "../KungFu8_I2C.c"	SSCI1IF=0;		  // 主机一般不开启中断
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_SendData



func._I2C_SendNAck	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_SendNAck	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_SendNAck	;Function start
; 2 exit points
;	::->op :*  =
;	.line	132; "../KungFu8_I2C.c"	SSCI1ACKDAT=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 5
;	::->op :*  =
;	.line	134; "../KungFu8_I2C.c"	SSCI1ACKEN=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 4
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00047_DS_
;	.line	136; "../KungFu8_I2C.c"	while(SSCI1ACKEN);
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 4
	JMP	_00047_DS_
;	::->op :*  =
;	.line	138; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_SendNAck



func._I2C_SendAck	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_SendAck	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_SendAck	;Function start
; 2 exit points
;	::->op :*  =
;	.line	120; "../KungFu8_I2C.c"	SSCI1ACKDAT=0;
	BANKSEL	_SSCI1CTL2_bits
	CLR	_SSCI1CTL2_bits, 5
;	::->op :*  =
;	.line	122; "../KungFu8_I2C.c"	SSCI1ACKEN=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 4
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00040_DS_
;	.line	124; "../KungFu8_I2C.c"	while(SSCI1ACKEN);
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 4
	JMP	_00040_DS_
;	::->op :*  =
;	.line	126; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_SendAck



func._I2C_RSendXAck	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_RSendXAck	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_RSendXAck	;Function start
; 2 exit points
;	::->op :*  =
;	.line	110; "../KungFu8_I2C.c"	SSCI1ACKEN=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 4
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00033_DS_
;	.line	112; "../KungFu8_I2C.c"	while(SSCI1ACKEN);
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 4
	JMP	_00033_DS_
;	::->op :*  =
;	.line	114; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_RSendXAck



func._I2C_Stop	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Stop	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _Delay_Wait_CLK_Sample
;   _I2C_Idle
;   _Delay_Wait_CLK_Sample
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Stop	;Function start
; 2 exit points
;	::->op : CALL
;	.line	89; "../KungFu8_I2C.c"	I2C_Idle();				// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	90; "../KungFu8_I2C.c"	STOPEN1=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 2
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00026_DS_
;	.line	91; "../KungFu8_I2C.c"	while(STOPEN1);
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 2
	JMP	_00026_DS_
;	::->op :*  =
;	.line	92; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : SEND
;	::->op : CALL
;	.line	93; "../KungFu8_I2C.c"	I2C_Delayus(10);  		// 给予使用停止中断的响应时间，根据从机响应速度
	MOV	R0,# 0x0a
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_Stop



func._I2C_ReStart	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_ReStart	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _I2C_Idle
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_ReStart	;Function start
; 2 exit points
;	::->op : CALL
;	.line	75; "../KungFu8_I2C.c"	I2C_Idle();     //等待空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	76; "../KungFu8_I2C.c"	RESTARTEN1=1;
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 1
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00019_DS_
;	.line	77; "../KungFu8_I2C.c"	while(RESTARTEN1);
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 1
	JMP	_00019_DS_
;	::->op :*  =
;	.line	78; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_ReStart



func._I2C_Start	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Start	;Function start
; 2 exit points
;has an exit
;functions called:
;   _I2C_Idle
;   _Delay_Wait_CLK_Sample
;   _I2C_Idle
;   _Delay_Wait_CLK_Sample
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Start	;Function start
; 2 exit points
;	::->op : CALL
;	.line	60; "../KungFu8_I2C.c"	I2C_Idle();				// 等待I2C空闲
	TRAPPC1	_I2C_Idle
	TRAPPC2	_I2C_Idle
	PAGESEL	_I2C_Idle
	CALL	_I2C_Idle
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op :*  =
;	.line	61; "../KungFu8_I2C.c"	STARTEN1=1; 				// 发送起始，I2C主控模式
	BANKSEL	_SSCI1CTL2_bits
	SET	_SSCI1CTL2_bits, 0
;	::->op : LABEL
;	::->op : GET_VALUE_AT_ADDRESS
_00012_DS_
;	.line	62; "../KungFu8_I2C.c"	while(STARTEN1); 		// 等待起始完成
	BANKSEL	_SSCI1CTL2_bits
	JNB	_SSCI1CTL2_bits, 0
	JMP	_00012_DS_
;	::->op :*  =
;	.line	63; "../KungFu8_I2C.c"	SSCI1IF=0;  				// 清除起始完成的标记
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op : SEND
;	::->op : CALL
;	.line	64; "../KungFu8_I2C.c"	I2C_Delayus(10);  		// 给予使用启动中断的响应时间，根据从机响应速度
	MOV	R0,# 0x0a
	TRAPPC1	_Delay_Wait_CLK_Sample
	TRAPPC2	_Delay_Wait_CLK_Sample
	PAGESEL	_Delay_Wait_CLK_Sample
	CALL	_Delay_Wait_CLK_Sample
	TRAPPC1	$+2
	TRAPPC2	$+1
	PAGESEL	$
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_Start



func._I2C_Idle	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _I2C_Idle	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_I2C_Idle	;Function start
; 2 exit points
;	::->op : LABEL
;	::->op : BITWISEAND
_00002_DS_
;	.line	47; "../KungFu8_I2C.c"	while(  SSCI1CTL2&0x1F || SSCI1RW );
	BANKSEL	_SSCI1CTL2
	MOVZ	R0, _SSCI1CTL2
	AND	R0,# 0x1f
	JB	PSW, 2
	JMP	_00002_DS_
;	::->op : GET_VALUE_AT_ADDRESS
	BANKSEL	_SSCI1STA_bits
	JNB	_SSCI1STA_bits, 2
	JMP	_00002_DS_
;	::->op :*  =
;	.line	48; "../KungFu8_I2C.c"	SSCI1IF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 3
;	::->op :*  =
;	.line	49; "../KungFu8_I2C.c"	BCL1IF=0;      //总线冲突中断清零
	BANKSEL	_EIF4_bits
	CLR	_EIF4_bits, 0
;	::->op : LABEL
;	::->op : ENDFUNCTION
	CRET	
; exit point of _I2C_Idle


;	code size estimation:
;	  777+  251 =  1028 instructions ( 2558 byte)


	.end
