stm32f10x_gpio.lst

来自「针对STM32F103的UCOS移植」· LST 代码 · 共 1,009 行 · 第 1/4 页

LST
1,009
字号
   \   0000000A   54EA0010           ORRS     R0,R4,R0, LSL #+4
   \   0000000E   0143               ORRS     R1,R1,R0
   \   00000010   1160               STR      R1,[R2, #+0]
    438          }
   \   00000012   10BD               POP      {R4,PC}          ;; return
   \                     ??GPIO_EventOutputConfig_0:
   \   00000014   00000140           DC32     0x40010000
   \   00000018   80FF0000           DC32     0xff80
    439          
    440          /*******************************************************************************
    441          * Function Name  : GPIO_EventOutputCmd
    442          * Description    : Enables or disables the Event Output.
    443          * Input          : - NewState: new state of the Event output.
    444          *                    This parameter can be: ENABLE or DISABLE.
    445          * Output         : None
    446          * Return         : None
    447          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    448          void GPIO_EventOutputCmd(FunctionalState NewState)
    449          {
    450            /* Check the parameters */
    451            assert(IS_FUNCTIONAL_STATE(NewState));
    452            
    453            *(vu32 *) EVCR_EVOE_BB = (u32)NewState;
   \                     GPIO_EventOutputCmd:
   \   00000000   0149               LDR.N    R1,??GPIO_EventOutputCmd_0  ;; 0x4220001c
   \   00000002   0860               STR      R0,[R1, #+0]
    454          }
   \   00000004   7047               BX       LR               ;; return
   \   00000006   00BF               Nop      
   \                     ??GPIO_EventOutputCmd_0:
   \   00000008   1C002042           DC32     0x4220001c
    455          
    456          /*******************************************************************************
    457          * Function Name  : GPIO_PinRemapConfig
    458          * Description    : Changes the mapping of the specified pin.
    459          * Input          : - GPIO_Remap: selects the pin to remap.
    460          *                    This parameter can be one of the following values:
    461          *                       - GPIO_Remap_SPI1
    462          *                       - GPIO_Remap_I2C1
    463          *                       - GPIO_Remap_USART1
    464          *                       - GPIO_Remap_USART2
    465          *                       - GPIO_PartialRemap_USART3
    466          *                       - GPIO_FullRemap_USART3
    467          *                       - GPIO_PartialRemap_TIM1
    468          *                       - GPIO_FullRemap_TIM1
    469          *                       - GPIO_PartialRemap1_TIM2
    470          *                       - GPIO_PartialRemap2_TIM2
    471          *                       - GPIO_FullRemap_TIM2
    472          *                       - GPIO_PartialRemap_TIM3
    473          *                       - GPIO_FullRemap_TIM3
    474          *                       - GPIO_Remap_TIM4
    475          *                       - GPIO_Remap1_CAN
    476          *                       - GPIO_Remap2_CAN
    477          *                       - GPIO_Remap_PD01
    478          *                       - GPIO_Remap_SWJ_NoJTRST
    479          *                       - GPIO_Remap_SWJ_JTAGDisable
    480          *                       - GPIO_Remap_SWJ_Disable
    481          *                  - NewState: new state of the port pin remapping.
    482          *                    This parameter can be: ENABLE or DISABLE.
    483          * Output         : None
    484          * Return         : None
    485          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    486          void GPIO_PinRemapConfig(u32 GPIO_Remap, FunctionalState NewState)
    487          {
   \                     GPIO_PinRemapConfig:
   \   00000000   70B5               PUSH     {R4-R6,LR}
    488            u32 tmp = 0x00, tmp1 = 0x00, tmpreg = 0x00, tmpmask = 0x00;
    489          
    490            /* Check the parameters */
    491            assert(IS_GPIO_REMAP(GPIO_Remap));
    492            assert(IS_FUNCTIONAL_STATE(NewState));  
    493            
    494            tmpreg = AFIO->MAPR;
   \   00000002   104B               LDR.N    R3,??GPIO_PinRemapConfig_0  ;; 0x40010004
   \   00000004   1C68               LDR      R4,[R3, #+0]
    495          
    496            tmpmask = (GPIO_Remap & DBGAFR_POSITION_MASK) >> 0x10;
   \   00000006   10F47022           ANDS     R2,R0,#0xF0000
   \   0000000A   120C               LSRS     R2,R2,#+16
    497            tmp = GPIO_Remap & LSB_MASK;
   \   0000000C   85B2               UXTH     R5,R0
    498          
    499            if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
   \   0000000E   8602               LSLS     R6,R0,#+10
   \   00000010   04D5               BPL.N    ??GPIO_PinRemapConfig_1
    500            {
    501              tmpreg &= DBGAFR_SWJCFG_MASK;
   \   00000012   7FF0E062           MVNS     R2,#+117440512
   \   00000016   2240               ANDS     R2,R2,R4
   \   00000018   1400               MOVS     R4,R2
   \   0000001A   06E0               B.N      ??GPIO_PinRemapConfig_2
    502            }
    503            else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
   \                     ??GPIO_PinRemapConfig_1:
   \   0000001C   C602               LSLS     R6,R0,#+11
   \   0000001E   03D5               BPL.N    ??GPIO_PinRemapConfig_3
    504            {
    505              tmp1 = ((u32)0x03) << tmpmask;
    506              tmpreg &= ~tmp1;
   \   00000020   0326               MOVS     R6,#+3
   \   00000022   9640               LSLS     R6,R6,R2
   \   00000024   B443               BICS     R4,R4,R6
   \   00000026   00E0               B.N      ??GPIO_PinRemapConfig_2
    507            }
    508            else
    509            {
    510              tmpreg &= ~tmp;
   \                     ??GPIO_PinRemapConfig_3:
   \   00000028   AC43               BICS     R4,R4,R5
    511            }
    512          
    513            if (NewState != DISABLE)
   \                     ??GPIO_PinRemapConfig_2:
   \   0000002A   0029               CMP      R1,#+0
   \   0000002C   07D0               BEQ.N    ??GPIO_PinRemapConfig_4
    514            {
    515              if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
   \   0000002E   8002               LSLS     R0,R0,#+10
   \   00000030   02D5               BPL.N    ??GPIO_PinRemapConfig_5
    516              {
    517                tmpreg |= (tmp << 0x10);
   \   00000032   54EA0544           ORRS     R4,R4,R5, LSL #+16
   \   00000036   02E0               B.N      ??GPIO_PinRemapConfig_4
    518              }
    519              else
    520              {
    521                tmpreg |= tmp;
   \                     ??GPIO_PinRemapConfig_5:
   \   00000038   2000               MOVS     R0,R4
   \   0000003A   2C00               MOVS     R4,R5
   \   0000003C   0443               ORRS     R4,R4,R0
    522              }
    523            }
    524            AFIO->MAPR = tmpreg;
   \                     ??GPIO_PinRemapConfig_4:
   \   0000003E   1C60               STR      R4,[R3, #+0]
    525          }
   \   00000040   70BD               POP      {R4-R6,PC}       ;; return
   \   00000042   00BF               Nop      
   \                     ??GPIO_PinRemapConfig_0:
   \   00000044   04000140           DC32     0x40010004
    526          
    527          /*******************************************************************************
    528          * Function Name  : GPIO_EXTILineConfig
    529          * Description    : Selects the GPIO pin used as EXTI Line.
    530          * Input          : - GPIO_PortSource: selects the GPIO port to be used as
    531          *                    source for EXTI lines.
    532          *                  - GPIO_PinSource: specifies the EXTI line to be configured.
    533          *                   This parameter can be GPIO_PinSourcex where x can be (0..15).
    534          * Output         : None
    535          * Return         : None
    536          *******************************************************************************/

   \                                 In segment CODE, align 4, keep-with-next
    537          void GPIO_EXTILineConfig(u8 GPIO_PortSource, u8 GPIO_PinSource)
    538          {
   \                     GPIO_EXTILineConfig:
   \   00000000   10B5               PUSH     {R4,LR}
   \   00000002   0A00               MOVS     R2,R1
   \   00000004   9210               ASRS     R2,R2,#+2
   \   00000006   084B               LDR.N    R3,??GPIO_EXTILineConfig_0  ;; 0x40010008
   \   00000008   13EB8202           ADDS     R2,R3,R2, LSL #+2
   \   0000000C   8907               LSLS     R1,R1,#+30
   \   0000000E   890F               LSRS     R1,R1,#+30
   \   00000010   8900               LSLS     R1,R1,#+2
   \   00000012   1368               LDR      R3,[R2, #+0]
   \   00000014   0F24               MOVS     R4,#+15
   \   00000016   8C40               LSLS     R4,R4,R1
   \   00000018   A343               BICS     R3,R3,R4
   \   0000001A   1360               STR      R3,[R2, #+0]
    539            u32 tmp = 0x00;
    540          
    541            /* Check the parameters */
    542            assert(IS_GPIO_PORT_SOURCE(GPIO_PortSource));
    543            assert(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
    544            
    545            tmp = ((u32)0x0F) << (0x04 * (GPIO_PinSource & (u8)0x03));
    546          
    547            AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
    548            AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((u32)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (u8)0x03)));
   \   0000001C   1368               LDR      R3,[R2, #+0]
   \   0000001E   8840               LSLS     R0,R0,R1
   \   00000020   1843               ORRS     R0,R0,R3
   \   00000022   1060               STR      R0,[R2, #+0]
    549          }
   \   00000024   10BD               POP      {R4,PC}          ;; return
   \   00000026   00BF               Nop      
   \                     ??GPIO_EXTILineConfig_0:
   \   00000028   08000140           DC32     0x40010008
    550          
    551          /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

   Maximum stack usage in bytes:

     Function               CSTACK
     --------               ------
     GPIO_AFIODeInit            4
     GPIO_DeInit                4
     GPIO_EXTILineConfig        8
     GPIO_EventOutputCmd        0
     GPIO_EventOutputConfig     8
     GPIO_Init                 24
     GPIO_PinLockConfig         0
     GPIO_PinRemapConfig       16
     GPIO_ReadInputData         0
     GPIO_ReadInputDataBit      4
     GPIO_ReadOutputData        0
     GPIO_ReadOutputDataBit     4
     GPIO_ResetBits             0
     GPIO_SetBits               0
     GPIO_StructInit            0
     GPIO_Write                 0
     GPIO_WriteBit              0


   Segment part sizes:

     Function/Label         Bytes
     --------------         -----
     GPIO_DeInit             144
     GPIO_AFIODeInit          20
     GPIO_Init               172
     GPIO_StructInit          20
     GPIO_ReadInputDataBit    16
     GPIO_ReadInputData        6
     GPIO_ReadOutputDataBit   16
     GPIO_ReadOutputData       6
     GPIO_SetBits              4
     GPIO_ResetBits            4
     GPIO_WriteBit            12
     GPIO_Write                4
     GPIO_PinLockConfig       16
     GPIO_EventOutputConfig   28
     GPIO_EventOutputCmd      12
     GPIO_PinRemapConfig      72
     GPIO_EXTILineConfig      44
      Others                   8

 
 604 bytes in segment CODE
 
 596 bytes of CODE memory (+ 8 bytes shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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