⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uart_test.txt

📁 SMDK2442所有设备的驱动测试程序。运行monitor程序
💻 TXT
字号:
; generated by ARM C Compiler, ADS1.2 [Build 805]

; commandline [-errors .\err\uart_test.err -O0 -asm -g+ -cpu ARM920T -fs "-IC:\Program Files\ARM\ADSv1_2\INCLUDE"]
                          CODE32

                          AREA ||.text||, CODE, READONLY

                  Uart_Test PROC
;;;42     void Uart_Test(void)
;;;43     {
000000  e92d4010          STMFD    sp!,{r4,lr}
;;;44     	int i;
;;;45     	
;;;46     	Uart_Printf("\n======  UART Test program start ======\n");
000004  e28f00b4          ADR      r0,|L1.192|
000008  ebfffffe          BL       Uart_Printf
;;;47     		
;;;48     	while(1)
00000c  e1a00000          NOP      
                  |L1.16|
000010  e1a00000          NOP      
;;;49     	{
;;;50     		i=0;
000014  e3a04000          MOV      r4,#0
;;;51     		Uart_Printf("\n\n");
000018  e28f00cc          ADR      r0,|L1.236|
00001c  ebfffffe          BL       Uart_Printf
;;;52     		while(1)
000020  e1a00000          NOP      
                  |L1.36|
000024  e1a00000          NOP      
;;;53     		{   //display menu
;;;54     			Uart_Printf("%2d:%s",i,func_uart_test[i][1]);
000028  e59f00c0          LDR      r0,|L1.240|
00002c  e0800184          ADD      r0,r0,r4,LSL #3
000030  e1a01004          MOV      r1,r4
000034  e5902004          LDR      r2,[r0,#4]
000038  e28f00b4          ADR      r0,|L1.244|
00003c  ebfffffe          BL       Uart_Printf
;;;55     			i++;
000040  e2844001          ADD      r4,r4,#1
;;;56     			if((int)(func_uart_test[i][0])==0)
000044  e59f00a4          LDR      r0,|L1.240|
000048  e7900184          LDR      r0,[r0,r4,LSL #3]
00004c  e3500000          CMP      r0,#0
000050  1a000002          BNE      |L1.96|
;;;57     			{
;;;58     				Uart_Printf("\n");
000054  e28f00a0          ADR      r0,|L1.252|
000058  ebfffffe          BL       Uart_Printf
;;;59     				break;
00005c  ea000004          B        |L1.116|
;;;60     			}
;;;61     			if((i%4)==0)
                  |L1.96|
000060  e3140003          TST      r4,#3
000064  1a000001          BNE      |L1.112|
;;;62     			Uart_Printf("\n");
000068  e28f008c          ADR      r0,|L1.252|
00006c  ebfffffe          BL       Uart_Printf
;;;63     		}
                  |L1.112|
000070  eaffffeb          B        |L1.36|
;;;64     
;;;65     		Uart_Printf("\nPress Enter key to exit : ");
                  |L1.116|
000074  e28f0084          ADR      r0,|L1.256|
000078  ebfffffe          BL       Uart_Printf
;;;66     		i = Uart_GetIntNum();
00007c  ebfffffe          BL       Uart_GetIntNum
000080  e1a04000          MOV      r4,r0
;;;67     		if(i==-1) break;		// return.
000084  e3740001          CMN      r4,#1
000088  1a000000          BNE      |L1.144|
00008c  ea000008          B        |L1.180|
;;;68     		if(i>=0 && (i<((sizeof(func_uart_test)-1)/8)) )	// select and execute...
                  |L1.144|
000090  e3540000          CMP      r4,#0
000094  ba000005          BLT      |L1.176|
000098  e354000f          CMP      r4,#0xf
00009c  2a000003          BCS      |L1.176|
;;;69     			( (void (*)(void)) (func_uart_test[i][0]) )();
0000a0  e59f1048          LDR      r1,|L1.240|
0000a4  e7910184          LDR      r0,[r1,r4,LSL #3]
0000a8  e1a0e00f          MOV      lr,pc
0000ac  e1a0f000          MOV      pc,r0
;;;70     	}
                  |L1.176|
0000b0  eaffffd6          B        |L1.16|
;;;71     	
;;;72     	Uart_Printf("\n====== UART Test program end ======\n");
                  |L1.180|
0000b4  e28f0060          ADR      r0,|L1.284|
0000b8  ebfffffe          BL       Uart_Printf
;;;73     }
0000bc  e8bd8010          LDMFD    sp!,{r4,pc}
                  |L1.192|
0000c0  3d3d3d0a          DCB      "\n==="
0000c4  203d3d3d          DCB      "=== "
0000c8  52415520          DCB      " UAR"
0000cc  65542054          DCB      "T Te"
0000d0  70207473          DCB      "st p"
0000d4  72676f72          DCB      "rogr"
0000d8  73206d61          DCB      "am s"
0000dc  74726174          DCB      "tart"
0000e0  3d3d3d20          DCB      " ==="
0000e4  0a3d3d3d          DCB      "===\n"
0000e8  00000000          DCB      "\0\0\0\0"
                  |L1.236|
0000ec  00000a0a          DCB      "\n\n\0\0"
                  |L1.240|
0000f0  00000000          DCD      func_uart_test
                  |L1.244|
0000f4  3a643225          DCB      "%2d:"
0000f8  00007325          DCB      "%s\0\0"
                  |L1.252|
0000fc  0000000a          DCB      "\n\0\0\0"
                  |L1.256|
000100  6572500a          DCB      "\nPre"
000104  45207373          DCB      "ss E"
000108  7265746e          DCB      "nter"
00010c  79656b20          DCB      " key"
000110  206f7420          DCB      " to "
000114  74697865          DCB      "exit"
000118  00203a20          DCB      " : \0"
                  |L1.284|
00011c  3d3d3d0a          DCB      "\n==="
000120  203d3d3d          DCB      "=== "
000124  54524155          DCB      "UART"
000128  73655420          DCB      " Tes"
00012c  72702074          DCB      "t pr"
000130  6172676f          DCB      "ogra"
000134  6e65206d          DCB      "m en"
000138  3d3d2064          DCB      "d =="
00013c  3d3d3d3d          DCB      "===="
000140  0000000a          DCB      "\n\0\0\0"
                          ENDP



                          AREA ||.data||, DATA, ALIGN=2

                  ||.data$0||
                  func_uart_test
                          DCD      Test_Uart0_Int
                          DCD      ||.constdata$1||
                          DCD      Test_Uart0_Dma
                          DCD      ||.constdata$1||+0x10
                          DCD      Test_Uart0_Fifo
                          DCD      ||.constdata$1||+0x20
                          DCD      Test_Uart0_AfcTx
                          DCD      ||.constdata$1||+0x30
                          DCD      Test_Uart0_AfcRx
                          DCD      ||.constdata$1||+0x40
                          DCD      Test_Uart0_RxErr
                          DCD      ||.constdata$1||+0x50
                          DCD      Test_Uart1_Int
                          DCD      ||.constdata$1||+0x60
                          DCD      Test_Uart1_Dma
                          DCD      ||.constdata$1||+0x70
                          DCD      Test_Uart1_Fifo
                          DCD      ||.constdata$1||+0x80
                          DCD      Test_Uart1_AfcTx
                          DCD      ||.constdata$1||+0x90
                          DCD      Test_Uart1_AfcRx
                          DCD      ||.constdata$1||+0xa0
                          DCD      Test_Uart2_Int
                          DCD      ||.constdata$1||+0xb0
                          DCD      Test_Uart2_Dma
                          DCD      ||.constdata$1||+0xc0
                          DCD      Test_Uart2_Fifo
                          DCD      ||.constdata$1||+0xd0
                          DCD      Test_Uart0_Temp
                          DCD      ||.constdata$1||+0xe0
                          DCD      0x00000000
                          DCD      0x00000000


                          AREA ||.constdata||, DATA, READONLY, ALIGN=0

                  ||.constdata$1||
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x49,0x6e
                          DCB      0x74,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x44,0x4d
                          DCB      0x41,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x46,0x49
                          DCB      0x46,0x4f,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x41,0x46
                          DCB      0x43,0x20,0x54,0x78
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x41,0x46
                          DCB      0x43,0x20,0x52,0x78
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x52,0x78
                          DCB      0x45,0x72,0x72,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x31,0x20,0x49,0x6e
                          DCB      0x74,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x31,0x20,0x44,0x4d
                          DCB      0x41,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x31,0x20,0x46,0x49
                          DCB      0x46,0x4f,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x31,0x20,0x41,0x46
                          DCB      0x43,0x20,0x54,0x78
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x31,0x20,0x41,0x46
                          DCB      0x43,0x20,0x52,0x78
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x32,0x20,0x49,0x6e
                          DCB      0x74,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x32,0x20,0x44,0x4d
                          DCB      0x41,0x20,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x32,0x20,0x46,0x49
                          DCB      0x46,0x4f,0x20,0x20
                          DCB      0x20,0x20,0x20,0x00
                          DCB      0x55,0x41,0x52,0x54
                          DCB      0x30,0x20,0x74,0x65
                          DCB      0x6d,0x70,0x20,0x20
                          DCB      0x20,0x20,0x20,0x20
                          DCB      0x00


        END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -