; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\sc32f1xxx_cmp.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\sc32f1xxx_cmp.d --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -IF:\Users\SOC\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\Device\ARM\ARMCM0plus\Include -D__UVISION_VERSION=536 -DARMCM0P -DSC32f10xx --omf_browse=..\output\sc32f1xxx_cmp.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_cmp.c]
                          THUMB

                          AREA ||i.CMP_ClearFlag||, CODE, READONLY, ALIGN=1

                  CMP_ClearFlag PROC
;;;414     */
;;;415    void CMP_ClearFlag ( CMP_TypeDef* CMPx, CMP_FLAG_TypeDef CMP_FLAG )
000000  6001              STR      r1,[r0,#0]
;;;416    {
;;;417    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;418        /* Check the parameters */
;;;419        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;420    
;;;421        /* Clear the flags */
;;;422        CMPx->CMP_STS = ( uint16_t ) CMP_FLAG;
;;;423    
;;;424    #endif	
;;;425    }
000002  4770              BX       lr
;;;426    
                          ENDP


                          AREA ||i.CMP_Cmd||, CODE, READONLY, ALIGN=2

                  CMP_Cmd PROC
;;;140     */
;;;141    void CMP_Cmd ( CMP_TypeDef* CMPx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;142    {
;;;143    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;144        /* Check the parameters */
;;;145        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;146        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;147    
;;;148        if ( NewState != DISABLE )
;;;149        {
;;;150            /* Enable the CMP Function */
;;;151            CMPx->CMP_CFG |= CMP_CFG_CMPEN;
;;;152        }
;;;153        else
;;;154        {
;;;155            /* Disable the CMP Function */
;;;156            CMPx->CMP_CFG &= ( uint16_t ) ~CMP_CFG_CMPEN;
000002  6841              LDR      r1,[r0,#4]
000004  d002              BEQ      |L2.12|
000006  2280              MOVS     r2,#0x80              ;151
000008  4311              ORRS     r1,r1,r2              ;151
00000a  e001              B        |L2.16|
                  |L2.12|
00000c  4a01              LDR      r2,|L2.20|
00000e  4011              ANDS     r1,r1,r2
                  |L2.16|
000010  6041              STR      r1,[r0,#4]            ;151
;;;157        }
;;;158    
;;;159    #endif	
;;;160    }
000012  4770              BX       lr
;;;161    /**
                          ENDP

                  |L2.20|
                          DCD      0x0000ff7f

                          AREA ||i.CMP_DeInit||, CODE, READONLY, ALIGN=2

                  CMP_DeInit PROC
;;;53      */
;;;54     void CMP_DeInit ( CMP_TypeDef* CMPx )
000000  4903              LDR      r1,|L3.16|
;;;55     {
;;;56     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;57         /* Check the parameters */
;;;58         assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;59     
;;;60         if ( CMPx == CMP )
000002  4288              CMP      r0,r1
000004  d103              BNE      |L3.14|
;;;61         {
;;;62             /* Enable CMP0 reset state */
;;;63             CMPx->CMP_CFG = 0x0000;
000006  2100              MOVS     r1,#0
000008  6041              STR      r1,[r0,#4]
;;;64             CMPx->CMP_STS = 0xFFFF;
00000a  4902              LDR      r1,|L3.20|
00000c  6001              STR      r1,[r0,#0]
                  |L3.14|
;;;65         }
;;;66     
;;;67     #endif		
;;;68     }
00000e  4770              BX       lr
;;;69     
                          ENDP

                  |L3.16|
                          DCD      0x40022130
                  |L3.20|
                          DCD      0x0000ffff

                          AREA ||i.CMP_GetCMPSTA||, CODE, READONLY, ALIGN=1

                  CMP_GetCMPSTA PROC
;;;347     */
;;;348    CMP_CMPSTA_TypeDef CMP_GetCMPSTA ( CMP_TypeDef* CMPx )
000000  4601              MOV      r1,r0
;;;349    {
;;;350    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;351        CMP_CMPSTA_TypeDef CMP_CMPSTA = CMP_CMPSTA_Low;
;;;352        /* Check the parameters */
;;;353        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;354    
;;;355        if ( ( CMPx->CMP_STS & CMP_STS_CMPSTA ) != 0 )
000002  6809              LDR      r1,[r1,#0]
000004  2000              MOVS     r0,#0                 ;351
000006  0789              LSLS     r1,r1,#30
000008  d500              BPL      |L4.12|
;;;356        {
;;;357            CMP_CMPSTA = CMP_CMPSTA_High;
00000a  2002              MOVS     r0,#2
                  |L4.12|
;;;358        }
;;;359        else
;;;360        {
;;;361            CMP_CMPSTA = CMP_CMPSTA_Low;
;;;362        }
;;;363    
;;;364        return CMP_CMPSTA;
;;;365    
;;;366    #endif	
;;;367    }
00000c  4770              BX       lr
;;;368    
                          ENDP


                          AREA ||i.CMP_GetFlagStatus||, CODE, READONLY, ALIGN=1

                  CMP_GetFlagStatus PROC
;;;382     */
;;;383    FlagStatus CMP_GetFlagStatus ( CMP_TypeDef* CMPx, CMP_FLAG_TypeDef CMP_FLAG )
000000  4602              MOV      r2,r0
;;;384    {
;;;385    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;386        ITStatus bitstatus = RESET;
;;;387        /* Check the parameters */
;;;388        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;389        assert_param ( IS_CMP_FLAG ( CMP_FLAG ) );
;;;390    
;;;391        if ( ( CMPx->CMP_STS & CMP_FLAG ) != ( uint16_t ) RESET )
000002  6812              LDR      r2,[r2,#0]
000004  2000              MOVS     r0,#0                 ;386
000006  420a              TST      r2,r1
000008  d000              BEQ      |L5.12|
;;;392        {
;;;393            bitstatus = SET;
00000a  2001              MOVS     r0,#1
                  |L5.12|
;;;394        }
;;;395        else
;;;396        {
;;;397            bitstatus = RESET;
;;;398        }
;;;399        return bitstatus;
;;;400    	
;;;401    #endif
;;;402    		
;;;403    }
00000c  4770              BX       lr
;;;404    
                          ENDP


                          AREA ||i.CMP_GetNegativeChannel||, CODE, READONLY, ALIGN=1

                  CMP_GetNegativeChannel PROC
;;;230     */
;;;231    CMP_Negative_TypeDef CMP_GetNegativeChannel ( CMP_TypeDef* CMPx )
000000  6840              LDR      r0,[r0,#4]
;;;232    {
;;;233    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;234        /* Check the parameters */
;;;235        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;236    
;;;237        /* Get the CMP negative input channel type */
;;;238        return ( CMP_Negative_TypeDef ) ( CMPx->CMP_CFG & CMP_CFG_CMPRF );
000002  210f              MOVS     r1,#0xf
000004  0209              LSLS     r1,r1,#8
000006  4008              ANDS     r0,r0,r1
;;;239    
;;;240    #endif	
;;;241    }
000008  4770              BX       lr
;;;242    
                          ENDP


                          AREA ||i.CMP_GetPositiveChannel||, CODE, READONLY, ALIGN=1

                  CMP_GetPositiveChannel PROC
;;;310     */
;;;311    CMP_Positive_TypeDef CMP_GetPositiveChannel ( CMP_TypeDef* CMPx )
000000  6840              LDR      r0,[r0,#4]
;;;312    {
;;;313    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;314        /* Check the parameters */
;;;315        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;316    
;;;317        /* Get the CMP positive input channel type */
;;;318        return ( CMP_Positive_TypeDef ) ( CMPx->CMP_CFG & ( CMP_CFG_CMPIS | CMP_CFG_CMPP ) );
000002  2113              MOVS     r1,#0x13
000004  4008              ANDS     r0,r0,r1
;;;319    
;;;320    #endif	
;;;321    	
;;;322    }
000006  4770              BX       lr
;;;323    
                          ENDP


                          AREA ||i.CMP_Init||, CODE, READONLY, ALIGN=2

                  CMP_Init PROC
;;;82      */
;;;83     void CMP_Init ( CMP_TypeDef* CMPx, CMP_InitTypeDef* CMP_InitStruct )
000000  b510              PUSH     {r4,lr}
;;;84     {
;;;85     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;86         uint32_t tmpreg;
;;;87         /* Check the parameters */
;;;88         assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;89         assert_param ( IS_CMP_Negative ( CMP_InitStruct->CMP_Negative ) );
;;;90         assert_param ( IS_CMP_Positive ( CMP_InitStruct->CMP_Positive ) );
;;;91         assert_param ( IS_CMP_TRIGGER ( CMP_InitStruct->CMP_TriggerMode ) );
;;;92     
;;;93         /*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;94         /* Get the CMPx CMP_CFG value */
;;;95         tmpreg = CMPx->CMP_CFG;
000002  6842              LDR      r2,[r0,#4]
;;;96         /* Clear CMPFS bits */
;;;97         tmpreg &= ( uint32_t ) ~ ( CMP_CFG_CMPIS | CMP_CFG_CMPP | CMP_CFG_CMPIM |
000004  4b04              LDR      r3,|L8.24|
;;;98                                    CMP_CFG_CMPRF ) ;
;;;99     
;;;100        /* Set CMPRF bits according to CMP_NEGATIVE value */
;;;101        /* Set CMPIS bits and CMPIP bit according to CMP_POSITIVE value */
;;;102        /* Set CMPIM bits according to CMP_TriggerMode value */
;;;103        tmpreg |= ( uint32_t ) ( CMP_InitStruct->CMP_Negative | CMP_InitStruct->CMP_Positive |
000006  884c              LDRH     r4,[r1,#2]
000008  401a              ANDS     r2,r2,r3              ;97
00000a  880b              LDRH     r3,[r1,#0]
00000c  8889              LDRH     r1,[r1,#4]
00000e  4323              ORRS     r3,r3,r4
000010  4311              ORRS     r1,r1,r2
000012  430b              ORRS     r3,r3,r1
;;;104                                 CMP_InitStruct->CMP_TriggerMode );
;;;105        /* Write to CMPx CMP_CFG */
;;;106        CMPx->CMP_CFG = tmpreg;
000014  6043              STR      r3,[r0,#4]
;;;107    
;;;108    #endif
;;;109    }
000016  bd10              POP      {r4,pc}
;;;110    
                          ENDP

                  |L8.24|
                          DCD      0xfffff08c

                          AREA ||i.CMP_SetNegativeChannel||, CODE, READONLY, ALIGN=1

                  CMP_SetNegativeChannel PROC
;;;189     */
;;;190    void CMP_SetNegativeChannel ( CMP_TypeDef* CMPx, CMP_Negative_TypeDef CMP_Negative_Channel )
000000  6842              LDR      r2,[r0,#4]
;;;191    {
;;;192    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;193        /* Check the parameters */
;;;194        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;195        assert_param ( IS_CMP_Negative ( CMP_Negative_Channel ) );
;;;196    
;;;197        CMPx->CMP_CFG &= ( uint32_t ) ~CMP_CFG_CMPRF;
000002  230f              MOVS     r3,#0xf
000004  021b              LSLS     r3,r3,#8
000006  439a              BICS     r2,r2,r3
000008  6042              STR      r2,[r0,#4]
;;;198        CMPx->CMP_CFG |= ( uint32_t ) CMP_Negative_Channel;
00000a  6842              LDR      r2,[r0,#4]
00000c  430a              ORRS     r2,r2,r1
00000e  6042              STR      r2,[r0,#4]
;;;199    
;;;200    #endif	
;;;201    }
000010  4770              BX       lr
;;;202    
                          ENDP


                          AREA ||i.CMP_SetPositiveChannel||, CODE, READONLY, ALIGN=1

                  CMP_SetPositiveChannel PROC
;;;270     */
;;;271    void CMP_SetPositiveChannel ( CMP_TypeDef* CMPx, CMP_Positive_TypeDef CMP_Positive_Channel )
000000  6842              LDR      r2,[r0,#4]
;;;272    {
;;;273    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;274        /* Check the parameters */
;;;275        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;276        assert_param ( IS_CMP_Positive ( CMP_Positive_Channel ) );
;;;277    
;;;278        CMPx->CMP_CFG &= ( uint32_t ) ~ ( CMP_CFG_CMPIS | CMP_CFG_CMPP );
000002  2313              MOVS     r3,#0x13
000004  439a              BICS     r2,r2,r3
000006  6042              STR      r2,[r0,#4]
;;;279        CMPx->CMP_CFG |= ( uint32_t ) CMP_Positive_Channel;
000008  6842              LDR      r2,[r0,#4]
00000a  430a              ORRS     r2,r2,r1
00000c  6042              STR      r2,[r0,#4]
;;;280    
;;;281    #endif	
;;;282    }
00000e  4770              BX       lr
;;;283    
                          ENDP


                          AREA ||i.CMP_StructInit||, CODE, READONLY, ALIGN=1

                  CMP_StructInit PROC
;;;115      */
;;;116    void CMP_StructInit ( CMP_InitTypeDef* CMP_InitStruct )
000000  2100              MOVS     r1,#0
;;;117    {
;;;118    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;119        /* Set the default configuration */
;;;120        CMP_InitStruct->CMP_Negative = CMP_Negative_CMPR;
000002  8001              STRH     r1,[r0,#0]
;;;121        CMP_InitStruct->CMP_Positive = CMP_Positive_CMP0;
000004  8041              STRH     r1,[r0,#2]
;;;122        CMP_InitStruct->CMP_TriggerMode = CMP_TriggerMode_Disable;
000006  8081              STRH     r1,[r0,#4]
;;;123    #endif
;;;124    }
000008  4770              BX       lr
;;;125    
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\FWLib\\SC32F1XXX_Lib\\src\\sc32f1xxx_cmp.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___15_sc32f1xxx_cmp_c_bb787e0c____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___15_sc32f1xxx_cmp_c_bb787e0c____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___15_sc32f1xxx_cmp_c_bb787e0c____REVSH|
#line 478
|__asm___15_sc32f1xxx_cmp_c_bb787e0c____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
