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

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

                  LEDPWM_ClearFlag PROC
;;;409     */
;;;410    void LEDPWM_ClearFlag ( uint16_t LEDPWM_FLAG )
000000  4901              LDR      r1,|L1.8|
;;;411    {
;;;412        /* Check the parameters */
;;;413        assert_param ( IS_GET_LEDPWM_FLAG ( LEDPWM_FLAG ) );
;;;414    
;;;415        /* Clear the flags */
;;;416        LEDPWM->LEDPWM_STS = ( uint16_t ) LEDPWM_FLAG;
000002  6088              STR      r0,[r1,#8]
;;;417    }
000004  4770              BX       lr
;;;418    
                          ENDP

000006  0000              DCW      0x0000
                  |L1.8|
                          DCD      0x40022300

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

                  LEDPWM_Cmd PROC
;;;111     */
;;;112    void LEDPWM_Cmd ( FunctionalState NewState )
000000  4905              LDR      r1,|L2.24|
;;;113    {
;;;114        /* Check the parameters */
;;;115        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;116    
;;;117        if ( NewState != DISABLE )
000002  2800              CMP      r0,#0
;;;118        {
;;;119            /* Enable the LEDPWM Counter */
;;;120            LEDPWM->LEDPWM_CON |= LEDPWM_CON_ENPWM;
;;;121        }
;;;122        else
;;;123        {
;;;124            /* Disable the LEDPWM Counter */
;;;125            LEDPWM->LEDPWM_CON &= ( uint16_t ) ~LEDPWM_CON_ENPWM;
000004  6808              LDR      r0,[r1,#0]
000006  d002              BEQ      |L2.14|
000008  2280              MOVS     r2,#0x80              ;120
00000a  4310              ORRS     r0,r0,r2              ;120
00000c  e001              B        |L2.18|
                  |L2.14|
00000e  4a03              LDR      r2,|L2.28|
000010  4010              ANDS     r0,r0,r2
                  |L2.18|
000012  6008              STR      r0,[r1,#0]            ;120
;;;126        }
;;;127    }
000014  4770              BX       lr
;;;128    
                          ENDP

000016  0000              DCW      0x0000
                  |L2.24|
                          DCD      0x40022300
                  |L2.28|
                          DCD      0x0000ff7f

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

                  LEDPWM_DeInit PROC
;;;44      */
;;;45     void LEDPWM_DeInit ( void )
000000  b510              PUSH     {r4,lr}
;;;46     {
;;;47         /* Enable LEDPWM reset state */
;;;48         RCC_APB2PeriphResetCmd ( RCC_APB2Periph_LEDPWM, ENABLE );
000002  2101              MOVS     r1,#1
000004  4608              MOV      r0,r1
000006  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;49         /* Disable LEDPWM reset state */
;;;50         RCC_APB2PeriphResetCmd ( RCC_APB2Periph_LEDPWM, DISABLE );
00000a  2100              MOVS     r1,#0
00000c  2001              MOVS     r0,#1
00000e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;51     }
000012  bd10              POP      {r4,pc}
;;;52     
                          ENDP


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

                  LEDPWM_GetCycle PROC
;;;189     */
;;;190    uint8_t LEDPWM_GetCycle()
000000  4801              LDR      r0,|L4.8|
;;;191    {
;;;192        /* Get the period value of LEDPWM */
;;;193        return ( uint8_t ) LEDPWM->LEDPWM_CYCLE;
000002  6980              LDR      r0,[r0,#0x18]
000004  b2c0              UXTB     r0,r0
;;;194    }
000006  4770              BX       lr
;;;195    
                          ENDP

                  |L4.8|
                          DCD      0x40022300

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

                  LEDPWM_GetDuty PROC
;;;314     */
;;;315    uint8_t LEDPWM_GetDuty ( LEDPWM_Channel_Typedef LEDPWM_Channel )
000000  2201              MOVS     r2,#1
;;;316    {
000002  4603              MOV      r3,r0
;;;317        uint8_t tmpvalue ;
;;;318        uint32_t tmpchannel;
;;;319        /* Check the parameters */
;;;320        assert_param ( IS_LEDPWM_CHANNEL ( LEDPWM_Channel ) );
;;;321    
;;;322        tmpchannel = 1;
;;;323    #if defined (SC32f10xx) || (SC32f12xx)
;;;324        for ( tmpvalue = 0; tmpvalue < 32; tmpvalue++ )
000004  2100              MOVS     r1,#0
                  |L5.6|
;;;325        {
;;;326            if ( ( uint32_t ) LEDPWM_Channel & tmpchannel )
000006  4213              TST      r3,r2
000008  d005              BEQ      |L5.22|
;;;327            {
;;;328                return ( uint16_t ) ( LEDPWM->LEDPWM_DT[tmpvalue] );
00000a  0088              LSLS     r0,r1,#2
00000c  4905              LDR      r1,|L5.36|
00000e  1840              ADDS     r0,r0,r1
000010  6b00              LDR      r0,[r0,#0x30]
000012  b2c0              UXTB     r0,r0
;;;329            }
;;;330            tmpchannel = tmpchannel << 1;
;;;331        }
;;;332    
;;;333    #endif
;;;334        return 0;
;;;335    }
000014  4770              BX       lr
                  |L5.22|
000016  1c49              ADDS     r1,r1,#1              ;330
000018  0052              LSLS     r2,r2,#1              ;330
00001a  b2c9              UXTB     r1,r1                 ;324
00001c  2920              CMP      r1,#0x20              ;324
00001e  d3f2              BCC      |L5.6|
000020  2000              MOVS     r0,#0                 ;334
000022  4770              BX       lr
;;;336    
                          ENDP

                  |L5.36|
                          DCD      0x40022300

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

                  LEDPWM_GetFlagStatus PROC
;;;386     */
;;;387    FlagStatus LEDPWM_GetFlagStatus ( uint16_t LEDPWM_FLAG )
000000  4a03              LDR      r2,|L6.16|
;;;388    {
000002  4601              MOV      r1,r0
;;;389        ITStatus bitstatus = RESET;
;;;390        /* Check the parameters */
;;;391        assert_param ( IS_LEDPWM_FLAG ( LEDPWM_FLAG ) );
;;;392    
;;;393        if ( ( LEDPWM->LEDPWM_STS & LEDPWM_FLAG ) != ( uint16_t ) RESET )
000004  6892              LDR      r2,[r2,#8]
000006  2000              MOVS     r0,#0                 ;389
000008  420a              TST      r2,r1
00000a  d000              BEQ      |L6.14|
;;;394        {
;;;395            bitstatus = SET;
00000c  2001              MOVS     r0,#1
                  |L6.14|
;;;396        }
;;;397        else
;;;398        {
;;;399            bitstatus = RESET;
;;;400        }
;;;401        return bitstatus;
;;;402    }
00000e  4770              BX       lr
;;;403    
                          ENDP

                  |L6.16|
                          DCD      0x40022300

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

                  LEDPWM_GetPrescaler PROC
;;;167     */
;;;168    LEDPWM_Prescaler_TypeDef LEDPWM_GetPrescaler ( void )
000000  4802              LDR      r0,|L7.12|
;;;169    {
;;;170        /* Get the CKD value */
;;;171        return ( LEDPWM_Prescaler_TypeDef ) ( LEDPWM->LEDPWM_CON & LEDPWM_CON_PWMCLK );
000002  6800              LDR      r0,[r0,#0]
000004  0700              LSLS     r0,r0,#28
000006  0f00              LSRS     r0,r0,#28
;;;172    }
000008  4770              BX       lr
;;;173    
                          ENDP

00000a  0000              DCW      0x0000
                  |L7.12|
                          DCD      0x40022300

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

                  LEDPWM_ITConfig PROC
;;;360     */
;;;361    void LEDPWM_ITConfig ( uint16_t LEDPWM_IT, FunctionalState NewState )
000000  4a05              LDR      r2,|L8.24|
;;;362    {
;;;363        /* Check the parameters */
;;;364        assert_param ( IS_LEDPWM_IT ( LEDPWM_IT ) );
;;;365        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;366    
;;;367        if ( NewState != DISABLE )
000002  2900              CMP      r1,#0
;;;368        {
;;;369            /* Enable the Interrupt sources */
;;;370            LEDPWM->LEDPWM_CON |= LEDPWM_IT;
;;;371        }
;;;372        else
;;;373        {
;;;374            /* Disable the Interrupt sources */
;;;375            LEDPWM->LEDPWM_CON &= ( uint16_t ) ~LEDPWM_IT;
000004  6811              LDR      r1,[r2,#0]
000006  d001              BEQ      |L8.12|
000008  4301              ORRS     r1,r1,r0              ;370
00000a  e002              B        |L8.18|
                  |L8.12|
00000c  43c0              MVNS     r0,r0
00000e  b280              UXTH     r0,r0
000010  4001              ANDS     r1,r1,r0
                  |L8.18|
000012  6011              STR      r1,[r2,#0]            ;370
;;;376        }
;;;377    }
000014  4770              BX       lr
;;;378    
                          ENDP

000016  0000              DCW      0x0000
                  |L8.24|
                          DCD      0x40022300

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

                  LEDPWM_Init PROC
;;;75      */
;;;76     void LEDPWM_Init ( LEDPWM_InitTypeDef* LEDPWM_InitStruct )
000000  b510              PUSH     {r4,lr}
;;;77     {
;;;78         uint32_t tmpreg;
;;;79     
;;;80         /*---------------------------- LEDPWM LEDPWM_CON Configuration ------------------------*/
;;;81         /* Get the LEDPWM LEDPWM_CON value */
;;;82         tmpreg = LEDPWM->LEDPWM_CON;
000002  4908              LDR      r1,|L9.36|
000004  680a              LDR      r2,[r1,#0]
;;;83         /* Clear LEDPWMCLK, LEDPWMMD0 and LEDPWMMD1 SPR bits */
;;;84         tmpreg &= ( uint32_t ) ~ ( LEDPWM_CON_PWMCLK | LEDPWM_CON_PWMMD0 );
000006  234f              MOVS     r3,#0x4f
000008  439a              BICS     r2,r2,r3
;;;85         /* Configure LEDPWM: Prescaler, AlignedMode and WorkMode */
;;;86         /* Set LEDPWMCLK bits according to Prescaler value */
;;;87         /* Set LEDPWMMD0 bit according to AlignedMode value */
;;;88         /* Set LEDPWMMD1 bit according to WorkMode value */
;;;89         tmpreg |= ( uint32_t ) ( LEDPWM_InitStruct->LEDPWM_Prescaler | LEDPWM_InitStruct->LEDPWM_AlignedMode );
00000a  8803              LDRH     r3,[r0,#0]
00000c  8844              LDRH     r4,[r0,#2]
00000e  4323              ORRS     r3,r3,r4
000010  4313              ORRS     r3,r3,r2
;;;90     
;;;91         /* Write to LEDPWM LEDPWM_CON */
;;;92         LEDPWM->LEDPWM_CON = tmpreg;
000012  600b              STR      r3,[r1,#0]
;;;93     #if defined(SC32f10xx) || defined(SC32f12xx)
;;;94         /* Write to LEDPWM LEDPWM_CHN */
;;;95         LEDPWM->LEDPWM_CHN = LEDPWM_InitStruct->LEDPWM_OutputChannel;
000014  6882              LDR      r2,[r0,#8]
000016  604a              STR      r2,[r1,#4]
;;;96     
;;;97         /* Write to LEDPWM LEDPWM_INV */
;;;98         LEDPWM->LEDPWM_INV = LEDPWM_InitStruct->LEDPWM_LowPolarityChannl;
000018  6902              LDR      r2,[r0,#0x10]
00001a  60ca              STR      r2,[r1,#0xc]
;;;99     
;;;100    #endif
;;;101        /* Write to LEDPWM LEDPWM_CYCLE */
;;;102        LEDPWM->LEDPWM_CYCLE = LEDPWM_InitStruct->LEDPWM_Cycle;
00001c  7900              LDRB     r0,[r0,#4]
00001e  6188              STR      r0,[r1,#0x18]
;;;103    }
000020  bd10              POP      {r4,pc}
;;;104    
                          ENDP

000022  0000              DCW      0x0000
                  |L9.36|
                          DCD      0x40022300

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

                  LEDPWM_SetCycle PROC
;;;179     */
;;;180    void LEDPWM_SetCycle ( uint8_t LEDPWM_Cycle )
000000  4901              LDR      r1,|L10.8|
;;;181    {
;;;182        /* Set the ReloadData Register value */
;;;183        LEDPWM->LEDPWM_CYCLE = LEDPWM_Cycle;
000002  6188              STR      r0,[r1,#0x18]
;;;184    }
000004  4770              BX       lr
;;;185    
                          ENDP

000006  0000              DCW      0x0000
                  |L10.8|
                          DCD      0x40022300

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

                  LEDPWM_SetDuty PROC
;;;245     */
;;;246    void LEDPWM_SetDuty ( LEDPWM_Channel_Typedef LEDPWM_Channel, uint8_t LEDPWM_Duty )
000000  b530              PUSH     {r4,r5,lr}
;;;247    {
;;;248        uint8_t tmpvalue;
;;;249        uint32_t tmpchannel;
;;;250        /* Check the parameters */
;;;251        assert_param ( IS_LEDPWM_CHANNEL ( LEDPWM_Channel ) );
;;;252    #if defined (SC32f10xx) || (SC32f12xx)
;;;253        tmpchannel = 1;
000002  2301              MOVS     r3,#1
;;;254        for ( tmpvalue = 0; tmpvalue < 32; tmpvalue++ )
;;;255        {
;;;256            if ( ( uint32_t ) LEDPWM_Channel & tmpchannel )
;;;257            {
;;;258                LEDPWM->LEDPWM_DT[tmpvalue] = LEDPWM_Duty;
000004  4c06              LDR      r4,|L11.32|
000006  4605              MOV      r5,r0                 ;247
000008  2200              MOVS     r2,#0                 ;254
                  |L11.10|
00000a  421d              TST      r5,r3                 ;256
00000c  d002              BEQ      |L11.20|
00000e  0090              LSLS     r0,r2,#2
000010  1900              ADDS     r0,r0,r4
000012  6301              STR      r1,[r0,#0x30]
                  |L11.20|
;;;259            }
;;;260            tmpchannel = tmpchannel << 1;
000014  1c52              ADDS     r2,r2,#1
000016  005b              LSLS     r3,r3,#1
000018  b2d2              UXTB     r2,r2                 ;254
00001a  2a20              CMP      r2,#0x20              ;254
00001c  d3f5              BCC      |L11.10|
;;;261        }
;;;262    
;;;263    #endif
;;;264    }
00001e  bd30              POP      {r4,r5,pc}
;;;265    
                          ENDP

                  |L11.32|
                          DCD      0x40022300

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

                  LEDPWM_SetPrescaler PROC
;;;142     */
;;;143    void LEDPWM_SetPrescaler ( LEDPWM_Prescaler_TypeDef LEDPWM_Prescaler )
000000  4904              LDR      r1,|L12.20|
;;;144    {
;;;145        /* Check the parameters */
;;;146        assert_param ( IS_LEDPWM_PRESCALER ( LEDPWM_Prescaler ) );
;;;147    
;;;148        /* Reset the CKD Bits */
;;;149        LEDPWM->LEDPWM_CON &= ( uint16_t ) ~ ( LEDPWM_CON_PWMCLK );
000002  680a              LDR      r2,[r1,#0]
000004  4b04              LDR      r3,|L12.24|
000006  401a              ANDS     r2,r2,r3
000008  600a              STR      r2,[r1,#0]
;;;150    
;;;151        /* Set the CKD value */
;;;152        LEDPWM->LEDPWM_CON |= LEDPWM_Prescaler;
00000a  680a              LDR      r2,[r1,#0]
00000c  4302              ORRS     r2,r2,r0
00000e  600a              STR      r2,[r1,#0]
;;;153    }
000010  4770              BX       lr
;;;154    
                          ENDP

000012  0000              DCW      0x0000
                  |L12.20|
                          DCD      0x40022300
                  |L12.24|
                          DCD      0x0000fff0

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

                  LEDPWM_StructInit PROC
;;;57       */
;;;58     void LEDPWM_StructInit ( LEDPWM_InitTypeDef* LEDPWM_InitStruct )
000000  2100              MOVS     r1,#0
;;;59     {
;;;60         /* Set the default configuration */
;;;61         LEDPWM_InitStruct->LEDPWM_AlignedMode = LEDPWM_AlignmentMode_Edge;
000002  8041              STRH     r1,[r0,#2]
;;;62         LEDPWM_InitStruct->LEDPWM_Cycle = 0x0000;
000004  7101              STRB     r1,[r0,#4]
;;;63     #if defined(SC32f10xx) || defined(SC32f12xx)
;;;64         LEDPWM_InitStruct->LEDPWM_LowPolarityChannl = LEDPWMChannel_Less;
000006  6101              STR      r1,[r0,#0x10]
;;;65         LEDPWM_InitStruct->LEDPWM_OutputChannel = LEDPWMChannel_Less;
000008  6141              STR      r1,[r0,#0x14]
00000a  6081              STR      r1,[r0,#8]
;;;66     
;;;67     #endif
;;;68         LEDPWM_InitStruct->LEDPWM_Prescaler = LEDPWM_PRESCALER_DIV1;
00000c  60c1              STR      r1,[r0,#0xc]
00000e  8001              STRH     r1,[r0,#0]
;;;69     }
000010  4770              BX       lr
;;;70     
                          ENDP


;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
