; 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_adc.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\sc32f1xxx_adc.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_adc.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_adc.c]
                          THUMB

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

                  ADC_ClearFlag PROC
;;;398     */
;;;399    void ADC_ClearFlag ( ADC_TypeDef* ADCx, uint32_t ADC_FLAG )
000000  6041              STR      r1,[r0,#4]
;;;400    {
;;;401        /* Check the parameters */
;;;402        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;403    
;;;404        /* Clear the flags */
;;;405        ADCx->ADC_STS = ( uint32_t ) ADC_FLAG;
;;;406    }
000002  4770              BX       lr
;;;407    
                          ENDP


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

                  ADC_Cmd PROC
;;;116     */
;;;117    void ADC_Cmd ( ADC_TypeDef* ADCx, FunctionalState NewState )
000000  2201              MOVS     r2,#1
;;;118    {
;;;119        /* Check the parameters */
;;;120        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;121        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;122    
;;;123        if ( NewState != DISABLE )
;;;124        {
;;;125            /* Enable the ADC Counter */
;;;126            ADCx->ADC_CON |= ADC_CON_ADCEN;
000002  03d2              LSLS     r2,r2,#15
000004  2900              CMP      r1,#0                 ;123
;;;127        }
;;;128        else
;;;129        {
;;;130            /* Disable the ADC Counter */
;;;131            ADCx->ADC_CON &= ( uint32_t ) ~ADC_CON_ADCEN;
000006  6801              LDR      r1,[r0,#0]
000008  d001              BEQ      |L2.14|
00000a  4311              ORRS     r1,r1,r2              ;126
00000c  e000              B        |L2.16|
                  |L2.14|
00000e  4391              BICS     r1,r1,r2
                  |L2.16|
000010  6001              STR      r1,[r0,#0]            ;126
;;;132        }
;;;133    }
000012  4770              BX       lr
;;;134    
                          ENDP


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

                  ADC_ConvModeConfig PROC
;;;143     */
;;;144    void ADC_ConvModeConfig ( ADC_TypeDef* ADCx, ADC_ConvMode_TypeDef ADC_ConvMode )
000000  2201              MOVS     r2,#1
;;;145    {
;;;146        /* Check the parameters */
;;;147        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;148    
;;;149        if ( ADC_ConvMode != ADC_ConvMode_Single )
;;;150        {
;;;151            /* Enable the ADC Counter */
;;;152            ADCx->ADC_CON |= ADC_CON_CONT;
000002  02d2              LSLS     r2,r2,#11
000004  2900              CMP      r1,#0                 ;149
;;;153        }
;;;154        else
;;;155        {
;;;156            /* Disable the ADC Counter */
;;;157            ADCx->ADC_CON &= ( uint32_t ) ~ADC_CON_CONT;
000006  6801              LDR      r1,[r0,#0]
000008  d001              BEQ      |L3.14|
00000a  4311              ORRS     r1,r1,r2              ;152
00000c  e000              B        |L3.16|
                  |L3.14|
00000e  4391              BICS     r1,r1,r2
                  |L3.16|
000010  6001              STR      r1,[r0,#0]            ;152
;;;158        }
;;;159    }
000012  4770              BX       lr
;;;160    
                          ENDP


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

                  ADC_DMACmd PROC
;;;416     */
;;;417    void ADC_DMACmd ( ADC_TypeDef* ADCx, FunctionalState NewState )
000000  2201              MOVS     r2,#1
;;;418    {
;;;419    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;420        /* Check the parameters */
;;;421        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;422    
;;;423        if ( NewState != DISABLE )
;;;424        {
;;;425            /* Enable the selected ADC DMA requests */
;;;426            ADCx->ADC_CON |= ( uint32_t ) ADC_CON_DMAEN;
000002  0312              LSLS     r2,r2,#12
000004  2900              CMP      r1,#0                 ;423
;;;427        }
;;;428        else
;;;429        {
;;;430            /* Disable the selected ADC DMA requests */
;;;431            ADCx->ADC_CON &= ( uint32_t ) ~ADC_CON_DMAEN;
000006  6801              LDR      r1,[r0,#0]
000008  d001              BEQ      |L4.14|
00000a  4311              ORRS     r1,r1,r2              ;426
00000c  e000              B        |L4.16|
                  |L4.14|
00000e  4391              BICS     r1,r1,r2
                  |L4.16|
000010  6001              STR      r1,[r0,#0]            ;426
;;;432        }
;;;433    
;;;434    #endif
;;;435    }
000012  4770              BX       lr
;;;436    
                          ENDP


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

                  ADC_DeInit PROC
;;;45      */
;;;46     void ADC_DeInit ( ADC_TypeDef* ADCx )
000000  2100              MOVS     r1,#0
;;;47     {
;;;48     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;49         /* Check the parameters */
;;;50         assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;51     
;;;52         ADCx->ADC_CFG = ( uint32_t ) 0x00000000U;
000002  60c1              STR      r1,[r0,#0xc]
;;;53         ADCx->ADC_CON = ( uint32_t ) 0x00000000U;
000004  6001              STR      r1,[r0,#0]
;;;54         ADCx->ADC_VALUE = ( uint32_t ) 0x00000000U;
000006  6081              STR      r1,[r0,#8]
;;;55         ADCx->ADC_STS = ( uint32_t ) 0x00000001U;
000008  2101              MOVS     r1,#1
00000a  6041              STR      r1,[r0,#4]
;;;56     
;;;57     #endif
;;;58     }
00000c  4770              BX       lr
;;;59     
                          ENDP


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

                  ADC_GetChannel PROC
;;;239     */
;;;240    ADC_ChannelTypedef ADC_GetChannel ( ADC_TypeDef* ADCx )
000000  6800              LDR      r0,[r0,#0]
;;;241    {
;;;242    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;243        /* Check the parameters */
;;;244        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;245    
;;;246        /* Get the ADC channel type */
;;;247        return ( ADC_ChannelTypedef ) ( ADCx->ADC_CON & ADC_CON_ADCIS );
000002  06c0              LSLS     r0,r0,#27
000004  0ec0              LSRS     r0,r0,#27
;;;248    
;;;249    #endif	
;;;250    	
;;;251    }
000006  4770              BX       lr
;;;252    
                          ENDP


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

                  ADC_GetConversionValue PROC
;;;289     */
;;;290    uint16_t ADC_GetConversionValue ( ADC_TypeDef* ADCx )
000000  6880              LDR      r0,[r0,#8]
;;;291    {
;;;292        /* Check the parameters */
;;;293        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;294        /*Returns the result of the latest ADCx conversion */
;;;295        return ( uint16_t ) ADCx->ADC_VALUE;
000002  b280              UXTH     r0,r0
;;;296    }
000004  4770              BX       lr
;;;297    
                          ENDP


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

                  ADC_GetFlagStatus PROC
;;;367     */
;;;368    FlagStatus ADC_GetFlagStatus ( ADC_TypeDef* ADCx, uint32_t ADC_FLAG )
000000  4602              MOV      r2,r0
;;;369    {
;;;370        ITStatus bitstatus = RESET;
;;;371        /* Check the parameters */
;;;372        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;373    
;;;374        if ( ( ADCx->ADC_STS & ADC_FLAG ) != ( uint16_t ) RESET )
000002  6852              LDR      r2,[r2,#4]
000004  2000              MOVS     r0,#0                 ;370
000006  420a              TST      r2,r1
000008  d000              BEQ      |L8.12|
;;;375        {
;;;376            bitstatus = SET;
00000a  2001              MOVS     r0,#1
                  |L8.12|
;;;377        }
;;;378        else
;;;379        {
;;;380            bitstatus = RESET;
;;;381        }
;;;382        return bitstatus;
;;;383    }
00000c  4770              BX       lr
;;;384    
                          ENDP


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

                  ADC_ITConfig PROC
;;;330     */
;;;331    void ADC_ITConfig ( ADC_TypeDef* ADCx, uint16_t ADC_IT, FunctionalState NewState )
000000  2a00              CMP      r2,#0
;;;332    {
;;;333        /* Check the parameters */
;;;334        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;335        assert_param ( IS_ADC_IT ( ADC_IT ) );
;;;336        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;337    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;338        if ( NewState != DISABLE )
;;;339        {
;;;340            /* Enable the Interrupt sources */
;;;341            ADCx->ADC_CON |= ADC_IT;
;;;342        }
;;;343        else
;;;344        {
;;;345            /* Disable the Interrupt sources */
;;;346            ADCx->ADC_CON &= ( uint32_t ) ~ADC_IT;
000002  6802              LDR      r2,[r0,#0]
000004  d001              BEQ      |L9.10|
000006  430a              ORRS     r2,r2,r1              ;341
000008  e000              B        |L9.12|
                  |L9.10|
00000a  438a              BICS     r2,r2,r1
                  |L9.12|
00000c  6002              STR      r2,[r0,#0]            ;341
;;;347        }
;;;348    
;;;349    #endif
;;;350    }
00000e  4770              BX       lr
;;;351    
                          ENDP


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

                  ADC_Init PROC
;;;67      */
;;;68     void ADC_Init ( ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct )
000000  b510              PUSH     {r4,lr}
;;;69     {
;;;70     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;71         uint32_t tmpreg;
;;;72         /* Check the parameters */
;;;73         assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;74         assert_param ( IS_ADC_CONVMODE ( ADC_InitStruct->ADC_ConvMode ) );
;;;75         assert_param ( IS_ADC_PRESCALER ( ADC_InitStruct->ADC_Prescaler ) );
;;;76         assert_param ( IS_ADC_VREF ( ADC_InitStruct->ADC_VREF ) );
;;;77         assert_param ( IS_ADC_EAIN ( ADC_InitStruct->ADC_EAIN ) );
;;;78     
;;;79         tmpreg = ADCx->ADC_CON;
000002  6802              LDR      r2,[r0,#0]
;;;80         tmpreg &= ~ ( ADC_CON_ADCIS | ADC_CON_CONT | ADC_CON_LOWSP | ADC_CON_VREFS );
000004  4b05              LDR      r3,|L10.28|
;;;81         tmpreg |= ( ADC_InitStruct->ADC_Prescaler | ADC_InitStruct->ADC_VREF |
000006  688c              LDR      r4,[r1,#8]
000008  401a              ANDS     r2,r2,r3              ;80
00000a  680b              LDR      r3,[r1,#0]
00000c  4323              ORRS     r3,r3,r4
00000e  898c              LDRH     r4,[r1,#0xc]
000010  4314              ORRS     r4,r4,r2
000012  4323              ORRS     r3,r3,r4
;;;82                     ADC_InitStruct->ADC_ConvMode );
;;;83         ADCx->ADC_CON = tmpreg;
000014  6003              STR      r3,[r0,#0]
;;;84         ADCx->ADC_CFG = ADC_InitStruct->ADC_EAIN;
000016  6849              LDR      r1,[r1,#4]
000018  60c1              STR      r1,[r0,#0xc]
;;;85     
;;;86     #endif
;;;87     }
00001a  bd10              POP      {r4,pc}
;;;88     
                          ENDP

                  |L10.28|
                          DCD      0xffc8f7e0

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

                  ADC_SetChannel PROC
;;;191     */
;;;192    void ADC_SetChannel ( ADC_TypeDef* ADCx, ADC_ChannelTypedef ADC_Channel )
000000  6802              LDR      r2,[r0,#0]
;;;193    {
;;;194    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;195        uint32_t tmpreg;
;;;196        /* Check the parameters */
;;;197        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;198    
;;;199        tmpreg = ADCx->ADC_CON;
;;;200        tmpreg &= ( uint32_t ) ~ ( ADC_CON_ADCIS );
000002  0952              LSRS     r2,r2,#5
000004  0152              LSLS     r2,r2,#5
;;;201    
;;;202        /* Set the ADC channel type */
;;;203        tmpreg |= ADC_Channel;
000006  430a              ORRS     r2,r2,r1
;;;204    
;;;205        ADCx->ADC_CON = tmpreg;
000008  6002              STR      r2,[r0,#0]
;;;206    
;;;207    #endif
;;;208    }
00000a  4770              BX       lr
;;;209    
                          ENDP


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

                  ADC_SoftwareStartConv PROC
;;;274     */
;;;275    void ADC_SoftwareStartConv ( ADC_TypeDef* ADCx )
000000  6801              LDR      r1,[r0,#0]
;;;276    {
;;;277        /* Check the parameters */
;;;278        assert_param ( IS_ADC_ALL_PERIPH ( ADCx ) );
;;;279    
;;;280        /* Set the ADCS Bit */
;;;281        ADCx->ADC_CON |= ADC_CON_ADCS;
000002  2280              MOVS     r2,#0x80
000004  4311              ORRS     r1,r1,r2
000006  6001              STR      r1,[r0,#0]
;;;282    }
000008  4770              BX       lr
;;;283    
                          ENDP


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

                  ADC_StructInit PROC
;;;94       */
;;;95     void ADC_StructInit ( ADC_InitTypeDef* ADC_InitStruct )
000000  2100              MOVS     r1,#0
;;;96     {
;;;97         /* Set the default configuration */
;;;98         ADC_InitStruct->ADC_ConvMode = ADC_ConvMode_Single;
000002  8181              STRH     r1,[r0,#0xc]
;;;99         ADC_InitStruct->ADC_EAIN = ADC_EAIN_Less;
;;;100        ADC_InitStruct->ADC_Prescaler = ADC_Prescaler_3CLOCK;
000004  2201              MOVS     r2,#1
000006  0492              LSLS     r2,r2,#18
;;;101    
;;;102        ADC_InitStruct->ADC_VREF = ADC_VREF_VDD;
000008  6041              STR      r1,[r0,#4]
00000a  6002              STR      r2,[r0,#0]
00000c  6081              STR      r1,[r0,#8]
;;;103    
;;;104    	
;;;105    
;;;106    }
00000e  4770              BX       lr
;;;107    
                          ENDP


;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
