; 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 -O0 --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 -DSC32f15xx --omf_browse=..\output\sc32f1xxx_cmp.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_cmp.c]
                          THUMB

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

                  CMP_ClearFlag PROC
;;;941     */
;;;942    void CMP_ClearFlag ( CMP_TypeDef* CMPx, CMP_FLAG_TypeDef CMP_FLAG )
000000  4a09              LDR      r2,|L1.40|
;;;943    {
;;;944    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;945        /* Check the parameters */
;;;946        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;947    
;;;948        /* Clear the flags */
;;;949        CMPx->CMP_STS = ( uint16_t ) CMP_FLAG;
;;;950    #elif defined(SC32f15xx)
;;;951      /* Check the parameters */
;;;952      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;953    	if(CMPx == CMP_0 || CMPx == CMP_1 || CMPx == CMP_2)
000002  4290              CMP      r0,r2
000004  d005              BEQ      |L1.18|
000006  1c52              ADDS     r2,r2,#1
000008  4290              CMP      r0,r2
00000a  d002              BEQ      |L1.18|
00000c  1c52              ADDS     r2,r2,#1
00000e  4290              CMP      r0,r2
000010  d102              BNE      |L1.24|
                  |L1.18|
;;;954    	{
;;;955        /* Clear the flags */
;;;956        CMP->CMP_STS = (uint16_t)CMP_FLAG;		
000012  4a05              LDR      r2,|L1.40|
000014  3a10              SUBS     r2,r2,#0x10
000016  6111              STR      r1,[r2,#0x10]
                  |L1.24|
;;;957    	}
;;;958    	if(CMPx == CMP3)
000018  4a03              LDR      r2,|L1.40|
00001a  3220              ADDS     r2,r2,#0x20
00001c  4290              CMP      r0,r2
00001e  d102              BNE      |L1.38|
;;;959    	{
;;;960        /* Clear the flags */
;;;961        CMP3->CMP_STS = (uint16_t)CMP_FLAG;
000020  4a01              LDR      r2,|L1.40|
000022  3a10              SUBS     r2,r2,#0x10
000024  6311              STR      r1,[r2,#0x30]
                  |L1.38|
;;;962    	}
;;;963    #endif	
;;;964    }
000026  4770              BX       lr
;;;965    
                          ENDP

                  |L1.40|
                          DCD      0x40022150

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

                  CMP_Cmd PROC
;;;313     */
;;;314    void CMP_Cmd ( CMP_TypeDef* CMPx, FunctionalState NewState )
000000  4a2d              LDR      r2,|L2.184|
;;;315    {
;;;316    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;317        /* Check the parameters */
;;;318        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;319        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;320    
;;;321        if ( NewState != SC_DISABLE )
;;;322        {
;;;323            /* Enable the CMP Function */
;;;324            CMPx->CMP_CFG |= CMP_CFG_CMPEN;
;;;325        }
;;;326        else
;;;327        {
;;;328            /* Disable the CMP Function */
;;;329            CMPx->CMP_CFG &= ( uint16_t ) ~CMP_CFG_CMPEN;
;;;330        }
;;;331    #elif  defined(SC32f15xx)
;;;332        /* Check the parameters */
;;;333        assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;334        assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;335    
;;;336    	 if(CMPx==CMP_0)
000002  4290              CMP      r0,r2
000004  d112              BNE      |L2.44|
;;;337    		{
;;;338    			if(NewState != SC_DISABLE)
000006  2900              CMP      r1,#0
000008  d008              BEQ      |L2.28|
;;;339    			{
;;;340    					/* Enable the CMP Function */
;;;341    				 CMP->CMP_CFG |= (uint16_t)CMPX_CFG_CMPEN;
00000a  4a2b              LDR      r2,|L2.184|
00000c  3a10              SUBS     r2,r2,#0x10
00000e  69d2              LDR      r2,[r2,#0x1c]
000010  2380              MOVS     r3,#0x80
000012  431a              ORRS     r2,r2,r3
000014  4b28              LDR      r3,|L2.184|
000016  3b10              SUBS     r3,r3,#0x10
000018  61da              STR      r2,[r3,#0x1c]
00001a  e007              B        |L2.44|
                  |L2.28|
;;;342    			}
;;;343    			else
;;;344    			{
;;;345    					/* Disable the CMP Function */
;;;346    				 CMP->CMP_CFG &= (uint16_t)~CMPX_CFG_CMPEN;
00001c  4a26              LDR      r2,|L2.184|
00001e  3a10              SUBS     r2,r2,#0x10
000020  69d2              LDR      r2,[r2,#0x1c]
000022  4b26              LDR      r3,|L2.188|
000024  401a              ANDS     r2,r2,r3
000026  4b24              LDR      r3,|L2.184|
000028  3b10              SUBS     r3,r3,#0x10
00002a  61da              STR      r2,[r3,#0x1c]
                  |L2.44|
;;;347    			}
;;;348     	  }
;;;349    		 if(CMPx==CMP_1)
00002c  4a22              LDR      r2,|L2.184|
00002e  1c52              ADDS     r2,r2,#1
000030  4290              CMP      r0,r2
000032  d112              BNE      |L2.90|
;;;350    		{
;;;351    			if(NewState != SC_DISABLE)
000034  2900              CMP      r1,#0
000036  d008              BEQ      |L2.74|
;;;352         {
;;;353            /* Enable the CMP Function */
;;;354           CMP->CMP_CFG1 |= (uint16_t)CMPX_CFG_CMPEN;
000038  4a1f              LDR      r2,|L2.184|
00003a  3a10              SUBS     r2,r2,#0x10
00003c  6a12              LDR      r2,[r2,#0x20]
00003e  2380              MOVS     r3,#0x80
000040  431a              ORRS     r2,r2,r3
000042  4b1d              LDR      r3,|L2.184|
000044  3b10              SUBS     r3,r3,#0x10
000046  621a              STR      r2,[r3,#0x20]
000048  e007              B        |L2.90|
                  |L2.74|
;;;355         }
;;;356         else
;;;357         {
;;;358            /* Disable the CMP Function */
;;;359           CMP->CMP_CFG1 &= (uint16_t)~CMPX_CFG_CMPEN;
00004a  4a1b              LDR      r2,|L2.184|
00004c  3a10              SUBS     r2,r2,#0x10
00004e  6a12              LDR      r2,[r2,#0x20]
000050  4b1a              LDR      r3,|L2.188|
000052  401a              ANDS     r2,r2,r3
000054  4b18              LDR      r3,|L2.184|
000056  3b10              SUBS     r3,r3,#0x10
000058  621a              STR      r2,[r3,#0x20]
                  |L2.90|
;;;360         }
;;;361    		}
;;;362    		if(CMPx==CMP_2)
00005a  4a17              LDR      r2,|L2.184|
00005c  1c92              ADDS     r2,r2,#2
00005e  4290              CMP      r0,r2
000060  d112              BNE      |L2.136|
;;;363    		{
;;;364    			if(NewState != SC_DISABLE)
000062  2900              CMP      r1,#0
000064  d008              BEQ      |L2.120|
;;;365         {
;;;366            /* Enable the CMP Function */
;;;367           CMP->CMP_CFG2 |= (uint16_t)CMPX_CFG_CMPEN;
000066  4a14              LDR      r2,|L2.184|
000068  3a10              SUBS     r2,r2,#0x10
00006a  6a52              LDR      r2,[r2,#0x24]
00006c  2380              MOVS     r3,#0x80
00006e  431a              ORRS     r2,r2,r3
000070  4b11              LDR      r3,|L2.184|
000072  3b10              SUBS     r3,r3,#0x10
000074  625a              STR      r2,[r3,#0x24]
000076  e007              B        |L2.136|
                  |L2.120|
;;;368         }
;;;369         else
;;;370         {
;;;371            /* Disable the CMP Function */
;;;372           CMP->CMP_CFG2 &= (uint16_t)~CMPX_CFG_CMPEN;
000078  4a0f              LDR      r2,|L2.184|
00007a  3a10              SUBS     r2,r2,#0x10
00007c  6a52              LDR      r2,[r2,#0x24]
00007e  4b0f              LDR      r3,|L2.188|
000080  401a              ANDS     r2,r2,r3
000082  4b0d              LDR      r3,|L2.184|
000084  3b10              SUBS     r3,r3,#0x10
000086  625a              STR      r2,[r3,#0x24]
                  |L2.136|
;;;373         }
;;;374    		}
;;;375    	  if(CMPx==CMP3)
000088  4a0b              LDR      r2,|L2.184|
00008a  3220              ADDS     r2,r2,#0x20
00008c  4290              CMP      r0,r2
00008e  d112              BNE      |L2.182|
;;;376    	  {
;;;377          if(NewState != SC_DISABLE)
000090  2900              CMP      r1,#0
000092  d008              BEQ      |L2.166|
;;;378         {
;;;379          /* Enable the CMP Function */
;;;380          CMP3->CMP_CFG |= (uint16_t)CMP_CFG_CMPEN;
000094  4a08              LDR      r2,|L2.184|
000096  3a10              SUBS     r2,r2,#0x10
000098  6bd2              LDR      r2,[r2,#0x3c]
00009a  2380              MOVS     r3,#0x80
00009c  431a              ORRS     r2,r2,r3
00009e  4b06              LDR      r3,|L2.184|
0000a0  3b10              SUBS     r3,r3,#0x10
0000a2  63da              STR      r2,[r3,#0x3c]
0000a4  e007              B        |L2.182|
                  |L2.166|
;;;381         }
;;;382          else
;;;383         {
;;;384          /* Disable the CMP Function */
;;;385          CMP3->CMP_CFG &= (uint16_t)~CMP_CFG_CMPEN;
0000a6  4a04              LDR      r2,|L2.184|
0000a8  3a10              SUBS     r2,r2,#0x10
0000aa  6bd2              LDR      r2,[r2,#0x3c]
0000ac  4b03              LDR      r3,|L2.188|
0000ae  401a              ANDS     r2,r2,r3
0000b0  4b01              LDR      r3,|L2.184|
0000b2  3b10              SUBS     r3,r3,#0x10
0000b4  63da              STR      r2,[r3,#0x3c]
                  |L2.182|
;;;386         }
;;;387    	}
;;;388    #endif	
;;;389    }
0000b6  4770              BX       lr
;;;390    /**
                          ENDP

                  |L2.184|
                          DCD      0x40022150
                  |L2.188|
                          DCD      0x0000ff7f

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

                  CMP_DeInit PROC
;;;53      */
;;;54     void CMP_DeInit ( CMP_TypeDef* CMPx )
000000  4910              LDR      r1,|L3.68|
;;;55     {
;;;56     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;57         /* Check the parameters */
;;;58         assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;59     
;;;60         if ( CMPx == CMP )
;;;61         {
;;;62             /* Enable CMP0 reset state */
;;;63             CMPx->CMP_CFG = 0x0000;
;;;64             CMPx->CMP_STS = 0xFFFF;
;;;65         }
;;;66     #elif defined(SC32f15xx)
;;;67         assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;68        if(CMPx==CMP_0 ||CMPx==CMP_1 ||CMPx==CMP_2 )
000002  4288              CMP      r0,r1
000004  d005              BEQ      |L3.18|
000006  1c49              ADDS     r1,r1,#1
000008  4288              CMP      r0,r1
00000a  d002              BEQ      |L3.18|
00000c  1c49              ADDS     r1,r1,#1
00000e  4288              CMP      r0,r1
000010  d10a              BNE      |L3.40|
                  |L3.18|
;;;69     	 {
;;;70     		CMP->CMP_STS = 0xFF;
000012  21ff              MOVS     r1,#0xff
000014  4a0b              LDR      r2,|L3.68|
000016  3a10              SUBS     r2,r2,#0x10
000018  6111              STR      r1,[r2,#0x10]
;;;71         CMP->CMP_CON = 0x00;
00001a  2100              MOVS     r1,#0
00001c  6151              STR      r1,[r2,#0x14]
;;;72         CMP->CMP_IDE = 0x00;
00001e  6191              STR      r1,[r2,#0x18]
;;;73         CMP->CMP_CFG = 0x00;
000020  61d1              STR      r1,[r2,#0x1c]
;;;74     	  CMP->CMP_CFG1 = 0x00;
000022  6211              STR      r1,[r2,#0x20]
;;;75         CMP->CMP_CFG2 = 0x00;
000024  6251              STR      r1,[r2,#0x24]
000026  e00b              B        |L3.64|
                  |L3.40|
;;;76     	 }
;;;77     	 else if(CMPx==CMP3)
000028  4906              LDR      r1,|L3.68|
00002a  3120              ADDS     r1,r1,#0x20
00002c  4288              CMP      r0,r1
00002e  d107              BNE      |L3.64|
;;;78     	 {
;;;79         CMP3->CMP_STS = 0xFF;
000030  21ff              MOVS     r1,#0xff
000032  4a04              LDR      r2,|L3.68|
000034  3a10              SUBS     r2,r2,#0x10
000036  6311              STR      r1,[r2,#0x30]
;;;80         CMP3->CMP_CON = 0x00;
000038  2100              MOVS     r1,#0
00003a  6351              STR      r1,[r2,#0x34]
;;;81     	  CMP3->CMP_IDE = 0x00;
00003c  6391              STR      r1,[r2,#0x38]
;;;82         CMP3->CMP_CFG = 0x00;
00003e  63d1              STR      r1,[r2,#0x3c]
                  |L3.64|
;;;83     	 }
;;;84     #endif		
;;;85     }
000040  4770              BX       lr
;;;86     
                          ENDP

000042  0000              DCW      0x0000
                  |L3.68|
                          DCD      0x40022150

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

                  CMP_GetCMPSTA PROC
;;;775     */
;;;776    CMP_CMPSTA_TypeDef CMP_GetCMPSTA ( CMP_TypeDef* CMPx )
000000  4601              MOV      r1,r0
;;;777    {
;;;778    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;779        CMP_CMPSTA_TypeDef CMP_CMPSTA = CMP_CMPSTA_Low;
;;;780        /* Check the parameters */
;;;781        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;782    
;;;783        if ( ( CMPx->CMP_STS & CMP_STS_CMPSTA ) != 0 )
;;;784        {
;;;785            CMP_CMPSTA = CMP_CMPSTA_High;
;;;786        }
;;;787        else
;;;788        {
;;;789            CMP_CMPSTA = CMP_CMPSTA_Low;
;;;790        }
;;;791    
;;;792        return CMP_CMPSTA;
;;;793    #elif defined(SC32f15xx)
;;;794      CMP_CMPSTA_TypeDef CMP_CMPSTA = CMP_CMP0STA_Low;
000002  2000              MOVS     r0,#0
;;;795      /* Check the parameters */
;;;796      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;797    	
;;;798    		if(CMPx == CMP_0)
000004  4a1b              LDR      r2,|L4.116|
000006  4291              CMP      r1,r2
000008  d109              BNE      |L4.30|
;;;799    	{
;;;800    		if((CMP->CMP_STS & CMP_STS_CMP0STA) != 0)
00000a  4a1a              LDR      r2,|L4.116|
00000c  3a10              SUBS     r2,r2,#0x10
00000e  6912              LDR      r2,[r2,#0x10]
000010  2308              MOVS     r3,#8
000012  401a              ANDS     r2,r2,r3
000014  2a00              CMP      r2,#0
000016  d001              BEQ      |L4.28|
;;;801    		{
;;;802    			CMP_CMPSTA =CMP_CMP0STA_High;
000018  2008              MOVS     r0,#8
00001a  e000              B        |L4.30|
                  |L4.28|
;;;803    		}
;;;804    		else
;;;805    		{
;;;806    			CMP_CMPSTA = CMP_CMP0STA_Low;
00001c  2000              MOVS     r0,#0
                  |L4.30|
;;;807    		}
;;;808      }
;;;809    	if(CMPx == CMP_1)
00001e  4a15              LDR      r2,|L4.116|
000020  1c52              ADDS     r2,r2,#1
000022  4291              CMP      r1,r2
000024  d109              BNE      |L4.58|
;;;810    	{
;;;811    		if((CMP->CMP_STS & CMP_STS_CMP1STA) != 0)
000026  4a13              LDR      r2,|L4.116|
000028  3a10              SUBS     r2,r2,#0x10
00002a  6912              LDR      r2,[r2,#0x10]
00002c  2310              MOVS     r3,#0x10
00002e  401a              ANDS     r2,r2,r3
000030  2a00              CMP      r2,#0
000032  d001              BEQ      |L4.56|
;;;812    		{
;;;813    			CMP_CMPSTA =CMP_CMP1STA_High;
000034  2010              MOVS     r0,#0x10
000036  e000              B        |L4.58|
                  |L4.56|
;;;814    		}
;;;815    		else
;;;816    		{
;;;817    			CMP_CMPSTA = CMP_CMP1STA_Low;
000038  2000              MOVS     r0,#0
                  |L4.58|
;;;818    		}
;;;819      }
;;;820    	if(CMPx == CMP_2)
00003a  4a0e              LDR      r2,|L4.116|
00003c  1c92              ADDS     r2,r2,#2
00003e  4291              CMP      r1,r2
000040  d109              BNE      |L4.86|
;;;821    	{
;;;822    		if((CMP->CMP_STS & CMP_STS_CMP2STA) != 0)
000042  4a0c              LDR      r2,|L4.116|
000044  3a10              SUBS     r2,r2,#0x10
000046  6912              LDR      r2,[r2,#0x10]
000048  2320              MOVS     r3,#0x20
00004a  401a              ANDS     r2,r2,r3
00004c  2a00              CMP      r2,#0
00004e  d001              BEQ      |L4.84|
;;;823    		{
;;;824    			CMP_CMPSTA =CMP_CMP2STA_High;
000050  2020              MOVS     r0,#0x20
000052  e000              B        |L4.86|
                  |L4.84|
;;;825    		}
;;;826    		else
;;;827    		{
;;;828    			CMP_CMPSTA = CMP_CMP2STA_Low;
000054  2000              MOVS     r0,#0
                  |L4.86|
;;;829    		}
;;;830      }
;;;831    	if(CMPx == CMP3)
000056  4a07              LDR      r2,|L4.116|
000058  3220              ADDS     r2,r2,#0x20
00005a  4291              CMP      r1,r2
00005c  d109              BNE      |L4.114|
;;;832    	{
;;;833    		if((CMP3->CMP_STS & CMP_STS_CMP3STA) != 0)
00005e  4a05              LDR      r2,|L4.116|
000060  3a10              SUBS     r2,r2,#0x10
000062  6b12              LDR      r2,[r2,#0x30]
000064  2302              MOVS     r3,#2
000066  401a              ANDS     r2,r2,r3
000068  2a00              CMP      r2,#0
00006a  d001              BEQ      |L4.112|
;;;834    		{
;;;835    			CMP_CMPSTA = CMP_CMP3STA_High;
00006c  2002              MOVS     r0,#2
00006e  e000              B        |L4.114|
                  |L4.112|
;;;836    		}
;;;837    		else
;;;838    		{
;;;839    			CMP_CMPSTA = CMP_CMP3STA_Low;
000070  2000              MOVS     r0,#0
                  |L4.114|
;;;840    		}
;;;841    	}
;;;842    
;;;843    
;;;844      return CMP_CMPSTA;
;;;845    #endif	
;;;846    }
000072  4770              BX       lr
;;;847    
                          ENDP

                  |L4.116|
                          DCD      0x40022150

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

                  CMP_GetFlagStatus PROC
;;;871     */
;;;872    FlagStatus CMP_GetFlagStatus ( CMP_TypeDef* CMPx, CMP_FLAG_TypeDef CMP_FLAG )
000000  4602              MOV      r2,r0
;;;873    {
;;;874    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;875        ITStatus bitstatus = SC_RESET;
;;;876        /* Check the parameters */
;;;877        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;878        assert_param ( IS_CMP_FLAG ( CMP_FLAG ) );
;;;879    
;;;880        if ( ( CMPx->CMP_STS & CMP_FLAG ) != ( uint16_t ) SC_RESET )
;;;881        {
;;;882            bitstatus = SC_SET;
;;;883        }
;;;884        else
;;;885        {
;;;886            bitstatus = SC_RESET;
;;;887        }
;;;888        return bitstatus;
;;;889    #elif defined(SC32f15xx)
;;;890        ITStatus bitstatus = SC_RESET;
000002  2000              MOVS     r0,#0
;;;891        /* Check the parameters */
;;;892        assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;893        assert_param(IS_CMP_FLAG(CMP_FLAG));
;;;894    	if(CMPx == CMP_0 || CMPx == CMP_1 || CMPx == CMP_2)  
000004  4b0f              LDR      r3,|L5.68|
000006  429a              CMP      r2,r3
000008  d005              BEQ      |L5.22|
00000a  1c5b              ADDS     r3,r3,#1
00000c  429a              CMP      r2,r3
00000e  d002              BEQ      |L5.22|
000010  1c5b              ADDS     r3,r3,#1
000012  429a              CMP      r2,r3
000014  d108              BNE      |L5.40|
                  |L5.22|
;;;895    	{
;;;896        if((CMP->CMP_STS & CMP_FLAG) != (uint16_t)SC_RESET)
000016  4b0b              LDR      r3,|L5.68|
000018  3b10              SUBS     r3,r3,#0x10
00001a  691b              LDR      r3,[r3,#0x10]
00001c  400b              ANDS     r3,r3,r1
00001e  2b00              CMP      r3,#0
000020  d001              BEQ      |L5.38|
;;;897        {
;;;898            bitstatus = SC_SET;
000022  2001              MOVS     r0,#1
000024  e000              B        |L5.40|
                  |L5.38|
;;;899        }
;;;900        else
;;;901        {
;;;902            bitstatus = SC_RESET;
000026  2000              MOVS     r0,#0
                  |L5.40|
;;;903        }
;;;904    	}
;;;905    	if(CMPx == CMP3)
000028  4b06              LDR      r3,|L5.68|
00002a  3320              ADDS     r3,r3,#0x20
00002c  429a              CMP      r2,r3
00002e  d108              BNE      |L5.66|
;;;906    	{
;;;907        if((CMP3->CMP_STS & CMP_FLAG) != (uint16_t)SC_RESET)
000030  4b04              LDR      r3,|L5.68|
000032  3b10              SUBS     r3,r3,#0x10
000034  6b1b              LDR      r3,[r3,#0x30]
000036  400b              ANDS     r3,r3,r1
000038  2b00              CMP      r3,#0
00003a  d001              BEQ      |L5.64|
;;;908        {
;;;909            bitstatus = SC_SET;
00003c  2001              MOVS     r0,#1
00003e  e000              B        |L5.66|
                  |L5.64|
;;;910        }
;;;911        else
;;;912        {
;;;913            bitstatus = SC_RESET;
000040  2000              MOVS     r0,#0
                  |L5.66|
;;;914        }		
;;;915    	}
;;;916    
;;;917    
;;;918        return bitstatus;		
;;;919    #endif
;;;920    		
;;;921    }
000042  4770              BX       lr
;;;922    
                          ENDP

                  |L5.68|
                          DCD      0x40022150

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

                  CMP_GetNegativeChannel PROC
;;;469     */
;;;470    CMP_Negative_TypeDef CMP_GetNegativeChannel ( CMP_TypeDef* CMPx )
000000  4601              MOV      r1,r0
;;;471    {
;;;472    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;473        /* Check the parameters */
;;;474        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;475    
;;;476        /* Get the CMP negative input channel type */
;;;477        return ( CMP_Negative_TypeDef ) ( CMPx->CMP_CFG & CMP_CFG_CMPRF );
;;;478    #elif  defined(SC32f15xx)
;;;479    	CMP_Negative_TypeDef ReadCMPRF = CMP3_Negative_1D16CMP_VREF;
000002  20ff              MOVS     r0,#0xff
000004  3001              ADDS     r0,#1
;;;480    	/* Check the parameters */
;;;481      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;482      if(CMPx == CMP3)
000006  4a05              LDR      r2,|L6.28|
000008  4291              CMP      r1,r2
00000a  d106              BNE      |L6.26|
;;;483    	{
;;;484    		ReadCMPRF = (CMP_Negative_TypeDef)(CMP3->CMP_CFG & CMP_CFG_CMPRF);
00000c  4a03              LDR      r2,|L6.28|
00000e  3a30              SUBS     r2,r2,#0x30
000010  6bd2              LDR      r2,[r2,#0x3c]
000012  230f              MOVS     r3,#0xf
000014  021b              LSLS     r3,r3,#8
000016  401a              ANDS     r2,r2,r3
000018  4610              MOV      r0,r2
                  |L6.26|
;;;485    	}
;;;486    	/* Get the CMP negative input channel type */
;;;487    	return (CMP_Negative_TypeDef)ReadCMPRF;
;;;488    #endif	
;;;489    }
00001a  4770              BX       lr
;;;490    
                          ENDP

                  |L6.28|
                          DCD      0x40022170

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

                  CMP_GetNegativeSelection PROC
;;;659     */
;;;660    CMP_NegativeSelect_TypeDef CMP_GetNegativeSelection(CMP_TypeDef* CMPx)
000000  4601              MOV      r1,r0
;;;661    {
;;;662    	/* Check the parameters */
;;;663    	CMP_NegativeSelect_TypeDef ReadCMPNegative = CMP0_1_2NegativeSelect_CMPxN;
000002  2000              MOVS     r0,#0
;;;664      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;665      if(CMPx== CMP_0)
000004  4a11              LDR      r2,|L7.76|
000006  4291              CMP      r1,r2
000008  d104              BNE      |L7.20|
;;;666    	{
;;;667    	/* Get the CMP0 positive input channel type */
;;;668    	ReadCMPNegative =(CMP_NegativeSelect_TypeDef)(CMP->CMP_CFG & ( CMPX_CFG_CMPNS));
00000a  4a10              LDR      r2,|L7.76|
00000c  3a10              SUBS     r2,r2,#0x10
00000e  69d2              LDR      r2,[r2,#0x1c]
000010  0790              LSLS     r0,r2,#30
000012  0f80              LSRS     r0,r0,#30
                  |L7.20|
;;;669    	}
;;;670      if(CMPx== CMP_1)
000014  4a0d              LDR      r2,|L7.76|
000016  1c52              ADDS     r2,r2,#1
000018  4291              CMP      r1,r2
00001a  d104              BNE      |L7.38|
;;;671    	{
;;;672    	/* Get the CMP1 positive input channel type */
;;;673    	ReadCMPNegative =(CMP_NegativeSelect_TypeDef)(CMP->CMP_CFG1 & ( CMPX_CFG_CMPNS));
00001c  4a0b              LDR      r2,|L7.76|
00001e  3a10              SUBS     r2,r2,#0x10
000020  6a12              LDR      r2,[r2,#0x20]
000022  0790              LSLS     r0,r2,#30
000024  0f80              LSRS     r0,r0,#30
                  |L7.38|
;;;674    	}
;;;675    	if(CMPx== CMP_2)
000026  4a09              LDR      r2,|L7.76|
000028  1c92              ADDS     r2,r2,#2
00002a  4291              CMP      r1,r2
00002c  d104              BNE      |L7.56|
;;;676    	{
;;;677    	/* Get the CMP2 positive input channel type */
;;;678    	ReadCMPNegative =(CMP_NegativeSelect_TypeDef)(CMP->CMP_CFG2 & ( CMPX_CFG_CMPNS));
00002e  4a07              LDR      r2,|L7.76|
000030  3a10              SUBS     r2,r2,#0x10
000032  6a52              LDR      r2,[r2,#0x24]
000034  0790              LSLS     r0,r2,#30
000036  0f80              LSRS     r0,r0,#30
                  |L7.56|
;;;679    	}
;;;680    	if(CMPx== CMP3)
000038  4a04              LDR      r2,|L7.76|
00003a  3220              ADDS     r2,r2,#0x20
00003c  4291              CMP      r1,r2
00003e  d104              BNE      |L7.74|
;;;681    	{
;;;682      /* Get the CMP2 positive input channel type */
;;;683    	ReadCMPNegative =(CMP_NegativeSelect_TypeDef)(CMP3->CMP_CFG & ( CMP_CFG_CMPNS));
000040  4a02              LDR      r2,|L7.76|
000042  3a10              SUBS     r2,r2,#0x10
000044  6bd2              LDR      r2,[r2,#0x3c]
000046  0790              LSLS     r0,r2,#30
000048  0f80              LSRS     r0,r0,#30
                  |L7.74|
;;;684    	}
;;;685    	/* Get the CMP positive input channel type */
;;;686    	return (CMP_NegativeSelect_TypeDef)ReadCMPNegative;
;;;687    }
00004a  4770              BX       lr
;;;688    #endif
                          ENDP

                  |L7.76|
                          DCD      0x40022150

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

                  CMP_GetPositiveChannel PROC
;;;575     */
;;;576    CMP_Positive_TypeDef CMP_GetPositiveChannel ( CMP_TypeDef* CMPx )
000000  4601              MOV      r1,r0
;;;577    {
;;;578    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;579        /* Check the parameters */
;;;580        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;581    
;;;582        /* Get the CMP positive input channel type */
;;;583        return ( CMP_Positive_TypeDef ) ( CMPx->CMP_CFG & ( CMP_CFG_CMPIS | CMP_CFG_CMPP ) );
;;;584    #elif defined(SC32f15xx)
;;;585    	CMP_Positive_TypeDef ReadCMPPositive = CMP0_Positive_CMP0P;
000002  2000              MOVS     r0,#0
;;;586    	/* Check the parameters */
;;;587      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;588      if(CMPx == CMP_0)
000004  4a09              LDR      r2,|L8.44|
000006  4291              CMP      r1,r2
000008  d105              BNE      |L8.22|
;;;589    	{
;;;590    		ReadCMPPositive = (CMP_Positive_TypeDef)(CMP->CMP_CFG & ( CMPX_CFG_CMPPS));
00000a  4a08              LDR      r2,|L8.44|
00000c  3a10              SUBS     r2,r2,#0x10
00000e  69d2              LDR      r2,[r2,#0x1c]
000010  230c              MOVS     r3,#0xc
000012  401a              ANDS     r2,r2,r3
000014  4610              MOV      r0,r2
                  |L8.22|
;;;591    	}
;;;592    	if(CMPx == CMP3)
000016  4a05              LDR      r2,|L8.44|
000018  3220              ADDS     r2,r2,#0x20
00001a  4291              CMP      r1,r2
00001c  d105              BNE      |L8.42|
;;;593    	{
;;;594    		ReadCMPPositive = (CMP_Positive_TypeDef)(CMP3->CMP_CFG & ( CMP_CFG_CMPPS));
00001e  4a03              LDR      r2,|L8.44|
000020  3a10              SUBS     r2,r2,#0x10
000022  6bd2              LDR      r2,[r2,#0x3c]
000024  230c              MOVS     r3,#0xc
000026  401a              ANDS     r2,r2,r3
000028  4610              MOV      r0,r2
                  |L8.42|
;;;595    	}
;;;596    	/* Get the CMP positive input channel type */
;;;597    	return ReadCMPPositive;
;;;598    #endif	
;;;599    	
;;;600    }
00002a  4770              BX       lr
;;;601    #if defined(SC32f15xx)
                          ENDP

                  |L8.44|
                          DCD      0x40022150

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

                  CMP_ITConfig PROC
;;;717     */
;;;718    void CMP_ITConfig(CMP_TypeDef* CMPx, uint16_t CMP_IT, FunctionalState NewState)
000000  b510              PUSH     {r4,lr}
;;;719    {
;;;720      /* Check the parameters */
;;;721      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;722      assert_param(IS_CMP_IT(CMP_IT));
;;;723      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;724      if(CMPx== CMP_0 || CMPx== CMP_1 || CMPx== CMP_2)
000002  4b1a              LDR      r3,|L9.108|
000004  4298              CMP      r0,r3
000006  d005              BEQ      |L9.20|
000008  1c5b              ADDS     r3,r3,#1
00000a  4298              CMP      r0,r3
00000c  d002              BEQ      |L9.20|
00000e  1c5b              ADDS     r3,r3,#1
000010  4298              CMP      r0,r3
000012  d112              BNE      |L9.58|
                  |L9.20|
;;;725    	{
;;;726    		if(NewState != SC_DISABLE)
000014  2a00              CMP      r2,#0
000016  d007              BEQ      |L9.40|
;;;727        {
;;;728        /* Enable the Interrupt sources */
;;;729         CMP->CMP_IDE |= CMP_IT;
000018  4b14              LDR      r3,|L9.108|
00001a  3b10              SUBS     r3,r3,#0x10
00001c  699b              LDR      r3,[r3,#0x18]
00001e  430b              ORRS     r3,r3,r1
000020  4c12              LDR      r4,|L9.108|
000022  3c10              SUBS     r4,r4,#0x10
000024  61a3              STR      r3,[r4,#0x18]
000026  e008              B        |L9.58|
                  |L9.40|
;;;730        }
;;;731        else
;;;732        {
;;;733        /* Disable the Interrupt sources */
;;;734         CMP->CMP_IDE &= (uint8_t)~CMP_IT;
000028  4b10              LDR      r3,|L9.108|
00002a  3b10              SUBS     r3,r3,#0x10
00002c  699b              LDR      r3,[r3,#0x18]
00002e  43cc              MVNS     r4,r1
000030  b2e4              UXTB     r4,r4
000032  4023              ANDS     r3,r3,r4
000034  4c0d              LDR      r4,|L9.108|
000036  3c10              SUBS     r4,r4,#0x10
000038  61a3              STR      r3,[r4,#0x18]
                  |L9.58|
;;;735        }
;;;736    	}
;;;737    	if(CMPx== CMP3)
00003a  4b0c              LDR      r3,|L9.108|
00003c  3320              ADDS     r3,r3,#0x20
00003e  4298              CMP      r0,r3
000040  d112              BNE      |L9.104|
;;;738    	{
;;;739    		if(NewState != SC_DISABLE)
000042  2a00              CMP      r2,#0
000044  d007              BEQ      |L9.86|
;;;740    		{
;;;741    			/* Enable the Interrupt sources */
;;;742    			CMP3->CMP_IDE |= CMP_IT;
000046  4b09              LDR      r3,|L9.108|
000048  3b10              SUBS     r3,r3,#0x10
00004a  6b9b              LDR      r3,[r3,#0x38]
00004c  430b              ORRS     r3,r3,r1
00004e  4c07              LDR      r4,|L9.108|
000050  3c10              SUBS     r4,r4,#0x10
000052  63a3              STR      r3,[r4,#0x38]
000054  e008              B        |L9.104|
                  |L9.86|
;;;743    		}
;;;744    		else
;;;745    		{
;;;746    			/* Disable the Interrupt sources */
;;;747    			CMP3->CMP_IDE &= (uint16_t)~CMP_IT;
000056  4b05              LDR      r3,|L9.108|
000058  3b10              SUBS     r3,r3,#0x10
00005a  6b9b              LDR      r3,[r3,#0x38]
00005c  43cc              MVNS     r4,r1
00005e  b2a4              UXTH     r4,r4
000060  4023              ANDS     r3,r3,r4
000062  4c02              LDR      r4,|L9.108|
000064  3c10              SUBS     r4,r4,#0x10
000066  63a3              STR      r3,[r4,#0x38]
                  |L9.104|
;;;748    		}		
;;;749    	}
;;;750    }
000068  bd10              POP      {r4,pc}
;;;751    
                          ENDP

00006a  0000              DCW      0x0000
                  |L9.108|
                          DCD      0x40022150

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

                  CMP_Init PROC
;;;100     */
;;;101    void CMP_Init ( CMP_TypeDef* CMPx, CMP_InitTypeDef* CMP_InitStruct )
000000  b510              PUSH     {r4,lr}
;;;102    {
000002  4602              MOV      r2,r0
;;;103    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;104        uint32_t tmpreg = 0;
;;;105        /* Check the parameters */
;;;106        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;107        assert_param ( IS_CMP_Negative ( CMP_InitStruct->CMP_Negative ) );
;;;108        assert_param ( IS_CMP_Positive ( CMP_InitStruct->CMP_Positive ) );
;;;109        assert_param ( IS_CMP_TRIGGER ( CMP_InitStruct->CMP_TriggerMode ) );
;;;110    
;;;111        /*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;112        /* Get the CMPx CMP_CFG value */
;;;113        tmpreg = CMPx->CMP_CFG;
;;;114        /* Clear CMPFS bits */
;;;115        tmpreg &= ( uint32_t ) ~ ( CMP_CFG_CMPIS | CMP_CFG_CMPP | CMP_CFG_CMPIM |
;;;116                                   CMP_CFG_CMPRF ) ;
;;;117    
;;;118        /* Set CMPRF bits according to CMP_NEGATIVE value */
;;;119        /* Set CMPIS bits and CMPIP bit according to CMP_POSITIVE value */
;;;120        /* Set CMPIM bits according to CMP_TriggerMode value */
;;;121        tmpreg |= ( uint32_t ) ( CMP_InitStruct->CMP_Negative | CMP_InitStruct->CMP_Positive |
;;;122                                 CMP_InitStruct->CMP_TriggerMode );
;;;123        /* Write to CMPx CMP_CFG */
;;;124        CMPx->CMP_CFG = tmpreg;
;;;125    #elif defined(SC32f15xx)
;;;126        uint32_t tmpreg = 0;
000004  2000              MOVS     r0,#0
;;;127    	  if(CMPx==CMP_0 ||CMPx==CMP_1 ||CMPx==CMP_2 )
000006  4b38              LDR      r3,|L10.232|
000008  429a              CMP      r2,r3
00000a  d005              BEQ      |L10.24|
00000c  1c5b              ADDS     r3,r3,#1
00000e  429a              CMP      r2,r3
000010  d002              BEQ      |L10.24|
000012  1c5b              ADDS     r3,r3,#1
000014  429a              CMP      r2,r3
000016  d140              BNE      |L10.154|
                  |L10.24|
;;;128    		{
;;;129    			/* Check the parameters */
;;;130    			assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;131    			assert_param(IS_CMP_Negative(CMP_InitStruct->CMP_Negative));
;;;132    			assert_param(IS_CMP_TRIGGER(CMP_InitStruct->CMP_TriggerMode));
;;;133    
;;;134    			/*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;135    			tmpreg = CMP->CMP_CON;
000018  4b33              LDR      r3,|L10.232|
00001a  3b10              SUBS     r3,r3,#0x10
00001c  6958              LDR      r0,[r3,#0x14]
;;;136    		
;;;137    			tmpreg &= (uint16_t)~(CMP_CON_HYS);
00001e  4b33              LDR      r3,|L10.236|
000020  4018              ANDS     r0,r0,r3
;;;138    		
;;;139    			tmpreg |= CMP_InitStruct->CMP_HYS;
000022  894b              LDRH     r3,[r1,#0xa]
000024  4318              ORRS     r0,r0,r3
;;;140    		
;;;141    			CMP->CMP_CON = tmpreg;
000026  4b30              LDR      r3,|L10.232|
000028  3b10              SUBS     r3,r3,#0x10
00002a  6158              STR      r0,[r3,#0x14]
;;;142    		
;;;143    			if(CMPx==CMP_0)
00002c  4b2e              LDR      r3,|L10.232|
00002e  429a              CMP      r2,r3
000030  d10f              BNE      |L10.82|
;;;144    			{
;;;145    			tmpreg = CMP->CMP_CFG;
000032  4b2d              LDR      r3,|L10.232|
000034  3b10              SUBS     r3,r3,#0x10
000036  69d8              LDR      r0,[r3,#0x1c]
;;;146    
;;;147    			tmpreg &= (uint16_t)~(CMPX_CFG_CMPIM | CMPX_CFG_CMPNS | CMPX_CFG_CMPPS);
000038  4b2c              LDR      r3,|L10.236|
00003a  3b6c              SUBS     r3,r3,#0x6c
00003c  4018              ANDS     r0,r0,r3
;;;148    
;;;149    			/* Set CMPIS bits and CMPIP bit according to CMP_Sub0_Positive value */
;;;150    			/* Set CMPIM bits according to CMP_TriggerMode value */
;;;151    			tmpreg |= (uint32_t)(CMP_InitStruct->CMP_Negative | CMP_InitStruct->CMP_Positive |
00003e  880b              LDRH     r3,[r1,#0]
000040  884c              LDRH     r4,[r1,#2]
000042  4323              ORRS     r3,r3,r4
000044  890c              LDRH     r4,[r1,#8]
000046  4323              ORRS     r3,r3,r4
000048  4318              ORRS     r0,r0,r3
;;;152    													 CMP_InitStruct->CMP_TriggerMode);
;;;153    			/* Write to CMPx CMP_CFG */
;;;154    			CMP->CMP_CFG = tmpreg;
00004a  4b27              LDR      r3,|L10.232|
00004c  3b10              SUBS     r3,r3,#0x10
00004e  61d8              STR      r0,[r3,#0x1c]
000050  e048              B        |L10.228|
                  |L10.82|
;;;155    			}
;;;156    			else if(CMPx==CMP_1)
000052  4b25              LDR      r3,|L10.232|
000054  1c5b              ADDS     r3,r3,#1
000056  429a              CMP      r2,r3
000058  d10d              BNE      |L10.118|
;;;157    			{
;;;158    			/*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;159    			tmpreg = CMP->CMP_CFG1;
00005a  4b23              LDR      r3,|L10.232|
00005c  3b10              SUBS     r3,r3,#0x10
00005e  6a18              LDR      r0,[r3,#0x20]
;;;160    
;;;161    			tmpreg &= (uint16_t)~(CMPX_CFG_CMPIM | CMPX_CFG_CMPNS | CMPX_CFG_CMPPS );
000060  4b22              LDR      r3,|L10.236|
000062  3b6c              SUBS     r3,r3,#0x6c
000064  4018              ANDS     r0,r0,r3
;;;162    			/* Set CMPIS bits and CMPIP bit according to CMP_Sub0_Positive value */
;;;163    			/* Set CMPIM bits according to CMP_TriggerMode value */
;;;164    			tmpreg |= (uint32_t)(CMP_InitStruct->CMP_Negative |
000066  880b              LDRH     r3,[r1,#0]
000068  890c              LDRH     r4,[r1,#8]
00006a  4323              ORRS     r3,r3,r4
00006c  4318              ORRS     r0,r0,r3
;;;165    													 CMP_InitStruct->CMP_TriggerMode);
;;;166    			/* Write to CMPx CMP_CFG */
;;;167    			CMP->CMP_CFG1 = tmpreg;
00006e  4b1e              LDR      r3,|L10.232|
000070  3b10              SUBS     r3,r3,#0x10
000072  6218              STR      r0,[r3,#0x20]
000074  e036              B        |L10.228|
                  |L10.118|
;;;168    			}
;;;169    			else if(CMPx==CMP_2)
000076  4b1c              LDR      r3,|L10.232|
000078  1c9b              ADDS     r3,r3,#2
00007a  429a              CMP      r2,r3
00007c  d132              BNE      |L10.228|
;;;170    			{
;;;171    			/*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;172    			tmpreg = CMP->CMP_CFG2;
00007e  4b1a              LDR      r3,|L10.232|
000080  3b10              SUBS     r3,r3,#0x10
000082  6a58              LDR      r0,[r3,#0x24]
;;;173    
;;;174    			tmpreg &= (uint16_t)~(CMPX_CFG_CMPIM | CMPX_CFG_CMPNS | CMPX_CFG_CMPPS );
000084  4b19              LDR      r3,|L10.236|
000086  3b6c              SUBS     r3,r3,#0x6c
000088  4018              ANDS     r0,r0,r3
;;;175    			/* Set CMPIS bits and CMPIP bit according to CMP_Sub0_Positive value */
;;;176    			/* Set CMPIM bits according to CMP_TriggerMode value */
;;;177    			tmpreg |= (uint32_t)(CMP_InitStruct->CMP_Negative|
00008a  880b              LDRH     r3,[r1,#0]
00008c  890c              LDRH     r4,[r1,#8]
00008e  4323              ORRS     r3,r3,r4
000090  4318              ORRS     r0,r0,r3
;;;178    													 CMP_InitStruct->CMP_TriggerMode);
;;;179    			/* Write to CMPx CMP_CFG */
;;;180    			CMP->CMP_CFG2 = tmpreg;
000092  4b15              LDR      r3,|L10.232|
000094  3b10              SUBS     r3,r3,#0x10
000096  6258              STR      r0,[r3,#0x24]
000098  e024              B        |L10.228|
                  |L10.154|
;;;181    			}
;;;182    		}
;;;183    	  else if(CMPx==CMP3)
00009a  4b13              LDR      r3,|L10.232|
00009c  3320              ADDS     r3,r3,#0x20
00009e  429a              CMP      r2,r3
0000a0  d120              BNE      |L10.228|
;;;184    	 {
;;;185        /* Check the parameters */
;;;186        assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;187        assert_param(IS_CMP_Negative(CMP_InitStruct->CMP_Negative));
;;;188        assert_param(IS_CMP_Positive(CMP_InitStruct->CMP_Positive));
;;;189        assert_param(IS_CMP_TRIGGER(CMP_InitStruct->CMP_TriggerMode));
;;;190    
;;;191    	  CMP3->CMP_CON &= ~(CMP_CON_REFSEL|CMP_CON_HYS);
0000a2  4b11              LDR      r3,|L10.232|
0000a4  3b10              SUBS     r3,r3,#0x10
0000a6  6b5b              LDR      r3,[r3,#0x34]
0000a8  2483              MOVS     r4,#0x83
0000aa  43a3              BICS     r3,r3,r4
0000ac  4c0e              LDR      r4,|L10.232|
0000ae  3c10              SUBS     r4,r4,#0x10
0000b0  6363              STR      r3,[r4,#0x34]
;;;192        CMP3->CMP_CON |= (uint32_t)(CMP_InitStruct->CMP_VREF |  CMP_InitStruct->CMP_HYS);
0000b2  888b              LDRH     r3,[r1,#4]
0000b4  894c              LDRH     r4,[r1,#0xa]
0000b6  4323              ORRS     r3,r3,r4
0000b8  4c0b              LDR      r4,|L10.232|
0000ba  3c10              SUBS     r4,r4,#0x10
0000bc  6b64              LDR      r4,[r4,#0x34]
0000be  4323              ORRS     r3,r3,r4
0000c0  4c09              LDR      r4,|L10.232|
0000c2  3c10              SUBS     r4,r4,#0x10
0000c4  6363              STR      r3,[r4,#0x34]
;;;193    
;;;194        /*---------------------------- CMPx CMP_CFG Configuration ------------------------*/
;;;195        tmpreg = CMP3->CMP_CFG;
0000c6  4623              MOV      r3,r4
0000c8  6bd8              LDR      r0,[r3,#0x3c]
;;;196    
;;;197        tmpreg &= (uint16_t)~(CMP_CFG_CMPIM | CMP_CFG_CMPNS | CMP_CFG_CMPPS | CMP_CFG_CMPRF);
0000ca  4b09              LDR      r3,|L10.240|
0000cc  4018              ANDS     r0,r0,r3
;;;198    
;;;199        /* Set CMPRF bits according to CMP_NEGATIVE value */
;;;200        /* Set CMPIS bits and CMPIP bit according to CMP_POSITIVE value */
;;;201        /* Set CMPIM bits according to CMP_TriggerMode value */
;;;202        tmpreg |= (uint32_t)(CMP_InitStruct->CMP_Negative | CMP_InitStruct->CMP_Positive |
0000ce  880b              LDRH     r3,[r1,#0]
0000d0  884c              LDRH     r4,[r1,#2]
0000d2  4323              ORRS     r3,r3,r4
0000d4  890c              LDRH     r4,[r1,#8]
0000d6  4323              ORRS     r3,r3,r4
0000d8  88cc              LDRH     r4,[r1,#6]
0000da  4323              ORRS     r3,r3,r4
0000dc  4318              ORRS     r0,r0,r3
;;;203                             CMP_InitStruct->CMP_TriggerMode | CMP_InitStruct->CMP_CMPRF);
;;;204        /* Write to CMPx CMP_CFG */
;;;205        CMP3->CMP_CFG = tmpreg;
0000de  4b02              LDR      r3,|L10.232|
0000e0  3b10              SUBS     r3,r3,#0x10
0000e2  63d8              STR      r0,[r3,#0x3c]
                  |L10.228|
;;;206    	}
;;;207    #endif
;;;208    }
0000e4  bd10              POP      {r4,pc}
;;;209    
                          ENDP

0000e6  0000              DCW      0x0000
                  |L10.232|
                          DCD      0x40022150
                  |L10.236|
                          DCD      0x0000fffc
                  |L10.240|
                          DCD      0x0000f090

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

                  CMP_NegativeSelection PROC
;;;617     */
;;;618    void CMP_NegativeSelection(CMP_TypeDef* CMPx, CMP_NegativeSelect_TypeDef NegativeSelect)
000000  4a1f              LDR      r2,|L11.128|
;;;619    {
;;;620    	/* Check the parameters */
;;;621      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;622      assert_param(IS_CMP_Negative(NegativeSelect));
;;;623      if(CMPx == CMP_0)
000002  4290              CMP      r0,r2
000004  d10b              BNE      |L11.30|
;;;624    	{
;;;625    	CMP->CMP_CFG &= (uint32_t) ~(CMPX_CFG_CMPNS);
000006  4a1e              LDR      r2,|L11.128|
000008  3a10              SUBS     r2,r2,#0x10
00000a  69d2              LDR      r2,[r2,#0x1c]
00000c  0892              LSRS     r2,r2,#2
00000e  0092              LSLS     r2,r2,#2
000010  4b1b              LDR      r3,|L11.128|
000012  3b10              SUBS     r3,r3,#0x10
000014  61da              STR      r2,[r3,#0x1c]
;;;626      CMP->CMP_CFG |= (uint32_t) NegativeSelect;
000016  461a              MOV      r2,r3
000018  69d2              LDR      r2,[r2,#0x1c]
00001a  430a              ORRS     r2,r2,r1
00001c  61da              STR      r2,[r3,#0x1c]
                  |L11.30|
;;;627    	}
;;;628    	if(CMPx == CMP_1)
00001e  4a18              LDR      r2,|L11.128|
000020  1c52              ADDS     r2,r2,#1
000022  4290              CMP      r0,r2
000024  d10b              BNE      |L11.62|
;;;629    	{
;;;630    	CMP->CMP_CFG1 &= (uint32_t) ~(CMPX_CFG_CMPNS);
000026  4a16              LDR      r2,|L11.128|
000028  3a10              SUBS     r2,r2,#0x10
00002a  6a12              LDR      r2,[r2,#0x20]
00002c  0892              LSRS     r2,r2,#2
00002e  0092              LSLS     r2,r2,#2
000030  4b13              LDR      r3,|L11.128|
000032  3b10              SUBS     r3,r3,#0x10
000034  621a              STR      r2,[r3,#0x20]
;;;631      CMP->CMP_CFG1 |= (uint32_t) NegativeSelect;
000036  461a              MOV      r2,r3
000038  6a12              LDR      r2,[r2,#0x20]
00003a  430a              ORRS     r2,r2,r1
00003c  621a              STR      r2,[r3,#0x20]
                  |L11.62|
;;;632    	}
;;;633    	if(CMPx == CMP_2)
00003e  4a10              LDR      r2,|L11.128|
000040  1c92              ADDS     r2,r2,#2
000042  4290              CMP      r0,r2
000044  d10b              BNE      |L11.94|
;;;634    	{
;;;635    	CMP->CMP_CFG2 &= (uint32_t) ~(CMPX_CFG_CMPNS);
000046  4a0e              LDR      r2,|L11.128|
000048  3a10              SUBS     r2,r2,#0x10
00004a  6a52              LDR      r2,[r2,#0x24]
00004c  0892              LSRS     r2,r2,#2
00004e  0092              LSLS     r2,r2,#2
000050  4b0b              LDR      r3,|L11.128|
000052  3b10              SUBS     r3,r3,#0x10
000054  625a              STR      r2,[r3,#0x24]
;;;636      CMP->CMP_CFG2 |= (uint32_t)NegativeSelect;
000056  461a              MOV      r2,r3
000058  6a52              LDR      r2,[r2,#0x24]
00005a  430a              ORRS     r2,r2,r1
00005c  625a              STR      r2,[r3,#0x24]
                  |L11.94|
;;;637    	}
;;;638      if(CMPx == CMP3)
00005e  4a08              LDR      r2,|L11.128|
000060  3220              ADDS     r2,r2,#0x20
000062  4290              CMP      r0,r2
000064  d10b              BNE      |L11.126|
;;;639    	{
;;;640    	CMP3->CMP_CFG &= (uint32_t) ~(CMP_CFG_CMPNS);
000066  4a06              LDR      r2,|L11.128|
000068  3a10              SUBS     r2,r2,#0x10
00006a  6bd2              LDR      r2,[r2,#0x3c]
00006c  0892              LSRS     r2,r2,#2
00006e  0092              LSLS     r2,r2,#2
000070  4b03              LDR      r3,|L11.128|
000072  3b10              SUBS     r3,r3,#0x10
000074  63da              STR      r2,[r3,#0x3c]
;;;641      CMP3->CMP_CFG |= (uint32_t)NegativeSelect;
000076  461a              MOV      r2,r3
000078  6bd2              LDR      r2,[r2,#0x3c]
00007a  430a              ORRS     r2,r2,r1
00007c  63da              STR      r2,[r3,#0x3c]
                  |L11.126|
;;;642    	}
;;;643    }
00007e  4770              BX       lr
;;;644    
                          ENDP

                  |L11.128|
                          DCD      0x40022150

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

                  CMP_SetNegativeChannel PROC
;;;419     */
;;;420    void CMP_SetNegativeChannel ( CMP_TypeDef* CMPx, CMP_Negative_TypeDef CMP_Negative_Channel )
000000  4a08              LDR      r2,|L12.36|
;;;421    {
;;;422    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;423        /* Check the parameters */
;;;424        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;425        assert_param ( IS_CMP_Negative ( CMP_Negative_Channel ) );
;;;426    
;;;427        CMPx->CMP_CFG &= ( uint32_t ) ~CMP_CFG_CMPRF;
;;;428        CMPx->CMP_CFG |= ( uint32_t ) CMP_Negative_Channel;
;;;429    #elif  defined(SC32f15xx)
;;;430    	/* Check the parameters */
;;;431      assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;432      assert_param(IS_CMP_Negative(CMP_Negative_Channel));
;;;433      if(CMPx == CMP3)
000002  4290              CMP      r0,r2
000004  d10c              BNE      |L12.32|
;;;434    	{
;;;435    	CMP3->CMP_CFG &= (uint32_t) ~CMP_CFG_CMPRF;
000006  4a07              LDR      r2,|L12.36|
000008  3a30              SUBS     r2,r2,#0x30
00000a  6bd2              LDR      r2,[r2,#0x3c]
00000c  230f              MOVS     r3,#0xf
00000e  021b              LSLS     r3,r3,#8
000010  439a              BICS     r2,r2,r3
000012  4b04              LDR      r3,|L12.36|
000014  3b30              SUBS     r3,r3,#0x30
000016  63da              STR      r2,[r3,#0x3c]
;;;436      CMP3->CMP_CFG |= (uint32_t)  CMP_Negative_Channel;
000018  461a              MOV      r2,r3
00001a  6bd2              LDR      r2,[r2,#0x3c]
00001c  430a              ORRS     r2,r2,r1
00001e  63da              STR      r2,[r3,#0x3c]
                  |L12.32|
;;;437    	}	
;;;438    #endif	
;;;439    }
000020  4770              BX       lr
;;;440    
                          ENDP

000022  0000              DCW      0x0000
                  |L12.36|
                          DCD      0x40022170

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

                  CMP_SetPositiveChannel PROC
;;;520     */
;;;521    void CMP_SetPositiveChannel ( CMP_TypeDef* CMPx, CMP_Positive_TypeDef CMP_Positive_Channel )
000000  4a0f              LDR      r2,|L13.64|
;;;522    {
;;;523    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;524        /* Check the parameters */
;;;525        assert_param ( IS_CMP_ALL_PERIPH ( CMPx ) );
;;;526        assert_param ( IS_CMP_Positive ( CMP_Positive_Channel ) );
;;;527    
;;;528        CMPx->CMP_CFG &= ( uint32_t ) ~ ( CMP_CFG_CMPIS | CMP_CFG_CMPP );
;;;529        CMPx->CMP_CFG |= ( uint32_t ) CMP_Positive_Channel;
;;;530    #elif  defined(SC32f15xx)
;;;531    		/* Check the parameters */
;;;532    		assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;533    		assert_param(IS_CMP_Positive(CMP_Positive_Channel));
;;;534    		if(CMPx == CMP_0)
000002  4290              CMP      r0,r2
000004  d10b              BNE      |L13.30|
;;;535    		{
;;;536    		CMP->CMP_CFG &= (uint32_t) ~(CMPX_CFG_CMPPS);
000006  4a0e              LDR      r2,|L13.64|
000008  3a10              SUBS     r2,r2,#0x10
00000a  69d2              LDR      r2,[r2,#0x1c]
00000c  230c              MOVS     r3,#0xc
00000e  439a              BICS     r2,r2,r3
000010  4b0b              LDR      r3,|L13.64|
000012  3b10              SUBS     r3,r3,#0x10
000014  61da              STR      r2,[r3,#0x1c]
;;;537    		CMP->CMP_CFG |= (uint32_t) CMP_Positive_Channel;
000016  461a              MOV      r2,r3
000018  69d2              LDR      r2,[r2,#0x1c]
00001a  430a              ORRS     r2,r2,r1
00001c  61da              STR      r2,[r3,#0x1c]
                  |L13.30|
;;;538    		}
;;;539    		if(CMPx == CMP3)
00001e  4a08              LDR      r2,|L13.64|
000020  3220              ADDS     r2,r2,#0x20
000022  4290              CMP      r0,r2
000024  d10b              BNE      |L13.62|
;;;540    		{
;;;541    		CMP3->CMP_CFG &= (uint32_t) ~(CMP_CFG_CMPPS);
000026  4a06              LDR      r2,|L13.64|
000028  3a10              SUBS     r2,r2,#0x10
00002a  6bd2              LDR      r2,[r2,#0x3c]
00002c  230c              MOVS     r3,#0xc
00002e  439a              BICS     r2,r2,r3
000030  4b03              LDR      r3,|L13.64|
000032  3b10              SUBS     r3,r3,#0x10
000034  63da              STR      r2,[r3,#0x3c]
;;;542    		CMP3->CMP_CFG |= (uint32_t) CMP_Positive_Channel;		
000036  461a              MOV      r2,r3
000038  6bd2              LDR      r2,[r2,#0x3c]
00003a  430a              ORRS     r2,r2,r1
00003c  63da              STR      r2,[r3,#0x3c]
                  |L13.62|
;;;543    		}
;;;544    #endif	
;;;545    }
00003e  4770              BX       lr
;;;546    
                          ENDP

                  |L13.64|
                          DCD      0x40022150

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

                  CMP_SetTriggerMode PROC
;;;221     */
;;;222    void CMP_SetTriggerMode(CMP_TypeDef* CMPx, uint32_t CMP_TriggerMode)
000000  b510              PUSH     {r4,lr}
;;;223    {
000002  4602              MOV      r2,r0
;;;224    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;225        uint32_t tmpreg = 0;
;;;226        /* Check parameters */
;;;227        assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;228        assert_param(IS_CMP_TRIGGER(CMP_TriggerMode));
;;;229    
;;;230        tmpreg = CMPx->CMP_CFG;
;;;231        /* Clear trigger mode bits */
;;;232        tmpreg &= ~CMP_CFG_CMPIM;
;;;233        /* Set new trigger mode */
;;;234        tmpreg |= CMP_TriggerMode;
;;;235    
;;;236        CMPx->CMP_CFG = tmpreg;
;;;237    
;;;238    #elif defined(SC32f15xx)
;;;239        uint32_t tmpreg = 0;
000004  2000              MOVS     r0,#0
;;;240        assert_param(IS_CMP_ALL_PERIPH(CMPx));
;;;241        assert_param(IS_CMP_TRIGGER(CMP_TriggerMode));
;;;242    
;;;243        if(CMPx == CMP_0)
000006  4b23              LDR      r3,|L14.148|
000008  429a              CMP      r2,r3
00000a  d10d              BNE      |L14.40|
;;;244        {
;;;245            tmpreg = CMP->CMP_CFG;
00000c  4b21              LDR      r3,|L14.148|
00000e  3b10              SUBS     r3,r3,#0x10
000010  69d8              LDR      r0,[r3,#0x1c]
;;;246            tmpreg &= ~CMPX_CFG_CMPIM;
000012  2460              MOVS     r4,#0x60
000014  4603              MOV      r3,r0
000016  43a3              BICS     r3,r3,r4
000018  4618              MOV      r0,r3
;;;247            tmpreg |= CMP_TriggerMode;
00001a  4603              MOV      r3,r0
00001c  430b              ORRS     r3,r3,r1
00001e  4618              MOV      r0,r3
;;;248            CMP->CMP_CFG = tmpreg;
000020  4b1c              LDR      r3,|L14.148|
000022  3b10              SUBS     r3,r3,#0x10
000024  61d8              STR      r0,[r3,#0x1c]
000026  e034              B        |L14.146|
                  |L14.40|
;;;249        }
;;;250        else if(CMPx == CMP_1)
000028  4b1a              LDR      r3,|L14.148|
00002a  1c5b              ADDS     r3,r3,#1
00002c  429a              CMP      r2,r3
00002e  d10d              BNE      |L14.76|
;;;251        {
;;;252            tmpreg = CMP->CMP_CFG1;
000030  4b18              LDR      r3,|L14.148|
000032  3b10              SUBS     r3,r3,#0x10
000034  6a18              LDR      r0,[r3,#0x20]
;;;253            tmpreg &= ~CMPX_CFG_CMPIM;
000036  2460              MOVS     r4,#0x60
000038  4603              MOV      r3,r0
00003a  43a3              BICS     r3,r3,r4
00003c  4618              MOV      r0,r3
;;;254            tmpreg |= CMP_TriggerMode;
00003e  4603              MOV      r3,r0
000040  430b              ORRS     r3,r3,r1
000042  4618              MOV      r0,r3
;;;255            CMP->CMP_CFG1 = tmpreg;
000044  4b13              LDR      r3,|L14.148|
000046  3b10              SUBS     r3,r3,#0x10
000048  6218              STR      r0,[r3,#0x20]
00004a  e022              B        |L14.146|
                  |L14.76|
;;;256        }
;;;257        else if(CMPx == CMP_2)
00004c  4b11              LDR      r3,|L14.148|
00004e  1c9b              ADDS     r3,r3,#2
000050  429a              CMP      r2,r3
000052  d10d              BNE      |L14.112|
;;;258        {
;;;259            tmpreg = CMP->CMP_CFG2;
000054  4b0f              LDR      r3,|L14.148|
000056  3b10              SUBS     r3,r3,#0x10
000058  6a58              LDR      r0,[r3,#0x24]
;;;260            tmpreg &= ~CMPX_CFG_CMPIM;
00005a  2460              MOVS     r4,#0x60
00005c  4603              MOV      r3,r0
00005e  43a3              BICS     r3,r3,r4
000060  4618              MOV      r0,r3
;;;261            tmpreg |= CMP_TriggerMode;
000062  4603              MOV      r3,r0
000064  430b              ORRS     r3,r3,r1
000066  4618              MOV      r0,r3
;;;262            CMP->CMP_CFG2 = tmpreg;
000068  4b0a              LDR      r3,|L14.148|
00006a  3b10              SUBS     r3,r3,#0x10
00006c  6258              STR      r0,[r3,#0x24]
00006e  e010              B        |L14.146|
                  |L14.112|
;;;263        }
;;;264        else if(CMPx == CMP3)
000070  4b08              LDR      r3,|L14.148|
000072  3320              ADDS     r3,r3,#0x20
000074  429a              CMP      r2,r3
000076  d10c              BNE      |L14.146|
;;;265        {
;;;266            tmpreg = CMP3->CMP_CFG;
000078  4b06              LDR      r3,|L14.148|
00007a  3b10              SUBS     r3,r3,#0x10
00007c  6bd8              LDR      r0,[r3,#0x3c]
;;;267            tmpreg &= ~CMP_CFG_CMPIM;
00007e  2460              MOVS     r4,#0x60
000080  4603              MOV      r3,r0
000082  43a3              BICS     r3,r3,r4
000084  4618              MOV      r0,r3
;;;268            tmpreg |= CMP_TriggerMode;
000086  4603              MOV      r3,r0
000088  430b              ORRS     r3,r3,r1
00008a  4618              MOV      r0,r3
;;;269            CMP3->CMP_CFG = tmpreg;
00008c  4b01              LDR      r3,|L14.148|
00008e  3b10              SUBS     r3,r3,#0x10
000090  63d8              STR      r0,[r3,#0x3c]
                  |L14.146|
;;;270        }
;;;271    #endif
;;;272    }
000092  bd10              POP      {r4,pc}
;;;273    
                          ENDP

                  |L14.148|
                          DCD      0x40022150

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

                  CMP_StructInit PROC
;;;278      */
;;;279    void CMP_StructInit ( CMP_InitTypeDef* CMP_InitStruct )
000000  2100              MOVS     r1,#0
;;;280    {
;;;281    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;282        /* Set the default configuration */
;;;283        CMP_InitStruct->CMP_Negative = CMP_Negative_CMPR;
;;;284        CMP_InitStruct->CMP_Positive = CMP_Positive_CMP0;
;;;285        CMP_InitStruct->CMP_TriggerMode = CMP_TriggerMode_Disable;
;;;286    #elif defined(SC32f15xx)
;;;287        /* Set the default configuration */
;;;288    
;;;289        CMP_InitStruct->CMP_Negative     = CMP0_1_2NegativeSelect_CMPxN;
000002  8001              STRH     r1,[r0,#0]
;;;290        CMP_InitStruct->CMP_Positive     = CMP0_Positive_CMP0P;
000004  8041              STRH     r1,[r0,#2]
;;;291        CMP_InitStruct->CMP_VREF         = CMP0_1_2RefSource_VDD;
000006  8081              STRH     r1,[r0,#4]
;;;292        CMP_InitStruct->CMP_CMPRF        = CMP3_Negative_1D16CMP_VREF;
000008  21ff              MOVS     r1,#0xff
00000a  3101              ADDS     r1,#1
00000c  80c1              STRH     r1,[r0,#6]
;;;293        CMP_InitStruct->CMP_TriggerMode  = CMP0_1_2TriggerMode_Disable;
00000e  2100              MOVS     r1,#0
000010  8101              STRH     r1,[r0,#8]
;;;294        CMP_InitStruct->CMP_HYS          = CMP_HYS_0mV;	
000012  8141              STRH     r1,[r0,#0xa]
;;;295    #endif
;;;296    }
000014  4770              BX       lr
;;;297    
                          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 ***
