📄 stm32f10x_gpio.lst
字号:
\ In section .XML, align 4, keep-with-next
443 void GPIO_EventOutputCmd(FunctionalState NewState)
444 {
445 /* Check the parameters */
446 assert_param(IS_FUNCTIONAL_STATE(NewState));
447
448 *(vu32 *) EVCR_EVOE_BB = (u32)NewState;
\ GPIO_EventOutputCmd:
\ 00000000 0149 LDR.N R1,??GPIO_EventOutputCmd_0 ;; 0x4220001c
\ 00000002 C0B2 UXTB R0,R0 ;; ZeroExtS R0,R0,#+24,#+24
\ 00000004 0860 STR R0,[R1, #+0]
449 }
\ 00000006 7047 BX LR ;; return
\ ??GPIO_EventOutputCmd_0:
\ 00000008 1C002042 DC32 0x4220001c
450
451 /*******************************************************************************
452 * Function Name : GPIO_PinRemapConfig
453 * Description : Changes the mapping of the specified pin.
454 * Input : - GPIO_Remap: selects the pin to remap.
455 * This parameter can be one of the following values:
456 * - GPIO_Remap_SPI1
457 * - GPIO_Remap_I2C1
458 * - GPIO_Remap_USART1
459 * - GPIO_Remap_USART2
460 * - GPIO_PartialRemap_USART3
461 * - GPIO_FullRemap_USART3
462 * - GPIO_PartialRemap_TIM1
463 * - GPIO_FullRemap_TIM1
464 * - GPIO_PartialRemap1_TIM2
465 * - GPIO_PartialRemap2_TIM2
466 * - GPIO_FullRemap_TIM2
467 * - GPIO_PartialRemap_TIM3
468 * - GPIO_FullRemap_TIM3
469 * - GPIO_Remap_TIM4
470 * - GPIO_Remap1_CAN
471 * - GPIO_Remap2_CAN
472 * - GPIO_Remap_PD01
473 * - GPIO_Remap_SWJ_NoJTRST
474 * - GPIO_Remap_SWJ_JTAGDisable
475 * - GPIO_Remap_SWJ_Disable
476 * - NewState: new state of the port pin remapping.
477 * This parameter can be: ENABLE or DISABLE.
478 * Output : None
479 * Return : None
480 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
481 void GPIO_PinRemapConfig(u32 GPIO_Remap, FunctionalState NewState)
482 {
\ GPIO_PinRemapConfig:
\ 00000000 71B4 PUSH {R0,R4-R6}
483 u32 tmp = 0x00, tmp1 = 0x00, tmpreg = 0x00, tmpmask = 0x00;
\ 00000002 0026 MOVS R6,#+0
\ 00000004 3200 MOVS R2,R6
\ 00000006 0026 MOVS R6,#+0
\ 00000008 3300 MOVS R3,R6
\ 0000000A 0026 MOVS R6,#+0
\ 0000000C 3400 MOVS R4,R6
\ 0000000E 0026 MOVS R6,#+0
\ 00000010 3500 MOVS R5,R6
484
485 /* Check the parameters */
486 assert_param(IS_GPIO_REMAP(GPIO_Remap));
487 assert_param(IS_FUNCTIONAL_STATE(NewState));
488
489 tmpreg = AFIO->MAPR;
\ 00000012 124E LDR.N R6,??GPIO_PinRemapConfig_0 ;; 0x40010004
\ 00000014 3668 LDR R6,[R6, #+0]
\ 00000016 3400 MOVS R4,R6
490
491 tmpmask = (GPIO_Remap & DBGAFR_POSITION_MASK) >> 0x10;
\ 00000018 10F47026 ANDS R6,R0,#0xF0000
\ 0000001C 350C LSRS R5,R6,#+16
492 tmp = GPIO_Remap & LSB_MASK;
\ 0000001E 86B2 UXTH R6,R0 ;; ZeroExtS R6,R0,#+16,#+16
\ 00000020 3200 MOVS R2,R6
493
494 if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
\ 00000022 8602 LSLS R6,R0,#+10
\ 00000024 04D5 BPL.N ??GPIO_PinRemapConfig_1
495 {
496 tmpreg &= DBGAFR_SWJCFG_MASK;
\ 00000026 2600 MOVS R6,R4
\ 00000028 7FF0E064 MVNS R4,#+117440512
\ 0000002C 3440 ANDS R4,R4,R6
\ 0000002E 07E0 B.N ??GPIO_PinRemapConfig_2
497 }
498 else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
\ ??GPIO_PinRemapConfig_1:
\ 00000030 C602 LSLS R6,R0,#+11
\ 00000032 04D5 BPL.N ??GPIO_PinRemapConfig_3
499 {
500 tmp1 = ((u32)0x03) << tmpmask;
\ 00000034 0326 MOVS R6,#+3
\ 00000036 AE40 LSLS R6,R6,R5
\ 00000038 3300 MOVS R3,R6
501 tmpreg &= ~tmp1;
\ 0000003A 9C43 BICS R4,R4,R3
\ 0000003C 00E0 B.N ??GPIO_PinRemapConfig_2
502 }
503 else
504 {
505 tmpreg &= ~tmp;
\ ??GPIO_PinRemapConfig_3:
\ 0000003E 9443 BICS R4,R4,R2
506 }
507
508 if (NewState != DISABLE)
\ ??GPIO_PinRemapConfig_2:
\ 00000040 C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 00000042 0029 CMP R1,#+0
\ 00000044 05D0 BEQ.N ??GPIO_PinRemapConfig_4
509 {
510 if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
\ 00000046 8602 LSLS R6,R0,#+10
\ 00000048 02D5 BPL.N ??GPIO_PinRemapConfig_5
511 {
512 tmpreg |= (tmp << 0x10);
\ 0000004A 54EA0244 ORRS R4,R4,R2, LSL #+16
\ 0000004E 00E0 B.N ??GPIO_PinRemapConfig_4
513 }
514 else
515 {
516 tmpreg |= tmp;
\ ??GPIO_PinRemapConfig_5:
\ 00000050 1443 ORRS R4,R4,R2
517 }
518 }
519 AFIO->MAPR = tmpreg;
\ ??GPIO_PinRemapConfig_4:
\ 00000052 024E LDR.N R6,??GPIO_PinRemapConfig_0 ;; 0x40010004
\ 00000054 3460 STR R4,[R6, #+0]
520 }
\ 00000056 01B0 ADD SP,SP,#+4
\ 00000058 70BC POP {R4-R6}
\ 0000005A 7047 BX LR ;; return
\ ??GPIO_PinRemapConfig_0:
\ 0000005C 04000140 DC32 0x40010004
521
522 /*******************************************************************************
523 * Function Name : GPIO_EXTILineConfig
524 * Description : Selects the GPIO pin used as EXTI Line.
525 * Input : - GPIO_PortSource: selects the GPIO port to be used as
526 * source for EXTI lines.
527 * - GPIO_PinSource: specifies the EXTI line to be configured.
528 * This parameter can be GPIO_PinSourcex where x can be (0..15).
529 * Output : None
530 * Return : None
531 *******************************************************************************/
\ In section .XML, align 4, keep-with-next
532 void GPIO_EXTILineConfig(u8 GPIO_PortSource, u8 GPIO_PinSource)
533 {
\ GPIO_EXTILineConfig:
\ 00000000 30B4 PUSH {R4,R5}
534 u32 tmp = 0x00;
\ 00000002 0023 MOVS R3,#+0
\ 00000004 1A00 MOVS R2,R3
535
536 /* Check the parameters */
537 assert_param(IS_GPIO_PORT_SOURCE(GPIO_PortSource));
538 assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
539
540 tmp = ((u32)0x0F) << (0x04 * (GPIO_PinSource & (u8)0x03));
\ 00000006 0F23 MOVS R3,#+15
\ 00000008 8C07 LSLS R4,R1,#+30 ;; ZeroExtS R4,R1,#+30,#+30
\ 0000000A A40F LSRS R4,R4,#+30
\ 0000000C 0425 MOVS R5,#+4
\ 0000000E 6C43 MULS R4,R5,R4
\ 00000010 A340 LSLS R3,R3,R4
\ 00000012 1A00 MOVS R2,R3
541
542 AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
\ 00000014 C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 00000016 8B10 ASRS R3,R1,#+2
\ 00000018 0424 MOVS R4,#+4
\ 0000001A 6343 MULS R3,R4,R3
\ 0000001C 0F4C LDR.N R4,??GPIO_EXTILineConfig_0 ;; 0x40010008
\ 0000001E E358 LDR R3,[R4, R3]
\ 00000020 9343 BICS R3,R3,R2
\ 00000022 C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 00000024 8C10 ASRS R4,R1,#+2
\ 00000026 0425 MOVS R5,#+4
\ 00000028 6C43 MULS R4,R5,R4
\ 0000002A 0C4D LDR.N R5,??GPIO_EXTILineConfig_0 ;; 0x40010008
\ 0000002C 2B51 STR R3,[R5, R4]
543 AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((u32)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (u8)0x03)));
\ 0000002E C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 00000030 8B10 ASRS R3,R1,#+2
\ 00000032 0424 MOVS R4,#+4
\ 00000034 6343 MULS R3,R4,R3
\ 00000036 094C LDR.N R4,??GPIO_EXTILineConfig_0 ;; 0x40010008
\ 00000038 E358 LDR R3,[R4, R3]
\ 0000003A C0B2 UXTB R0,R0 ;; ZeroExtS R0,R0,#+24,#+24
\ 0000003C 8C07 LSLS R4,R1,#+30 ;; ZeroExtS R4,R1,#+30,#+30
\ 0000003E A40F LSRS R4,R4,#+30
\ 00000040 0425 MOVS R5,#+4
\ 00000042 6C43 MULS R4,R5,R4
\ 00000044 10FA04F4 LSLS R4,R0,R4
\ 00000048 1C43 ORRS R4,R4,R3
\ 0000004A C9B2 UXTB R1,R1 ;; ZeroExtS R1,R1,#+24,#+24
\ 0000004C 8B10 ASRS R3,R1,#+2
\ 0000004E 0425 MOVS R5,#+4
\ 00000050 6B43 MULS R3,R5,R3
\ 00000052 024D LDR.N R5,??GPIO_EXTILineConfig_0 ;; 0x40010008
\ 00000054 EC50 STR R4,[R5, R3]
544 }
\ 00000056 30BC POP {R4,R5}
\ 00000058 7047 BX LR ;; return
\ 0000005A 00BF Nop
\ ??GPIO_EXTILineConfig_0:
\ 0000005C 08000140 DC32 0x40010008
545
546 /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function .cstack
-------- -------
GPIO_AFIODeInit 8
GPIO_DeInit 8
GPIO_EXTILineConfig 8
GPIO_EventOutputCmd 0
GPIO_EventOutputConfig 0
GPIO_Init 24
GPIO_PinLockConfig 0
GPIO_PinRemapConfig 16
GPIO_ReadInputData 0
GPIO_ReadInputDataBit 8
GPIO_ReadOutputData 0
GPIO_ReadOutputDataBit 8
GPIO_ResetBits 0
GPIO_SetBits 0
GPIO_StructInit 0
GPIO_Write 0
GPIO_WriteBit 0
Section sizes:
Function/Label Bytes
-------------- -----
GPIO_DeInit 140
GPIO_AFIODeInit 22
GPIO_Init 244
GPIO_StructInit 20
GPIO_ReadInputDataBit 34
GPIO_ReadInputData 6
GPIO_ReadOutputDataBit 34
GPIO_ReadOutputData 6
GPIO_SetBits 6
GPIO_ResetBits 6
GPIO_WriteBit 18
GPIO_Write 6
GPIO_PinLockConfig 28
GPIO_EventOutputConfig 40
GPIO_EventOutputCmd 12
GPIO_PinRemapConfig 96
GPIO_EXTILineConfig 96
814 bytes in section .XML
814 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -