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

📄 stm32f10x_gpio.txt

📁 stm32-SDIO+FatFS文件系统txt-int-ascii
💻 TXT
📖 第 1 页 / 共 3 页
字号:
00003c  4f13              LDR      r7,|L9.140|
00003e  607e              STR      r6,[r7,#4]
000040  e012              B        |L9.104|
                  |L9.66|
;;;573      }
;;;574      else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
000042  f4001680          AND      r6,r0,#0x100000
000046  f5b61f80          CMP      r6,#0x100000
00004a  d106              BNE      |L9.90|
;;;575      {
;;;576        tmp1 = ((uint32_t)0x03) << tmpmask;
00004c  2603              MOVS     r6,#3
00004e  fa06f405          LSL      r4,r6,r5
;;;577        tmpreg &= ~tmp1;
000052  43a1              BICS     r1,r1,r4
;;;578        tmpreg |= ~DBGAFR_SWJCFG_MASK;
000054  f0416170          ORR      r1,r1,#0xf000000
000058  e006              B        |L9.104|
                  |L9.90|
;;;579      }
;;;580      else
;;;581      {
;;;582        tmpreg &= ~(tmp << ((GPIO_Remap >> 0x15)*0x10));
00005a  0d46              LSRS     r6,r0,#21
00005c  0136              LSLS     r6,r6,#4
00005e  fa03f606          LSL      r6,r3,r6
000062  43b1              BICS     r1,r1,r6
;;;583        tmpreg |= ~DBGAFR_SWJCFG_MASK;
000064  f0416170          ORR      r1,r1,#0xf000000
                  |L9.104|
;;;584      }
;;;585    
;;;586      if (NewState != DISABLE)
000068  b122              CBZ      r2,|L9.116|
;;;587      {
;;;588        tmpreg |= (tmp << ((GPIO_Remap >> 0x15)*0x10));
00006a  0d46              LSRS     r6,r0,#21
00006c  0136              LSLS     r6,r6,#4
00006e  fa03f606          LSL      r6,r3,r6
000072  4331              ORRS     r1,r1,r6
                  |L9.116|
;;;589      }
;;;590    
;;;591      if((GPIO_Remap & 0x80000000) == 0x80000000)
000074  f0004600          AND      r6,r0,#0x80000000
000078  f1b64f00          CMP      r6,#0x80000000
00007c  d102              BNE      |L9.132|
;;;592      {
;;;593        AFIO->MAPR2 = tmpreg;
00007e  4e03              LDR      r6,|L9.140|
000080  61f1              STR      r1,[r6,#0x1c]
000082  e001              B        |L9.136|
                  |L9.132|
;;;594      }
;;;595      else
;;;596      {
;;;597        AFIO->MAPR = tmpreg;
000084  4e01              LDR      r6,|L9.140|
000086  6071              STR      r1,[r6,#4]
                  |L9.136|
;;;598      }  
;;;599    }
000088  bdf0              POP      {r4-r7,pc}
;;;600    
                          ENDP

00008a  0000              DCW      0x0000
                  |L9.140|
                          DCD      0x40010000

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

                  GPIO_ReadInputData PROC
;;;304      */
;;;305    uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
000000  4601              MOV      r1,r0
;;;306    {
;;;307      /* Check the parameters */
;;;308      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;309      
;;;310      return ((uint16_t)GPIOx->IDR);
000002  6888              LDR      r0,[r1,#8]
000004  b280              UXTH     r0,r0
;;;311    }
000006  4770              BX       lr
;;;312    
                          ENDP


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

                  GPIO_ReadInputDataBit PROC
;;;280      */
;;;281    uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  4602              MOV      r2,r0
;;;282    {
;;;283      uint8_t bitstatus = 0x00;
000002  2000              MOVS     r0,#0
;;;284      
;;;285      /* Check the parameters */
;;;286      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;287      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;288      
;;;289      if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET)
000004  6893              LDR      r3,[r2,#8]
000006  420b              TST      r3,r1
000008  d001              BEQ      |L11.14|
;;;290      {
;;;291        bitstatus = (uint8_t)Bit_SET;
00000a  2001              MOVS     r0,#1
00000c  e000              B        |L11.16|
                  |L11.14|
;;;292      }
;;;293      else
;;;294      {
;;;295        bitstatus = (uint8_t)Bit_RESET;
00000e  2000              MOVS     r0,#0
                  |L11.16|
;;;296      }
;;;297      return bitstatus;
;;;298    }
000010  4770              BX       lr
;;;299    
                          ENDP


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

                  GPIO_ReadOutputData PROC
;;;342      */
;;;343    uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
000000  4601              MOV      r1,r0
;;;344    {
;;;345      /* Check the parameters */
;;;346      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;347        
;;;348      return ((uint16_t)GPIOx->ODR);
000002  68c8              LDR      r0,[r1,#0xc]
000004  b280              UXTH     r0,r0
;;;349    }
000006  4770              BX       lr
;;;350    
                          ENDP


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

                  GPIO_ReadOutputDataBit PROC
;;;319      */
;;;320    uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  4602              MOV      r2,r0
;;;321    {
;;;322      uint8_t bitstatus = 0x00;
000002  2000              MOVS     r0,#0
;;;323      /* Check the parameters */
;;;324      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;325      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;326      
;;;327      if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET)
000004  68d3              LDR      r3,[r2,#0xc]
000006  420b              TST      r3,r1
000008  d001              BEQ      |L13.14|
;;;328      {
;;;329        bitstatus = (uint8_t)Bit_SET;
00000a  2001              MOVS     r0,#1
00000c  e000              B        |L13.16|
                  |L13.14|
;;;330      }
;;;331      else
;;;332      {
;;;333        bitstatus = (uint8_t)Bit_RESET;
00000e  2000              MOVS     r0,#0
                  |L13.16|
;;;334      }
;;;335      return bitstatus;
;;;336    }
000010  4770              BX       lr
;;;337    
                          ENDP


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

                  GPIO_ResetBits PROC
;;;373      */
;;;374    void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  6141              STR      r1,[r0,#0x14]
;;;375    {
;;;376      /* Check the parameters */
;;;377      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;378      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;379      
;;;380      GPIOx->BRR = GPIO_Pin;
;;;381    }
000002  4770              BX       lr
;;;382    
                          ENDP


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

                  GPIO_SetBits PROC
;;;357      */
;;;358    void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  6101              STR      r1,[r0,#0x10]
;;;359    {
;;;360      /* Check the parameters */
;;;361      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;362      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;363      
;;;364      GPIOx->BSRR = GPIO_Pin;
;;;365    }
000002  4770              BX       lr
;;;366    
                          ENDP


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

                  GPIO_StructInit PROC
;;;265      */
;;;266    void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
000000  f64f71ff          MOV      r1,#0xffff
;;;267    {
;;;268      /* Reset GPIO init structure parameters values */
;;;269      GPIO_InitStruct->GPIO_Pin  = GPIO_Pin_All;
000004  8001              STRH     r1,[r0,#0]
;;;270      GPIO_InitStruct->GPIO_Speed = GPIO_Speed_2MHz;
000006  2102              MOVS     r1,#2
000008  7081              STRB     r1,[r0,#2]
;;;271      GPIO_InitStruct->GPIO_Mode = GPIO_Mode_IN_FLOATING;
00000a  2104              MOVS     r1,#4
00000c  70c1              STRB     r1,[r0,#3]
;;;272    }
00000e  4770              BX       lr
;;;273    
                          ENDP


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

                  GPIO_Write PROC
;;;416      */
;;;417    void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
000000  60c1              STR      r1,[r0,#0xc]
;;;418    {
;;;419      /* Check the parameters */
;;;420      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;421      
;;;422      GPIOx->ODR = PortVal;
;;;423    }
000002  4770              BX       lr
;;;424    
                          ENDP


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

                  GPIO_WriteBit PROC
;;;393      */
;;;394    void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
000000  b10a              CBZ      r2,|L18.6|
;;;395    {
;;;396      /* Check the parameters */
;;;397      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;398      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;399      assert_param(IS_GPIO_BIT_ACTION(BitVal)); 
;;;400      
;;;401      if (BitVal != Bit_RESET)
;;;402      {
;;;403        GPIOx->BSRR = GPIO_Pin;
000002  6101              STR      r1,[r0,#0x10]
000004  e000              B        |L18.8|
                  |L18.6|
;;;404      }
;;;405      else
;;;406      {
;;;407        GPIOx->BRR = GPIO_Pin;
000006  6141              STR      r1,[r0,#0x14]
                  |L18.8|
;;;408      }
;;;409    }
000008  4770              BX       lr
;;;410    
                          ENDP

⌨️ 快捷键说明

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