126 lines
4.8 KiB
Plaintext
126 lines
4.8 KiB
Plaintext
; generated by Component: ARM Compiler 5.06 update 4 (build 422) Tool: ArmCC [4d3604]
|
|
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\obj\gpio.o --asm_dir=.\lst\ --list_dir=.\lst\ --depend=.\obj\gpio.d --cpu=Cortex-M0 --apcs=interwork -O3 --diag_suppress=9931 -I..\..\..\Library\CMSIS\Include -I..\..\..\Library\Device\Nuvoton\Mini58Series\Include -I..\..\..\Library\StdDriver\inc -I..\..\Template -I..\..\..\Library\StdDriver\driver -I.\RTE\_Template -ID:\Keil_v5\ARM\PACK\Nuvoton\NuMicro_DFP\1.0.9\Device\Mini58\Include -ID:\Keil_v5\ARM\CMSIS\Include -D__MICROLIB -D__UVISION_VERSION=523 --omf_browse=.\obj\gpio.crf ..\..\..\Library\StdDriver\src\gpio.c]
|
|
THUMB
|
|
|
|
AREA ||i.GPIO_DisableInt||, CODE, READONLY, ALIGN=2
|
|
|
|
GPIO_DisableInt PROC
|
|
;;;86 */
|
|
;;;87 void GPIO_DisableInt(GPIO_T *gpio, uint32_t u32Pin)
|
|
000000 6982 LDR r2,[r0,#0x18]
|
|
;;;88 {
|
|
;;;89 gpio->INTTYPE &= ~(1UL << u32Pin);
|
|
000002 2301 MOVS r3,#1
|
|
000004 408b LSLS r3,r3,r1
|
|
000006 439a BICS r2,r2,r3
|
|
000008 6182 STR r2,[r0,#0x18]
|
|
;;;90 gpio->INTEN &= ~((0x00010001UL) << u32Pin);
|
|
00000a 69c2 LDR r2,[r0,#0x1c]
|
|
00000c 4b02 LDR r3,|L1.24|
|
|
00000e 408b LSLS r3,r3,r1
|
|
000010 439a BICS r2,r2,r3
|
|
000012 61c2 STR r2,[r0,#0x1c]
|
|
;;;91 }
|
|
000014 4770 BX lr
|
|
;;;92
|
|
ENDP
|
|
|
|
000016 0000 DCW 0x0000
|
|
|L1.24|
|
|
DCD 0x00010001
|
|
|
|
AREA ||i.GPIO_EnableInt||, CODE, READONLY, ALIGN=1
|
|
|
|
GPIO_EnableInt PROC
|
|
;;;69 */
|
|
;;;70 void GPIO_EnableInt(GPIO_T *gpio, uint32_t u32Pin, uint32_t u32IntAttribs)
|
|
000000 b510 PUSH {r4,lr}
|
|
;;;71 {
|
|
;;;72 gpio->INTTYPE |= (((u32IntAttribs >> 24) & 0xFFUL) << u32Pin);
|
|
000002 6983 LDR r3,[r0,#0x18]
|
|
000004 0e14 LSRS r4,r2,#24
|
|
000006 408c LSLS r4,r4,r1
|
|
000008 4323 ORRS r3,r3,r4
|
|
00000a 6183 STR r3,[r0,#0x18]
|
|
;;;73 gpio->INTEN |= ((u32IntAttribs & 0xFFFFFFUL) << u32Pin);
|
|
00000c 69c3 LDR r3,[r0,#0x1c]
|
|
00000e 0212 LSLS r2,r2,#8
|
|
000010 0a12 LSRS r2,r2,#8
|
|
000012 408a LSLS r2,r2,r1
|
|
000014 4313 ORRS r3,r3,r2
|
|
000016 61c3 STR r3,[r0,#0x1c]
|
|
;;;74 }
|
|
000018 bd10 POP {r4,pc}
|
|
;;;75
|
|
ENDP
|
|
|
|
|
|
AREA ||i.GPIO_SetMode||, CODE, READONLY, ALIGN=1
|
|
|
|
GPIO_SetMode PROC
|
|
;;;42 */
|
|
;;;43 void GPIO_SetMode(GPIO_T *gpio, uint32_t u32PinMask, uint32_t u32Mode)
|
|
000000 b5f0 PUSH {r4-r7,lr}
|
|
;;;44 {
|
|
;;;45 uint32_t i;
|
|
;;;46
|
|
;;;47 for (i=0; i<GPIO_PIN_MAX; i++) {
|
|
000002 2300 MOVS r3,#0
|
|
;;;48 if (u32PinMask & (1 << i)) {
|
|
000004 2501 MOVS r5,#1
|
|
000006 4694 MOV r12,r2 ;44
|
|
;;;49 gpio->MODE = (gpio->MODE & ~(0x3 << (i << 1))) | (u32Mode << (i << 1));
|
|
000008 2703 MOVS r7,#3
|
|
|L3.10|
|
|
00000a 462a MOV r2,r5 ;48
|
|
00000c 409a LSLS r2,r2,r3 ;48
|
|
00000e 420a TST r2,r1 ;48
|
|
000010 d009 BEQ |L3.38|
|
|
000012 6806 LDR r6,[r0,#0]
|
|
000014 005c LSLS r4,r3,#1
|
|
000016 463a MOV r2,r7
|
|
000018 40a2 LSLS r2,r2,r4
|
|
00001a 4396 BICS r6,r6,r2
|
|
00001c 4622 MOV r2,r4
|
|
00001e 4664 MOV r4,r12
|
|
000020 4094 LSLS r4,r4,r2
|
|
000022 4326 ORRS r6,r6,r4
|
|
000024 6006 STR r6,[r0,#0]
|
|
|L3.38|
|
|
000026 1c5b ADDS r3,r3,#1
|
|
000028 2b08 CMP r3,#8 ;47
|
|
00002a d3ee BCC |L3.10|
|
|
;;;50 }
|
|
;;;51 }
|
|
;;;52 }
|
|
00002c bdf0 POP {r4-r7,pc}
|
|
;;;53
|
|
ENDP
|
|
|
|
|
|
;*** Start embedded assembler ***
|
|
|
|
#line 1 "..\\..\\..\\Library\\StdDriver\\src\\gpio.c"
|
|
AREA ||.rev16_text||, CODE
|
|
THUMB
|
|
EXPORT |__asm___6_gpio_c_f8f858a7____REV16|
|
|
#line 388 "..\\..\\..\\Library\\CMSIS\\Include\\cmsis_armcc.h"
|
|
|__asm___6_gpio_c_f8f858a7____REV16| PROC
|
|
#line 389
|
|
|
|
rev16 r0, r0
|
|
bx lr
|
|
ENDP
|
|
AREA ||.revsh_text||, CODE
|
|
THUMB
|
|
EXPORT |__asm___6_gpio_c_f8f858a7____REVSH|
|
|
#line 402
|
|
|__asm___6_gpio_c_f8f858a7____REVSH| PROC
|
|
#line 403
|
|
|
|
revsh r0, r0
|
|
bx lr
|
|
ENDP
|
|
|
|
;*** End embedded assembler ***
|