; 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\led_example.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\led_example.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\led_example.crf ..\Apps\LED_Example.c]
                          THUMB

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

                  LED_Example_Function PROC
;;;12     
;;;13     void LED_Example_Function(void)
000000  b50e              PUSH     {r1-r3,lr}
;;;14     {
;;;15       uint16_t i,j;
;;;16       LED_InitTypeDef LED_InitStruct; //定义LED初始化结构体变量
;;;17       
;;;18       /* 使能LED时钟 */
;;;19       RCC_APB2Cmd(ENABLE);  //LED外设挂载在APB2时钟上
000002  2001              MOVS     r0,#1
000004  f7fffffe          BL       RCC_APB2Cmd
;;;20       RCC_APB2PeriphClockCmd(RCC_APB2Periph_LCD_LED, ENABLE);
000008  2101              MOVS     r1,#1
00000a  2003              MOVS     r0,#3
00000c  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;21       RCC_APB2PeriphClockCmd(RCC_APB2Periph_LEDPWM, ENABLE);
000010  2101              MOVS     r1,#1
000012  4608              MOV      r0,r1
000014  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;22       /* 结构体成员初始化 */
;;;23       LED_StructInit(&LED_InitStruct);
000018  4668              MOV      r0,sp
00001a  f7fffffe          BL       LED_StructInit
;;;24     #if defined(SC32f10xx)||defined(SC32f12xx)  
;;;25       LED_InitStruct.LED_Duty = LED_Duty_1_4_SEG4_27COM0_3;	//配置占空比为1/4，S4~S27为segment，C0~C3为common
00001e  20b0              MOVS     r0,#0xb0
000020  4669              MOV      r1,sp
000022  8048              STRH     r0,[r1,#2]
;;;26     #endif
;;;27       LED_InitStruct.LED_FrameFre = LED_FrameFre_B64Hz;	//帧频为B类型64Hz
000024  2000              MOVS     r0,#0
000026  8008              STRH     r0,[r1,#0]
;;;28       /* 使能COM管脚输出通道 */
;;;29       LED_InitStruct.LED_ComPin = LED_Channel_0 | LED_Channel_1 | LED_Channel_2 | LED_Channel_3;//C0~C3
000028  200f              MOVS     r0,#0xf
;;;30       /* 使能Sega管脚输出通道，每个位对应一个通道 */
;;;31       LED_InitStruct.LED_SegPin =  0x00000F00;//使能SEG8~11
00002a  9001              STR      r0,[sp,#4]
00002c  0200              LSLS     r0,r0,#8
;;;32       LED_Init(&LED_InitStruct);
00002e  9002              STR      r0,[sp,#8]
000030  4668              MOV      r0,sp
000032  f7fffffe          BL       LED_Init
;;;33       
;;;34       LED_Cmd(ENABLE);
000036  2001              MOVS     r0,#1
000038  f7fffffe          BL       LED_Cmd
;;;35       
;;;36       while(1)
;;;37       {
;;;38         for(i=0;i<1000;i++)//延时
;;;39         {
;;;40           for(j=0;j<2000;j++);
00003c  247d              MOVS     r4,#0x7d
00003e  0124              LSLS     r4,r4,#4
000040  1065              ASRS     r5,r4,#1              ;38
                  |L1.66|
000042  2100              MOVS     r1,#0                 ;38
                  |L1.68|
000044  2000              MOVS     r0,#0
                  |L1.70|
000046  1c40              ADDS     r0,r0,#1
000048  b280              UXTH     r0,r0
00004a  42a0              CMP      r0,r4
00004c  d3fb              BCC      |L1.70|
00004e  1c49              ADDS     r1,r1,#1
000050  b289              UXTH     r1,r1                 ;38
000052  42a9              CMP      r1,r5                 ;38
000054  d3f6              BCC      |L1.68|
;;;41         }	
;;;42         
;;;43         /* COM0~3 SEG4~7点亮 */
;;;44         LED_Write(LED_RAMRegister_8,0x0F);//COM0~3 SEG8点亮
000056  210f              MOVS     r1,#0xf
000058  2008              MOVS     r0,#8
00005a  f7fffffe          BL       LED_Write
;;;45         LED_Write(LED_RAMRegister_9,0x0F);//COM0~3 SEG9点亮
00005e  210f              MOVS     r1,#0xf
000060  2009              MOVS     r0,#9
000062  f7fffffe          BL       LED_Write
;;;46         LED_Write(LED_RAMRegister_10,0x0F);//COM0~3 SEG10点亮
000066  210f              MOVS     r1,#0xf
000068  200a              MOVS     r0,#0xa
00006a  f7fffffe          BL       LED_Write
;;;47         LED_Write(LED_RAMRegister_11,0x0F);//COM0~3 SEG11点亮
00006e  210f              MOVS     r1,#0xf
000070  200b              MOVS     r0,#0xb
000072  f7fffffe          BL       LED_Write
;;;48         
;;;49         for(i=0;i<1000;i++)//延时
000076  2100              MOVS     r1,#0
                  |L1.120|
;;;50         {
;;;51           for(j=0;j<2000;j++);
000078  2000              MOVS     r0,#0
                  |L1.122|
00007a  1c40              ADDS     r0,r0,#1
00007c  b280              UXTH     r0,r0
00007e  42a0              CMP      r0,r4
000080  d3fb              BCC      |L1.122|
000082  1c49              ADDS     r1,r1,#1
000084  b289              UXTH     r1,r1                 ;49
000086  42a9              CMP      r1,r5                 ;49
000088  d3f6              BCC      |L1.120|
;;;52         }	
;;;53         
;;;54         /* COM0~3 SEG4~7熄灭 */	
;;;55         LED_Write(LED_RAMRegister_8,0x00);//COM0~3 SEG8熄灭
00008a  2100              MOVS     r1,#0
00008c  2008              MOVS     r0,#8
00008e  f7fffffe          BL       LED_Write
;;;56         LED_Write(LED_RAMRegister_9,0x00);//COM0~3 SEG9熄灭
000092  2100              MOVS     r1,#0
000094  2009              MOVS     r0,#9
000096  f7fffffe          BL       LED_Write
;;;57         LED_Write(LED_RAMRegister_10,0x00);//COM0~3 SEG10熄灭
00009a  2100              MOVS     r1,#0
00009c  200a              MOVS     r0,#0xa
00009e  f7fffffe          BL       LED_Write
;;;58         LED_Write(LED_RAMRegister_11,0x00);//COM0~3 SEG11熄灭
0000a2  2100              MOVS     r1,#0
0000a4  200b              MOVS     r0,#0xb
0000a6  f7fffffe          BL       LED_Write
0000aa  e7ca              B        |L1.66|
;;;59         
;;;60       }
;;;61     }
;;;62     #endif
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\Apps\\LED_Example.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___13_LED_Example_c_d08d89fa____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___13_LED_Example_c_d08d89fa____REV16| PROC
#line 464

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
